Capturing Blocked Mouse Events

Does anyone know of a way for a displayObject to receive
mouse events, as the target of that event (MOUSE_OVER, MOUSE_DOWN,
etc) if it happens to be overlapped by another display object. I've
tried setting the .mouseEnabled of the obscuring displayObject to
false, as well as setting its .mouseChildren to false, but no joy
there. Is there a way for the obscuring displayObject to pass the
event along to display objects that happen to be beneath it?
Is there a trick that I don't know of, or is this simply not
possible?
-thanks for taking the time to read this post.
-arthur

not with pure Java. JNI with native code

Similar Messages

  • Non modal PopUpManager blocking mouse events

    In our application we have a header, footer and center area.  We have a situation where we want to block the header and center area with a popup, but leave the footer area so it can be clicked on.  The code works fine and it all looks good, except the mouse events are blocked to the footer.  If we slightly resize the window (either with the mouse or programatically) it all "wakes up" and starts working.  I have tried all sorts of invalidateDisplayList, validateDisplayList, validateNow, etc.  I am throwing this out there to see if anyone else has had this problem and if there is something I am missing.  I can't easily share my code, but if I don't get a reply I'll put together a code example to see if I can recreate it.  Any ideas are very welcome.  Been scratching my head at this one for 3 days now. 

    I should point out that we are using "false" for the modal flag, just in case anyone was thinking that.  It all works fine once it "wakes up" through resizing, but I need to make that happen without the resizing.
    And we have tried all sorts of "callLater" behavior in conjuction with the invalidate/validate calls. 

  • Capturing desktop mouse events in java

    hi,
    i want to capture mouse events running outside JVM,how do i get
    it.example if click on some application for opening it.how will i get it in my java prog.
    bye

    There is an example,it works well .
    import java.awt.*;
    public class CatchMouse {
         public static void main(String[] args) {
              int limit=10;
              Point mp=null;
              for(int i=0;i<limit;i++){
                   mp=MouseInfo.getPointerInfo().getLocation();
                   System.out.println(mp.x+","+mp.y);
                   try{
                        Thread.sleep(500);
                   }catch(InterruptedException ie){
    }I hope it can help you.

  • Capturing global mouse events ?

    Is it possible to capture mouse event generated outside the application as well, as if the java app is running and the user opens a explorer and clicks at something, how can i capture that action ?

    not with pure Java. JNI with native code

  • Handling mouse events anywhere

    Hi,
    We have built an application with a Swing GUI and for automation and testing we would like to record all keyboard and mouse events to be able to play them afterwards.
    The keyboard events can be recorded easily with a KeyboardFocusManager but for the mouse events I still need a solution.
    The GUI consists of a JFrame containing several JPanels. When I add a MouseListener on the JFrame, its mousePressed and mouseReleased events are not called everytime I click somewhere on the frame. For example, when I click on a button inside one of the JPanels, the mouse event methods of the frame are not executed.
    Can somebody tell me how I can easily capture all mouse events in the GUI without adding MouseListeners in every JPanel??
    Thanks in advance...

    I know how to use the Robot class, that's not really the issue.
    What we are doing actually is writing keyboard and mouse events into a file.
    Afterwards we use the Robot class to playback the events in the file. This is no problem, I just don't know how I can easily intercept ALL mouse events in the GUI without adding mouseListeners in each component in the GUI.

  • HTML/JS: Capturing mouse events while Air is out of focus

    Hi,
    I've been trying to determine if it is possible to receive mouse events (like MOUSE_WHEEL) if the Air window does not currently have focus. I'd like my application to support the mouse wheel for scrolling while the cursor is over the application, without requiring the user to click the application and gain focus. My application uses JavaScript to scroll an unordered list within a DIV set to overflow:hidden (to prevent the native scrollbar from appearing).
    Thanks for your help!
    Andrew

    I doubt that AIR would pick up events fired while not having focus. Perhaps you could fake it by creating an AIR project that runs "fullscreen", but has a smaller active window. Anywhere your mouse went it would still capture the scrolling event, but you could conditionalize it so that it only worked in certain areas.

  • Capture All Mouse and Keyboard events even if java window NOT in FOCUS

    Hi All,
    Is this possible to capture all mouse and keyboard events even if java window is not in focus or is minimized. This java program should cature each and every event from the user once the program is started. Any help in this regard is appreciated!
    Thanks&Regards
    Sam

    I don't think you can. (without JNI)

  • Capturing mouse events from a loaded module.

    I've defined a module and have it to were the mouse
    coordinates (through mouse events) are updating bindable, public
    variables in the module itself.
    In the app parent app (that's loaded the module), i want to
    display the coordinates from the loaded module as it moves around.
    Like I said, I'm close, to where I capture and handle the
    move event in the module itself, I just need to access that info
    from the parent app, etc...
    Any help is appreciated.
    -fd

    not that it matters now, but i figured it out.
    thanks anyway...
    -fd

  • Capturing Mouse Events On MediaPlayer

    Hi,
    I have created a video conference application based on JMF. In this application I am using MediaPlayer control to play the rtp stream. Now I want to capture Mouse Events like MouseClick and MouseMove. But sorry to say that I am not getting any event on MediaPlayer control. I have tried this on other controls and successful. Can anybody tells me how to capture mouse events on MediaPlayer.
    --ibrar                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    Mouse Events may only be capture INSIDE the java application frame. SO, if your desktop is not a java component, you will not be able to capture the events.
    However, you could maybe use JNI to use native methods so as to get the location of the mouse...
    vincent

  • Capturing Mouse Events on Desktop??

    Is there a way to capture mouse events on the Desktop. I would like to be notified of the Mouse Location and Click Events for the entire Desktop.

    Mouse Events may only be capture INSIDE the java application frame. SO, if your desktop is not a java component, you will not be able to capture the events.
    However, you could maybe use JNI to use native methods so as to get the location of the mouse...
    vincent

  • Capture mouse events

    Hi all,
    i want to capture mouse events like mousedown, mouseup and mousemove by clicking on the tree node of <htmlb:tree>.
    Have any one some Idee?
    Greeting,
    ag

    Hi all,  
    i solved with your help the problem as follows:
    thank you all.
    PS: how can i Reward and close this topic?
    <%data l_replace type string.%>
    <%concatenate 'onSubmit(' '''' 'OnInputProcessing(this.id)' '''' ',this.id' ')' into l_replace.%>
    <bsp:findAndReplace find = 'onclick="' replace = 'onMouseDown="<%=l_replace%>;' >
    <bsp:findAndReplace find1 = "<td" replace1 = "<td bgcolor=green" >
          <htmlb:tree id     = "HDrag"
                      table  = "<%=p_0costtree %>"
                      title  = "Tree Left"
                      width  = "100%"
                      height = "100%"
                      onTreeClick = "TreeClicked"/>
        </bsp:findAndReplace>
        </bsp:findAndReplace>

  • JWindow blocking mouse wheel event?

    I have created a custom JPanel that acts as a container for another custom component that needs to receive mouse wheel events. When I place the custom JPanel in a JWindow the mouse wheel events do not get invoked, all though other mouse events work just fine. If I place the JPanel in a JFrame the mouse wheel events are invoked just fine (along with other mouse events).
    To keep things simple the JPanel handles the mouse listeners. Any idea why it would work when in a JFrame but not a JWindow?
    Edited by: skip1899 on Sep 21, 2009 7:20 AM

    The below sample code exhibits the behavior I am talking about on my system (1.6.0_16 on XP). Does it work for you? Is there something I am missing?
    import java.awt.event.MouseEvent;
    import java.awt.event.MouseListener;
    import java.awt.event.MouseWheelEvent;
    import java.awt.event.MouseWheelListener;
    import javax.swing.JFrame;
    import javax.swing.JWindow;
    public class TestWindow extends JWindow implements
       MouseWheelListener,MouseListener {
         public TestWindow() {
              setSize(200,200);
              addMouseWheelListener(this);
              addMouseListener(this);
      public static void main(String args[]) {
           JFrame  frame = new JFrame();
           frame.setSize(300,300);
           frame.setVisible(true);
           TestWindow win = new TestWindow();
           win.setVisible(true);
    public void mouseWheelMoved(MouseWheelEvent e) {
         System.out.println("Mouse Wheel Moved!");
    public void mouseClicked(MouseEvent arg0) {
         System.out.println("Mouse Clicked!");
    public void mouseEntered(MouseEvent arg0) {
         System.out.println("Mouse Entered!");
    public void mouseExited(MouseEvent arg0) {
         System.out.println("Mouse Exited!");     
    public void mousePressed(MouseEvent arg0) {
         System.out.println("Mouse Pressed!");     
    public void mouseReleased(MouseEvent arg0) {
         System.out.println("Mouse Release!");
     

  • Can i capture the the mouse events

    i am writting application in which i have to send the screen image to client as well as mouse events and keyboard events. i am successfull in doing screen image but mouse events are not traped
    please send me any suggestion about how i will do it.
    [email protected]

    Have you tried to implement MouseListener?

  • Mouse events don't work on a button from a panel ran in a DLL

    Hi.
    I have a DLL that loads a panel.
    Since it's a DLL I can't do the RunUserInterface() function, because the DLL would be stuck waiting for the panel events.
    I only do the LoadPanel().
    When I click with the mouse on one of the buttons, the pushing down event (simulating the button being pressed) doesn't happen and the callback doesn't run.
    But if I press the tab button until the focus reaches the button and press Enter, the callback of the button is executed.
    An even more interesting aspect is that this happens when I call the DLL on TestStand, but on an application of mine that calls the DLL just for debug everything works fine.
    How can I enable the mouse events?
    Thanks for your help.
    Daniel Coelho
    VISToolkit - http://www.vistoolkit.com - Your Real Virtual Instrument Solution
    Controlar - Electronica Industrial e Sistemas, Lda
    Solved!
    Go to Solution.

    Hello Daniel,
    I got surprised when I read your post, because I am experiencing something almost the same as you do.
    I have a DLL (generated by an .fp instrument driver I wrote) which performs continious TCP communication with the UUT.
    It starts 2 threads, each for reading from one of the 2 different IPs the UUT has.
    Another DLL tests this UUT (with the help of the communication DLL above) by exporting functions to be called by TestStand steps.
    If the second DLL wants to display a CVI panel in order to wait for the user response or displays a popup (MessagePopup, ConfirmPopup, etc), user cannot press the buttons.
    Actually, there is a point your program and mine differ. I call RunUserInterface and the button's callbacks call QuitUserInterface, so the execution continues after a button is pressed. The problem is buttons cannot be pressed. I also tried looping on GetUserEvent  but it did not solve the problem.
    There are 2 findings:
    1. I had a small exe to test my instrument driver DLL and the popups in it worked pretty well (this coincides with Daniel's findings).
    2. We workedaround the problem by shutting down the communication threads in the instrument driver DLL before the popup appears and restrating them afterwards. Although they are separate threads in another DLL, they were somehow blocking user events on another DLL running.
    S. Eren BALCI
    www.aselsan.com.tr

  • Event case missing mouse events on active-x component

    I am using a Treeview and capturing selections in the tree using mouse events (event structure). I have a problem where approx 3 out of 15 mouse events are not actioned by the event structure - has anyone else had this problem or is there any suggestions?
    Thanks.

    Could you post a copy of your code that demonstates this?
    I have experimented with this control and its events.
    We may be able to help if we have soething to look at.
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

Maybe you are looking for

  • Backup PROD Instance

    Hi We have a new R12(12.0.4) PROD instance db - 45 gigs apps - 27 gigs inst - 0.4 gigs May I know the best way to get started taking backup of DB & apps. We have not yet RMAN configured over here. Some useful links will help Thanks JIL

  • Help...Lost library

    Have just downloaded itunes and spent ages importing cds to library. I have located my library folder in an external hard drive. Everything was going well till I closed itunes, when I opened it back up my music wasn't in the library. It is still on t

  • BRBACKUP error on DEV server

    Dear all , i got error while i am taking backup , pls check the below logs . BR0278I Command output of '/usr/sap/IRD/SYS/exe/run/backint -u IRD -f backup -i /oracle/IRD/sapbackup/.bedyatsq.lst -t file_online -p /oracle/IRD/102_64/dbs/initIRD.utl -c':

  • Exec weird behavior

    Good evening. I have some problem using the exec() method of the Runtime class. The problem is that with certain applications, the exec method does not seem to do anything(moreover with D.O.S based applications). For example, when I run a DOS applica

  • How do you create a new local zone w/o all the global zone packages

    I have serveral servers with hundreds of packages added w/o the pkgadd -G option. Everytime I create a new local zone, the local zone inherits all the global zone packages. Is there a way to modify maybe the packaging DB to stop the automatic inherti