Confused on event handeling

Ok I know the difference between low level and schemantic events. But, what if I want a component that is supposed to use schemantic events to use a low level event? Her is the deal, I have a JList that has a ListSelectionListener. I used it, but it doesn't do what I want. I want to lisen for a double click. If I use a mouse event, which seems my only option, the I have to use a low level event that listens for a double click anywhere on the frame, and not just attached to the JList. If that is the case, then does that mean I have to write code to tell where the double click occured and if it were in the list then handle it, if not then ignor it? Is there no way to attach a low level event to a specific component instead of having it listen to all components on the frame, as well as the frame itself? But, if I could do that then it wouldn't be a low level event, right?

You could just use the mouse listener to find the possition of the mouse, and check to see if it's within the rectangle that the component is located in.
-Jason Thomas

Similar Messages

  • AS 3: event handeling

    I thought sending a var directly to the event handeler would
    work but i was wrong. How can you adjust/conditional a function so
    that when one button is clicked it does one thing and the other
    another?

    Check out all the stuff that is in the MouseEvent. There is a
    target property that tells what was clicked on. So:
    trace(event.target);

  • Confusion abt event count

    hi all i have a confusion abt the event count value for the signatures.
    say if i set the event count value to 5 then the signature will fire only if the event ocours 5 times right.
    does it mean that when the first time the attack packet comes the signature is not fired and the action is not taken. the signature action is taken only if it hits 5 times.
    is this what it means. and will the event be written to the event store.
    can someone pls clarify this doubt.
    regards
    sebastan

    Event action rules are a group of settings you configure for the event action processing component of the sensor. These rules dictate the actions the sensor performs when an event occurs
    http://www.cisco.com/en/US/products/hw/vpndevc/ps4077/products_configuration_guide_chapter09186a00803eb027.html

  • Key down event handeling when the VI isn't active

    Hi
      I've written a simplel VI that increases or decreases a numerical indicator depending on which key is pressed on the keyboard. But this only works when the VI window is active (the titlebar is blue and not gray). Is there anyway to listen for the key-down event even though the VI is not active?
    In advance thanks
    Georg

    I recently ran into a problem with the Acquire Data.
    See http://forums.ni.com/ni/board/message?board.id=170&message.id=147363
    Just in case....

  • Event handeling variable changes. Is this possible?

    Hey,
    I'm working on a java-beans project and I am trying to come to find a way to signal an event when a variable changes. Basically looking for a way to constantly send the refreshing data to the listener bean.
    I can easily get it to work send the data with pushing a button but this is supposed to monitor a constantly changing temperature and send it to the listener bean.
    Any ideas?
    Thanks.

    Use Timer or ur own Thread.

  • Event handlers - subscribed

    Hi,
    In the controller I have created an event and a method to fire it. In the view, I need to create a "handleControllersEvent" event handeler, but I cannot subscribe the event from the controller because the dropdown is empty.
    What is necessary (or what have I missed) so that the events from the controller are visible in the subscribed event ddlb when creating an event handler in a view.
    Note:  I am using the popup dialog tutorial as a referenence for my application.
    Thanks for the input.
    Regards,
    faB

    Hi faB,
    open your view, go to "Proprties", press "Add" and add your cotroller.
    Regards, Maxim R.

  • Event and Process Types - Urgent

    Hi All,
    I am little confused between Events and Process Types in a PC. How an event can be used in a PC ?
    I know that SM62- To create event, SM64 – Execute Event. But how its used in PC.
    Thanks in adv for your reply.

    Events can be used to start the process chain based on the event raise. In order to use the events
    1. Create an event using SM62
    2. Go to your process chain start variant and select the start type as After event and give the event name which you created and then activate and schedule the process chain
    3.Now go back to sm64 and trigger the event that should actually start the Process chain. This can be monitored using the Process chain log.
    Regards,
    Jagadeesh.

  • Exception handeling at different layer!

    Hello All,
    My apps design has the following layer: JSF(front-end) -> Business Delegates (POJO) -> EJB3 (Session Facade) -> POJO (DAO) -> Hibernate --> DB. Now i am little confused for exception handeling. I have following approaches in mind.
    1- Propogate my exceptions from Hibernate all the way to business delegates and handel all of them there. I am not sure this will be a good approach. But it will allow my to have one place to handel all exception.
    2- Handel exception at differnet levels. DB related expceptions IN Daos, Logic and EJB related exceptions in Bussiness Delegates.
    Please suggest me better of these or purpose a new suggestion.
    Thanks

    generally when something blows in a DAO, you want your application to know about it. Otherwise you can get into a situation like this:
    1) business logic calls DAO
    2) DAO throws and handles its own exception
    3) business logic goes on to work on data in an unknown state
    That doesn't work. At 3) you want to catch the exception, log it and possibly roll back an entire transaction, effectively ending the business logic and possibly going on to some error handling routine, like showing an error page.

  • Event of SAP controls

    Dear All expert,
    I am confused with event register function. For example , for example event 'Hotspot' only need code
    'Set handler....' to register, then it will be triggerred.But for event 'data changed' , It is need call method 'REGISTER_EDIT_EVENT'.
    addtional to registerred.
    Is there any regulaion for the event register ? Or only case by case ?
    Thanks for your reply in advance !

    Is there any regulaion for the event register ?
    Unfortunatelly, no. Some of them require additional event activation by calling register... method, some don't.
    Or only case by case ?
    Yes. You can however refer any ALV basic document, GUI control demo programs and you will get the feeling which of them require additional activation.
    Regards
    Marcin

  • Any event is there for continues touch

    Hello Sir,
    im using cvi 5.5 ver.
    i attached one image in that i  using UP command button.....im confused which EVENT i should use for continues preSs from finger in touch screen...
    if my finger is in UP command button in touch screen...i will supply continues voltage....if i removed my finger from UP command button im not supplying voltage....
    i think in CVI dont have EVENT for contiunes press...
    Attachments:
    hmi.PNG ‏17 KB

    Yould try using EVENT_LEFT_CLICK and EVENT_LEFT_CLICK_UP, but I'm not usre the second is already available in cvi5.5. If it's not, then you should look in the help for EnableExtendedMouseEvents function and its usage; try looking also at this example that makes use of that command.
    Proud to use LW/CVI from 3.1 on.
    My contributions to the Developer Zone Community
    If I have helped you, why not giving me a kudos?

  • Firing keydown event from software`

    I would like to know how to fire a keydown or mousedown etc. event from the program itself. Without actually pressing the keys or buttons.
    Something to do with dynamic event programming?

    Dynamic events are one of the best features added to LV 7.0 and have saved me a few times.  The idea is that you can add events which an event handeler can register for the only thing you have to do it decide on the parameters which define the event. basically you craete a user event, register for the event, pass the event to the dynamic event terimina (right click on the event structure and "show dynamic event terminal" then add the event case just as you do with a native event.  In addition you can turn on and off the dynamic events as needed.  I will post an example I did later if it would help.  Spent the time to learn dynamic events, well worth the effort.
    Paul
    Paul Falkenstein
    Coleman Technologies Inc.
    CLA, CPI, AIA-Vision
    Labview 4.0- 2013, RT, Vision, FPGA

  • Event delegation model VS Listener interfaces?

    hello again,
    i got confused with "event delegation model and Listener interfaces".are both of these things are same or they are completely opposite, or they go hand in hand?
    can any body help me understand that concept.
    thanks

    event delegation would be the concept, passing out events to interested parties. listener interfaces and registering them with the event sources would be the implementation of that concept.

  • Dynamic event keys

    Hello,
    Could anyone let me know if the filter for an event inside the
    workflow be dynamically set , be it a JMS Event or Plugin Event ?
    Thank You.
    Sangeetha

    Dynamic events are one of the best features added to LV 7.0 and have saved me a few times.  The idea is that you can add events which an event handeler can register for the only thing you have to do it decide on the parameters which define the event. basically you craete a user event, register for the event, pass the event to the dynamic event terimina (right click on the event structure and "show dynamic event terminal" then add the event case just as you do with a native event.  In addition you can turn on and off the dynamic events as needed.  I will post an example I did later if it would help.  Spent the time to learn dynamic events, well worth the effort.
    Paul
    Paul Falkenstein
    Coleman Technologies Inc.
    CLA, CPI, AIA-Vision
    Labview 4.0- 2013, RT, Vision, FPGA

  • How to get attribute values from one view to another

    HI all,
    Thx in Advance..
    I have 2 view like v1,v2.In v1 i used one attribute values from "get single attribute" method.And i need the same values in v2 screen.For this i did in v1 outbound plugs , i mentioned the parameter name . How can i get the same values in  v2.

    Hi chandru ,
    you said you declare the parameters in the Outbound Plug of V1.  now go to view V2 inbound plug Tab and creat one inbound plug
    double click on the plug name .it will navigate you to the event handeler method . Now add the outbound parameter variables in the
    parameters
    For example : V1firing the navigation plug
    a type string " defined in parameter
      wd_this->fire_out_to_view2_plg(
        a =      'ABCD'                           " string
    you can retrive the value freely in v2 inbound event handeler
    a type string " defined in parameter
    *   set single attribute
        lo_el_context->set_attribute(
          name =  `TEXT`
          value =  a )." here you will get the 'ABCD'.
    regards
    Chinnaiya P
    Edited by: chinnaiya pandiyan on Jun 23, 2010 7:12 PM

  • Close and open subVIs from main VI

    Hi,
    I am working on an issue. I have two subMainVI and both of them has have own FrontPanel. I want to merge these two subMainVI into the program and call them repeatadly with the another Main VI front panel. Simply, I when the program starts, the mainVI FP open and there are two buttons. When user clicks the button A, the subVI A FP open and it executes (some user events...) till the user close the VI (the standard cross button). Then the user can click the button A again or for a change the button B and then the subVI B starts to execute (event again). The program should run till the main VI (with the two buttons) is closed.
    I tried to do something similar with one subVI, but I was not succesfull. I was able to open and close the subVI once, but then the app gets frozen...
    I do not have much experience with events...I believe it may be easy for someone...I would appreciate some simple code example...
    Attachments:
    pokus.zip ‏19 KB

    billko wrote:
    camerond wrote:
    billko wrote:
    camerond wrote:
    Here's an easy way to do it, using a WHILE loop, T/F Case structures and local variables.
    Cameron
    It may be an easy way to do it, but it's basically bad programming.  You shouldn't use while loops to poll buttons when you can make it event-driven.
    But if he's confused with events, this does work. It may not be the most elegant solution, but that doesn't make it "bad" programming unless it interferes with his tasks. Computers are so fast and have so much memory now, that you don't always have to do things the most efficient way to get them done. Just IMHO, it's better to help someone with something he can understand than to give him a black box with magic inside, unless his goal is to learn the magic now.
    TIMTOWTDI.
    Cameron
    Understood, but teaching someone bad habits is not good, either.  Best to learn the right way or it will cause problems down the line.
    [edit]
    Granted that a QMH might be too complicated for a beginner, but then a simple event-driven structure would've been a better choice.
    It's never a good idea to peg a CPU core to just poll a button.  Instead, we should be trying to help the OP understand the event structure.  I looks like they already understand it enough to use dynamic events.
    They're only problem was not unregistering the events.  If you don't unregister, then the next registration will likely not work, which is what happened here.  But the easier solution is to just not use the dynamic events since the VI Panel Close event is a default one that you do not need to register for.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

Maybe you are looking for