To set the short cut key for the menu when using CommandDesign pattern

Hi All
I have a menu File which has two menu items Load and save.
Here for implementing the actionperformed iam using the command design pattern.
Now iam not able to set the short cut key for the menu item......
Please help me..............
Thanks
Arch

The Java Tutorials: [How to Use Menus|http://java.sun.com/docs/books/tutorial/uiswing/components/menu.html]
db

Similar Messages

  • How to set the short cut key for buttons

    Hi
    I dont know how to set the short cut keys for the button...can u pls help me out

    Do you mean a short cut key for buttons at client side (web browser)? If yes, you could do it with JavaScript~~~ ^o^

  • Short Cut Key for Personalized menu

    Hi
    I've created an Menu for the zoom function using personalization, Is it possible to setup a short key for the menu created
    Example: for the File menu we can use Alt+F similarly is it possible to build the short cut key for the custom menu created using personalization
    Please advice
    thanks
    Regards
    Ramesh Kumar S

    The Character '&' worked very well as expected...
    Thanks a lot
    Regards
    Ramesh Kumar S

  • Short cut key for created menu

    Hello All:
        Want to know if it is possbie lt put a short cut key to a addon menu...
        I can't attach it in SBO because when it starts menu has not been generated yet, and it automatically loose it. I can't seem to capture combination keys in main main desktop using keysdown event type. Is there anything that I can use??
    Sincerely Yours

    Hello Bo,
    You may try the form key down event. sample code:
    SHIFT+P: open BP
    CTRLSHIFTQ: open sales quotation
    Public Sub ItemEventHandler(ByVal FormUID As String, ByRef pVal As SAPbouiCOM.ItemEvent, _
        ByRef BubbleEvent As Boolean) Handles oApp.ItemEvent
          If pVal.EventType = SAPbouiCOM.BoEventTypes.et_FORM_KEY_DOWN And pVal.Before_Action = True Then
                MsgBox("Modifier: " + CInt(pVal.Modifiers).ToString() + " Char precessed" + pVal.CharPressed.ToString())
                If pVal.Modifiers = SAPbouiCOM.BoModifiersEnum.mt_SHIFT Then
                    'SHIFT+P : Open the Business Partner               
                    If pVal.CharPressed = 80 Then
                        oApp.ActivateMenuItem("2561")
                    End If
                ElseIf pVal.Modifiers = SAPbouiCOM.BoModifiersEnum.mt_CTRL + SAPbouiCOM.BoModifiersEnum.mt_SHIFT Then
                    'CTRL+SHIFT+Q: open sales quotation
                    If pVal.CharPressed = 17 Then
                        oApp.ActivateMenuItem("2049")
                    End If
                End If
            End If
    End Sub
    Regards, Yatsea

  • Create custom short cut key for colon

    I have a Macbook Pro 10.8.4 Lion, but when I upgraded from Mountain Lion, my keyboard went a little wacky. I could of spilled something withnot noticing, but honestly I think I would remember. The help support had no ideas to fix the issues despite our attempts.
    So is there a way to create a custom short cut for a key not in a menu? I need to create a short cut key for the colon and semi colon lol.
    Thanks!

    Edit Menu > Keyboard Shortcuts > Product Area: Window Menu > Workspace Load 1st, 2nd, 3rd, etc. Create a new set and assign a shortcut

  • What is the short cut key minimise all application on mac like window  D in windows operation sys

    what is the short cut key minimise all application on mac like window  D in windows operation system.

    Keyboard shortcuts
    http://support.apple.com/kb/HT1343
    Section: Finder keyboard shortcuts.

  • Is there any short cut key for opeaning Properties

    Is there any short cut key for opeaning Properties and can we assign short cut key to defined style

    Hi there
    Hopefully Lilybiri won't mind my offering up an observation here.
    Lilybiri wrote:
    ...If it is CP5: the Properties panel of the selected object is automatically focussed on when you select the object on the stage, could you perhaps explain why you want a shortcut?...
    If this is Captivate 5, keep in mind that the workspace may be configured in a variety of ways. For example, the Properties Panel may be collapsed to icons as shown below:
    Certainly when whatever object gains focus, it's there when I expand the collapsed panel. So my guess is that one possibility is mitpancha is asking if there is a shortcut for expanding a collapsed Properties panel.
    According to the Window menu Shift+Control+D should open it. But that doesn't seem to happen here on my own setup. Not sure why.
    Cheers... Rick
    Helpful and Handy Links
    Captivate Wish Form/Bug Reporting Form
    Adobe Certified Captivate Training
    SorcererStone Blog
    Captivate eBooks

  • Is it possible to create a SHORT CUT key for a Workspace in CS 5.5 ?

    Is it possible to create a SHORT CUT key for a Workspace using In Design CS 5.5 ?

    Edit Menu > Keyboard Shortcuts > Product Area: Window Menu > Workspace Load 1st, 2nd, 3rd, etc. Create a new set and assign a shortcut

  • I have a new mac and want my old photoshop on it , how get i the old serial key for the new ?

    I have a new mac and want my old photoshop on it , how get i the old serial key for the new ? My old mac is deleted ...

    We would need to know the version of Mac OS you are running and the version of Photoshop you want to install.
    The serial number is the tricky part. If you have no idea where you placed it and did not register your product with Adobe, your chances are very low of retrieving it.

  • The 'c' XUSER key for the DBM user does not exist or could not be identified

    Hello members,
    I am getting this message  'The 'c' XUSER key for the DBM user does not exist or could not be identified' in SUM preparation phase while upgrading SOLMAN from 7.01 to 7.1
    Does anyone has any idea on this. What steps need to be followed for this.
    My DB is MaxDB.
    Thanks,
    Srikanth

    Hello,
    Figured out the problem. Actually SAP System was moved from actual server to Virtual machine on the server. In this process some of the DB configuration got corrupted. And this activity was done by one of our previous employee.
    Since this was a standalone system, I took backup of all current configuration and uninstalled SAP and installed new Solman 7.1 SPS12. Issue is resolved now.
    Best Regards,
    Srikanth
    Solman Upgrade from 7.01 to 7.1 stuck in Extraction-PREP_EXTRACT/BEGIN_PRE phase 

  • Unable to open a New Tab (including using the short cut key)

    I can't click for a new tab. short cut key also not working. I tried to uninstall and install it again, but it is still not working. How to solve this problem?

    Thank you so much for your help, greatly appreciated.

  • Is there a Short cut Key for adding or removing contacts to or from Groups in Address Book

    I'm just curious if there happens to be a Short-cut for either adding contacts to a Group and/or removing them from Groups as well? Seems extremely inefficient to not have this options available. Any help or suggestions would be greatly appreciated.

    You can look at these extensions:
    *Show Parent Folder: https://addons.mozilla.org/firefox/addon/7372
    *Go Parent Folder: https://addons.mozilla.org/firefox/addon/7377

  • What is your strategy for form validation when using MVC pattern?

    This is more of a general discussion topic and will not necessarily have a correct answer. I'm using some of the Flex validator components in order to do form validation, but it seems I'm always coming back to the same issue, which is that in the world of Flex, validation needs to be put in the view components since in order to show error messages you need to set the source property of the validator to an instance of a view component. This again in my case seems to lead to me duplicating the code for setting up my Validators into several views. But, in terms of the MVC pattern, I always thought that data validation should happen in the model, since whether or not a piece of data is valid might be depending on business rules, which again should be stored in the model. Also, this way you'd only need to write the validation rules once for all fields that contain the same type of information in your application.
    So my question is, what strategies do you use when validating data and using an MVC framework? Do you create all the validators in the views and just duplicate the validator if the exact same rules are needed in some other view, or do you store the validators in the model and somehow reference them from the views, changing the source properties as needed? Or do you use some completely different strategy for validating forms and showing error messages to the user?

    Thanks for your answer, JoshBeall. Just to clarify, you would basically create a subclass of e.g. TextInput and add the validation rules to that? Then you'd use your subclass when you need a textinput with validation?
    Anyway, I ended up building sort of my own validation framework. Because the other issue I had with the standard validation was that it relies on inheritance instead of composition. Say I needed a TextInput to both check that it doesn't contain an empty string or just space characters, is between 4 and 100 characters long, and follows a certain pattern (e.g. allows only alphanumerical characters). With the Flex built in validators I would have to create a subclass or my own validator in order to meet all the requirements and if at some point I need another configuration (say just a length and pattern restriction) I would have to create another subclass which duplicates most of the rules, or I would have to build a lot of flags and conditional statements into that one subclass. With the framework I created I can just string together different rules using composition, and the filter classes themselves can be kept very simple since they only need to handle a single condition (check the string length for instance). E.g. below is the rule for my username:
    library["user_name"] = new EmptyStringFilter( new StringLengthFilter(4,255, new RegExpFilter(/^[a-z0-9\-@\._]+$/i) ) );
    <code>library</code> is a Dictionary that contains all my validation rules, and which resides in the model in a ValidationManager class. The framework calls a method <code>validate</code> on the stored filter references which goes through all the filters, the first filter to fail returns an error message and the validation fails:
    (library["user_name"] as IValidationFilter).validate("testuser");
    I only need to setup the rule once for each property I want to validate, regardless where in the app the validation needs to happen. The biggest plus of course that I can be sure the same rules are applied every time I need to validate e.g. a username.
    The second part of the framework basically relies on Chris Callendar's great ErrorTipManager class and a custom subclass of spark.components.Panel (in my case it seemed like the reasonable place to put the code needed, although perhaps extending Form would be even better). ErrorTipManager allows you to force open a error tooltip on a target component easily. The subclass I've created basically allows me to just extend the class whenever I need a form and pass in an array of inputs that I want to validate in the creationComplete handler:
    validatableInputs = [{source:productName, validateAs:"product_name"},
                         {source:unitWeight, validateAs:"unit_weight", dataField:"value"},
                   {source:unitsPerBox, validateAs:"units_per_box", dataField:"value"},
                        {source:producer, validateAs:"producer"}];
    The final step is to add a focusOut handler on the inputs that I want to validate if I want the validation to happen right away. The handler just calls a validateForm method, which in turn iterates through each of the inputs in the validatableInputs array, passing a reference of the input to a suitable validation rule in the model (a reference to the model has been injected into the view for this).
    Having written this down I could probably improve the View side of things a bit, remove the dependency on the Panel component and make the API easier (have the framework wire up more of the boilerplate like adding listeners etc). But for now the code does what it needs to.

  • Wait cursor not working with short cut keys

    Hi,
    I have JButton in my application for which i have set the short cut key using
    button.setMnemonic(char)
    method of JButton. Also i have set the wait cursor for the same button using
    button.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)) .
    I am getting the wait cursor if i click on the button,but not when i use the shortcut key.
    Why is it like that? Pls help me out.

    Why don't you use this class :
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.SwingUtilities;
    public class WaitCursorEventQueue extends EventQueue {
    public WaitCursorEventQueue(int delay) {
    this.delay = delay;
    waitTimer = new WaitCursorTimer();
    waitTimer.setDaemon(true);
    waitTimer.start();
    protected void dispatchEvent(AWTEvent event) {
    waitTimer.startTimer(event.getSource());
    try {
    super.dispatchEvent(event);
    finally {
    waitTimer.stopTimer();
    private int delay;
    private WaitCursorTimer waitTimer;
    private class WaitCursorTimer extends Thread {
    synchronized void startTimer(Object source) {
    this.source = source;
    notify();
    synchronized void stopTimer() {
    if (parent == null)
    interrupt();
    else {
    parent.setCursor(null);
    parent = null;
    public synchronized void run() {
    while (true) {
    try {
    //wait for notification from startTimer()
    wait();
    //wait for event processing to reach the threshold, or
    //interruption from stopTimer()
    wait(delay);
    if (source instanceof Component)
    parent = SwingUtilities.getRoot((Component)source);
    else if (source instanceof MenuComponent) {
    MenuContainer mParent =
    ((MenuComponent)source).getParent();
    if (mParent instanceof Component)
    parent = SwingUtilities.getRoot(
    (Component)mParent);
    if (parent != null && parent.isShowing())
    parent.setCursor(
    Cursor.getPredefinedCursor(
    Cursor.WAIT_CURSOR));
    catch (InterruptedException ie) { }
    private Object source;
    private Component parent;
    and then add to your application :
    //Wait cursor
    EventQueue waitQueue = new WaitCursorEventQueue(200);
    Toolkit.getDefaultToolkit().getSystemEventQueue().push(waitQueue);
    The number (200) specifies the milliseconds to activate the WaitCursor.
    It will work anytime your app is busy for more than that time.

  • Short cut key definitions and symbols I cannot find on keyboard.

    Short cut key definitions, In the window drop down menu there is a short cut symbol for the EQ and others that I simply don't understand or see on my keyboard. My question is this, how do I make this shortcut work? The symbol in front of the command symbol.

    The option+command+E is represented as the ⌥⌘E symbolism, and by pressing those keys, will show the Equalizer.
    Reference the OS X keyboard shortcut guide for additional symbol information. Apple has placed the ⌘ symbol on the command key for a long time, but does not do this with other symbols for shift, control, option, and caps lock.

Maybe you are looking for

  • Display Color for sigle  CELL in ALV report

    Hi all, I have one doubt is it possible to make a particular cell as read color in ALV. Ex: I have one field which shows amount in my ALV report,My requirement is that when ever the amount is less then 'ZERO', I have to show that particular cell in r

  • How to activate GOS in (e.g.) SU01?

    Hello, a number of SAP standard functions have no GOS button available. Especially for SU01 I have a request, because user administrators want to add offcie documents as attachments to the user master. Is there a possibility to activate GOS for SU01

  • Web part throwing exception at run time but not in debug mode

    The below code is throwing exception at run time but does not throw exception while debugging in Visual Studio. This is really causing difficulty for me to detect the cause of exception. Below I have also placed the exception image for reference. nam

  • Cheap but good word processor for mac?

    Hey just got a Macbook today and the saleswoman said i have a 30 day trial of iwork. But after it runs out i would have to pay 80$ to buy it. Are there any word processors out there that are good and cheap? Also doesn't Microsoft Word work on Macs so

  • Business Objects Design Studio

    I am working on a report on Business Objects Design Studio, Please help me out with the below two issues, 1. I want to display user name after Welcome message. The user name should be of the person who is logged into the SAP warehouse currently. 2. T