How to trap menu actions

I am trying to perform some as a result of click on menu(not menu item) using SWINGS.
i tried by adding the menu to menu listener . i overwride menuselected() method, but each time i select the menu(ie using arrow keys) the event is rising...
how to over come this??

I think you want to use ActionListeners with the actionPerformed method instead:
http://java.sun.com/docs/books/tutorial/uiswing/components/menu.html#event
If any of your menu items performs an action that is duplicated by another menu item or by a tool-bar button you should look into using Actions instead of plain ActionListener classes:
http://java.sun.com/docs/books/tutorial/uiswing/misc/action.html

Similar Messages

  • Adobe premiere elements 12 - how to create menu bar action for my inserted image button

    adobe premiere elements 12 - how to create menu bar action for my inserted image button without using their movie menu theme

    forbemag
    I do not think that I am completely focused into this completely, so let us see if the following is going to help.
    You are going to need a base for your button. When you mention "image" button, I am assuming that you are using that term to differentiate between a text button and a thumbnail type button.
    The menus (main and scene) take their origin in .psd files on the hard drive and strict nomenclature and structure for Layers Palatte. And, the buttons on the menus trace back to the menu markers on the Timeline, main menu marker and order of placement of scene markers. The scene thumbnail will only appear when there is a scene marker on the Timeline to which it.
    In view of all that
    Where have you already inserted this "image (button)"...into the Layers Palette of a Photoshop document or other? Is this "image (button)" in a structured Layer Group in the Layers Palette with sublayer groups, text layers, graphic/background layer"?
    Let me give you an example
    If you have a button (with thumbnail) on the main menu and you want that to open to a specific scene in your movie, then you use a main menu marker on the Timeline at the spot that you want that button to target.
    If I am getting closer to what you seek, then please further clarify the DVD navigational envisioned scheme.
    Thanks.
    ATR
    Add On...I did not see the exchanges between us and SG until after I had posted mine. I thought that your discussions were concluded. Please excuse the interruption.

  • How to trap action of Back Button in IE Toolbar

    Hi
    Plz tell me a way How to trap action of Back Button in IE Toolbar

    hi i found something but it can get real messy.
    By the way, I think it can be hooked, but not trap, as in like cancel it if we like
    Manu G, Colin Fraser, Daniel Amsler - i think it's from these guys, i dunno if its ok to paste the link here so ill just paste the exact text
    =======================================================
    Sure, why not!
    Use the onunload event of the body tag.
    Something like this:
    <body OnUnload="alert('Woo hoo..');">
    This will be called everytime the backbutton is pressed.. woo hoo.. :)
    but one care needs to be taken.
    This will also be called when any link or button on the screen are
    clicked. So be sure to apply some kinda check on the buttons/ links.
    Something like:
    <body onload="flag=true" onUnload="if (flag) alert ('Woo hooo..');">
    <input type=button onclick="flag=false">
    This validation will make sure that on the button click, that logic in
    the onunload thing is not called...
    All the best & keep rockin'
    ~MeTaL~

  • How to Disable Menu item in Oracle Applications

    Hi,
    How can I disable a Menu (Actions->user defined menu) Item in Oracle applications by using forms personalization.
    Our requirement is to display a message on click of a standard menu using form personalization and it should retain the seeded functionality.
    Thanks
    Prasanna
    Edited by: user13029651 on Jul 30, 2010 6:47 PM

    As an Oracle Applications Developer, your best friends are going to be the following docuements:
    <ul><li>Oracle Applications Developer's Guide </li>
    <li>Oracle Applications User Interface Standards for Forms-Based Products</li>
    <li>Oracle Application Framework Personalization Guide</li></UL>
    These and all of the other related EBS documents can be found in the Oracle Applications (EBS) Documentation Home and don't forget the Oracle eTRM Technical Reference, but you will need an Oracle Support contract to access this site.
    When you can't find your answer in these document sources, you can always ask for help in the E-Business Suite group of forums.
    Craig...

  • How to perform TERMINATION action

    Hello experts....
    I am new to SAP... can anybody please let me know how to configure termination action and what type of infortype we will configure for Termination.Thanks in advance...........

    Hi,
    Follow the below mentuion steps:-
    1. Create an action say 'TM' at the img path mention below:-
    Personnel Management->Personnel Administration->Actions->Set up personnel actions
    2. Create action reasons also at the link below:-
    Personnel Management->Personnel Administration->Actions->Create reasons for personnel actions
    3. Add the termintaion action in the Action menu of your country:-
    Personnel Management->Personnel Administration->Actions->Change action menu
    4. Define infogroup for your termination action below:-
    Personnel Management->Personnel Administration->Actions->Define infogroups
    Usually, IT0001, IT0002, IT0014, IT0015, IT0041 are set up in the infogroup action. Also, get the requirements from your customer like which all infotype he will like to delimit.
    5. Most important is to set the Inactive status for the employee
    Go to table T529A and set the status as '0' in the employment field 'STAT2'.
    Thanks & Regards, Swapnil Mishra

  • How to configure additional action

    Hi,
    How to Configure additional action in a system where only  one action is allowed for an employee in same day in IT0000, and what is the purpose of IT0302.
    it will be helpful if any one shares the steps.
    Thank you
    Srihari

    Hi,
    Infotype 0302 Additional Actions allows you to automatically log all of the personnel action types that are performed for an employee on a specific date. It allows you to perform and document several personnel action types for an employee in the R/3 System on the same day.
    You can display and edit the data records logged in the infotype Additional Actions (0302) on the list screen of the infotype Actions (0000),
    In Customizing for Personnel Administration, choose menu path Setting Up Procedures -> Actions -> Set up personnel action types to specify, among other things, the following:
    whether you want to use the automatic logging of personnel action types in the infotype Additional Actions (0302)
    which personnel action type should be saved, that is preserved, in the infotype Actions (0000) if you perform another personnel action type for the employee on the same day.
    You can check the link below for detailed procedure for config:
    http://help.sap.com/saphelp_46c/helpdata/en/dd/234b6e5733d1118b3f0060b03ca329/content.htm
    Hope it helps!
    Arpita

  • Menu Actions: eventType question. JS

    Hi,
    (1) How would I add an eventListener for a given menu action that kicks
    in when the menu is dismissed?
    Eg
    myMenuAction.addListener("onInvoke", function(){alert("Hello");});
    adds a listener when it is invoked. But what would be the eventType for
    "dismiss"?
    (2) Where are the list of eventTypes documented?
    Thanks,
    Ariel

    [Jongware] wrote:
    OT: Can anyone explain in simple terms what the "bubbleability" of events is all about?
    Here's a 30 second crash course in events:
    The basic concept to grock is the "box model".
    Basically an app can be looked at as nested boxes -- boxes within boxes. In InDesign terms, the outermost box is the application, inside that is a document, inside that are layout windows. Inside that are all the objects.
    UI Events generally have two phases. There's the capture phase and the bubbling phase.
    When you click on something (for example), the click is "captured" from the outermost box inward. So it's first captured by the application, then the document, then the layout window, etc.
    Once the click (or what-have-you) hit the target (i.e. a button or InDesign object), the event then bubbles back out. It starts at the innermost object and bubbles out to the outermost box (i.e. the application).
    Theoretically, events can be attached to any box from the innermost one and outwards. If the event is recieved in the capture phase, the outer boxes will catch it first. If it's recieved in the bubbling phase, the inner boxes come first.
    Let's say we have a "move" event on page items (which does not exist). We could theoretically add event listeners to the object itself (not possible because that level was never implemented), the page (also not possible), the window which holds the object, the document, or the application. If we attach listener to all the boxes, the innermost ones will be executed first. If bubbling can be canceled, the inner boxes can prevent the event from bubbling out to the outer boxes.
    AFTER_CLOSE refers to windows or documents. The event can be attached to the app because it bubbles out to the app. Not that you can listen for an AFTER_CLOSE event for the app itself...

  • How to trap ALT key?

    Hello guys!
    After searching and investigating quite a lot, I am posting
    my problem here in hope that God bless me with success
    I am working on an eLearning course whereas client requied
    the course to be keyboard accessible. He wants all the shortcuts
    with Alt key combination.
    I can trap the Alt key with the use of enterframe but that
    makes my course processing heavy so I tried to trap Alt key with
    keylistener event but unfortunately keylistener event doesn't
    listen Alt key
    Could anyone suggest me how to trap Alt key without using
    enterframe or interval?
    Thanks a lot for sparing your precisious time.

    I believe Alt-Space is a keyboard shortcut in Windows XP to bring up the window menu for any app...so it's not just a LabVIEW thing. Further, it appears that Windows grabs that key combination before a LabVIEW event structure can get it.  I don't know any way around this behavior, since Windows appears to be taking matters into its own hands with certain key combinations.  My advice would be to use a different key combination for your app.
    -D
    Darren Nattinger, CLA
    LabVIEW Artisan and Nugget Penman

  • How to trap ALT-Space key combo. ?

    Hi,
          Does anyone know how to trap Alt-space?  The user is probing a PC board and may want to keep their eyes on the work.  The space-bar makes a nice big "next" button, and the Alts on either side seem a natural choice for "back".  But, when I try to trap the Alt-key/space keyboard-event, the program nevers sees it.  Instead, a file dialog is displayed, as if Alt is trapped by the VI-menu-bar - which isn't even displayed!
    Cheers.
    When they give imbeciles handicap-parking, I won't have so far to walk!

    I believe Alt-Space is a keyboard shortcut in Windows XP to bring up the window menu for any app...so it's not just a LabVIEW thing. Further, it appears that Windows grabs that key combination before a LabVIEW event structure can get it.  I don't know any way around this behavior, since Windows appears to be taking matters into its own hands with certain key combinations.  My advice would be to use a different key combination for your app.
    -D
    Darren Nattinger, CLA
    LabVIEW Artisan and Nugget Penman

  • Z-Button - How to call a Action Profile to Open a PDF-Doc. within an Event?

    Hi Experts,
    we have created a Z-Button that afterwards creates an event. In the coding for the event an Action Profile should be called and a PDF-Document should be opened. We have copied the coding from the standard button 'Print Preview' which is calling the standard event: EH_ONPRINT_PREVIEW.
    We have also defined a Z Action Profile which is a copie of SERVICE_CONFIRMATION. Our problem is we don't know how why our Z-Action Prodile is not called? What is the class lr_actioncontext (TYPE REF TO cl_crm_bol_entity)?
    DATA: lr_cn               TYPE REF TO cl_bsp_wd_context_node,
            lr_adminh           TYPE REF TO cl_crm_bol_entity,
            lr_actioncontext    TYPE REF TO cl_crm_bol_entity,
            lv_adminh_guid      TYPE string,
            lv_url              TYPE string,
            lc_head_context     TYPE REF TO cl_doc_context_crm_order,
            lt_item_context     TYPE ppftctxpos,
            iv_header_guid      TYPE crmt_object_guid,
            lif_decision_pop    TYPE REF TO if_bsp_wd_popup,
            lv_string           TYPE string.
      CHECK gv_print_preview_enabled = abap_true.
      lr_cn = me->get_context_node( gc_cn_btadminh ).
      CHECK lr_cn IS BOUND.
      lr_adminh ?= lr_cn->collection_wrapper->get_current( ).
      CHECK lr_adminh IS BOUND.
      lv_adminh_guid   =  lr_adminh->get_property_as_string( iv_attr_name = 'GUID' ).
      lr_actioncontext = lr_adminh->get_related_entity( iv_relation_name = 'BTHeaderAction' ). "#EC NOTEXT
      CLEAR gt_print_actions.
      CLEAR gr_action_popup.
      iv_header_guid = lv_adminh_guid.
      CALL METHOD cl_crm_uiu_actions_tools=>get_action_definition
        RECEIVING
          rv_action_def = lv_string.
      CALL METHOD cl_crm_uiu_actions_tools=>show_print_actions_popup
        EXPORTING
          ir_action_context       = lr_actioncontext
          ir_parent_node          = lr_adminh
          ir_view_controller      = me
          ir_component_controller = comp_controller
          iv_event_name           = gc_ev_print_preview_closed
          iv_for_preview          = abap_true
          iv_appl_guid            = lv_adminh_guid
        IMPORTING
          et_actions              = gt_print_actions
          ev_url                  = lv_url
        CHANGING
          cr_decision_popup       = gr_action_popup.
      IF lv_url IS NOT INITIAL.
        call_print_preview_popup( lv_url ).
      ENDIF.
    Best Regards

    Closed. No answers.

  • OSB : How can we copy  actions from one project folder to other projects?

    How can we copy actions from one project folder to other projects in OSB?
    For eg:
    I have a service call out action in Project1/proxySer1
    I want to copy this to Project2/proxySer2.
    Espicially, in our case error handling callout is common to all of our projects and we should be able to copy from one to another.
    Edited by: user10367892 on Aug 20, 2009 12:28 PM

    Thank you for the reply.
    It was my fault. I was on two different servers, while i was doing this and so didn't work. But copy /past action works as you suggested.
    Can I select multiple actions from one stage and paste to different proxy service? I have too many options to copy/paste and hence I have this question.
    Is there any other way of copying all selected actions in one stage to another, but not the complete stage itselft?

  • How can i set action on UITaBar and get event from that

    Hi All,
    I m doing one apps in which i have to add three UITabBarItem and this is UITabBarSystemItem.
    Now i cannot understand that how can i set action and get event from the?
    And how can i set various views on three tab bar item.
    I have to use UITabBar means i have to use UINavigationController+UITabBar
    My code id
    tabBar =[[UITabBar alloc] initWithFrame:CGRectMake(0,370,320,50)];
    tabBar.backgroundColor =[UIColor blackColor];
    UITabBarItem *search =[[UITabBarItem alloc] initWithTabBarSystemItem:UITabBarSystemItemSearch tag:0];
    UITabBarItem *recents =[[UITabBarItem alloc] initWithTabBarSystemItem:UITabBarSystemItemRecents tag:1];
    UITabBarItem *favorites =[[UITabBarItem alloc] initWithTabBarSystemItem:UITabBarSystemItemFavorit es tag:2];
    tabBar.items =[[NSArray arrayWithObjects:search,recents,favorites, nil] retain];
    tabBar.selectedItem = search;
    [myView addSubview:tabBar];
    [tabBar release];
    I add a action:
    UITabBarItem *search =[[UITabBarItem alloc] InitWithTabBarSystemItem:UITabBarSystemItemSearch tag:0 action:@selector(select:)];
    So it error: Warning -no'InitWithTabBarSystemItem:tag:action:' method fount
    So any can help me regarding it?

    Thanks RickMaddy very much.
    I read and do with sample at the View Controller Programming Guide . But when run it only view TabBar with title but haven't got any TabBarItem on it. I searched a few example about TabBar and i did, but i want do a form with a button then press on button it view a form with 2 TabBarItem on TabBar and press each TabBarItem will show correlative form page 1, page 2.
    UITabBarController *tabBarControl = [[[UITabBarController alloc] initWithNibName:nil bundle:nil] autorelease];
    tabBarControl.title = @"Tab bar";
    ViewControl1 *view1 = [[[ViewControl1 alloc] initWithNibName:@"ViewControl1" bundle:nil] autorelease];
    ViewControl1 *view2 = [[[ViewControl1 alloc] initWithNibName:@"ViewControl2" bundle:nil] autorelease];
    tabBarControl.viewControllers = [NSArray arrayWithObjects:view1,view2,nil];
    [self.navigationController pushViewController:tabBarControl animated:YES];

  • How to use same actions for differ pop-up

    Hi gurus,
    I am using 2 popup in a view.same popup's having same buttons 'Yes', 'No'.when i use 1st one i have to create an action for that Yes button where i put my code for that particular Action.
    But when i used 2nd one the action define for that is not acceptable with differ name.it takes only standard one.
    Now my Query is : How to use same actions for differ pop-up buttons with in a similar view?Where i put my code.
    Plz sugges me.
    <b>Points will be sured.</b>
    Sanket sethi

    Hi,
    Take one integer value attribute in the context of view
    when you r performing action on POP1 set it's value to 1
    when you r performing action on POP2 set it's value to 2
    create one method which receives integer argument, say diaplay(int a)
    In the action call display(wdContext.currentContextElement().get<intvariable>()) by passing the value in the context attribute
    in display() method, Check the value of integer variable..
    if it is 1 then perform action related to POP1
    if it is 2 then perform action related to POP2
    Regards
    LakshmiNarayana

  • How to use same actions for differ pop-up buttons

    Hi gurus,
    I am using 2 popup in a view.same popup's having same buttons 'Yes', 'No'.when i use 1st one i have to create an action for that Yes button where i put my code for that particular Action.
    But when i used 2nd one the action define for that is not acceptable with differ name.it takes only standard one.
    Now my Query is : How to use same actions for differ pop-up buttons with in a similar view?Where i put my code.
    Plz sugges me.
    <b>Points will be sured.</b>
    Sanket sethi

    Hi ,
    u can use the method SUBSCRIBE_TO_BUTTON_EVENT of the IF_WD_WINDOW interface ... to handle the event fired by the popup .....used this method after creating the popup window ...
    regards
    Yash

  • How to change default action "alarm" for all signatures ?

    My question belongs to a Cisco 1712 (128 MB, IOS 12.3T, SDM 2.5 installed):
    I'm trying to change the default action "alarm" to "alarm,reset,drop" for all signatures of my custom set.
    However doing so via SDM fails. First, it appears as being done correctly, but after compiling the signatures again, the default values are back there (in the same sense, I was unable to delete signatures, works just using the CLI).
    I followed the instructions at cisco.com:
    router(config)#ip ips signature-definition
    router(config-sigdef)#signature 6130 10
    router(config-sigdef-sig)#engine
    router(config-sigdef-sig-engine)#event-action produce-alert
    router(config-sigdef-sig-engine)#event-action deny-packet-inline
    router(config-sigdef-sig-engine)#event-action reset-tcp-connection
    router(config-sigdef-sig-engine)#exit
    However ip ips signature-definition is not understood by the router, so the procedure fails.
    Can you please assist me ?

    You can use IOS command-line interface (CLI) to change signature actions for one signature or a group of signatures based on signature categories. The following example shows how to change signature action to alert, drop and reset for signature 6130 with subsig ID of 10.
    router#configure terminal
    Enter configuration commands, one per line. End with CNTL/Z.
    router(config)#ip ips signature-definition
    router(config-sigdef)#signature 6130 10
    router(config-sigdef-sig)#engine
    router(config-sigdef-sig-engine)#event-action produce-alert
    router(config-sigdef-sig-engine)#event-action deny-packet-inline
    router(config-sigdef-sig-engine)#event-action reset-tcp-connection
    router(config-sigdef-sig-engine)#exit
    router(config-sigdef-sig)#exit
    router(config-sigdef)#exit
    Do you want to accept these changes? [confirm]y
    router(config)#

Maybe you are looking for