Having picked up a mouse event, pass it to parent component.

This is further to my table cell hover, which is otherwise working.
I track the mouse accross the table using an invisible child component, and when the mouse leaves it, move the child onto the new cell position.
The problem is that, while the mouse is over the invisible component, that component is grabbing all the mouse events. My table also wants to detect mouse events (though it's interested in clicks).
The obvious thing is, after they've been dealt with and the child component level, to transfer the events to the table (having mapped the mouse coordinates). However all the processEvents methods in components like JTable are protected.
I suppose I could extend JTable and add a method to get arround protected, but that's nasty, especially since a lot of my JTables are already subclassed.

I had to do just this. I have JLabel's in a JPanel. The JPanel is in a LayeredPane. When I mouse over the JLabels, they grab the mouse events... which I don't want. I want the LayeredPane to get it.
So in the JLabel, I do:
      * Don't send to parent what you don't have to. Things like tooltips will
      * be broken if this is not handled carefully...
     public void mouseClicked(MouseEvent e) { }
     public void mouseMoved(MouseEvent e) { }
     public void mouseEntered(MouseEvent e) { }
     public void mouseExited(MouseEvent e) { }
     public void mouseReleased(MouseEvent e) { machine.dispatchToParent(e);}
     public void mouseDragged(MouseEvent e) { machine.dispatchToParent(e);}
     public void mousePressed(MouseEvent e) { machine.dispatchToParent(e);}(the "machine" above is a JPanel). Now in the JPanel, aka "machine", I do:
Point point; int comp_x, comp_y; // for component with respect to this machine
public void dispatchToParent(MouseEvent e) {
     point=((JComponent)e.getSource()).getLocation();
     //System.out.println("Dispatching: " + e.getX() + " " + e.getY());
     //System.out.println("Component position: " + ((JComponent)(e.getSource())).getLocation());
     if (e.getButton() > 0) MsgIFrame.println("ME at: " + comp_x + "," + comp_y + " button: " + e.getButton() );
     if (e.getButton() > 1) {
          popup(e);
          return;
     comp_x=(int)point.getX(); comp_y=(int)point.getY();
     comp_x+=this.getX(); comp_y+=this.getY();
     e.translatePoint(comp_x, comp_y);
     room.getLayeredPane().dispatchEvent(e);
}Above, the "room" is a JInternalFrame with a LayeredPane inside it, as you can see. I do a little translating so the LayeredPane gets the event in its coordinate space, not those of its Components.

Similar Messages

  • How to throw the mouse event to a upper level component?

    For example: a panel using absolute layout, and there is a label on it.
    Now when mouse clicked on the label, i do not want the label but the panel to get the mouse event , so that i can get the mouse click point's x and y in the panel.
    How to implement it?
    Thanks a looooooooooooot for ur help
    Best Regards

    try this
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    class Testing extends JFrame
      public Testing()
        setSize(100,75);
        setLocation(300,200);
        setDefaultCloseOperation(EXIT_ON_CLOSE);
        final JPanel p = new JPanel();
        JLabel lbl = new JLabel("Click Me");
        lbl.setToolTipText("OK");
        lbl.setBorder(BorderFactory.createLineBorder(Color.BLACK));
        p.add(lbl);
        getContentPane().add(p);
        lbl.addMouseListener(new MouseAdapter(){
          public void mousePressed(MouseEvent me){//match method name
            p.dispatchEvent(me);}});
        p.addMouseListener(new MouseAdapter(){
          public void mousePressed(MouseEvent me){//with this method name
            System.out.println("Panel clicked");}});
      public static void main(String[] args){new Testing().setVisible(true);}
    }

  • Mouse Events are slow

    Hello everyone,
    I'm currently working on an standard as3 (1024x768) app that
    is running inside a chromeless Air window to take advantage of the
    transparency.
    All my tests where done using windows XP professional and AIR
    1.0 (the same problem existed in beta3).
    The issue I'm having is related with Mouse Events. Somehow
    the events take a lot of time to reach the swf file when the user
    clicks inside the transparent window.
    It's natural that the app runs slower inside a transparent
    window (the framerate drops) but I wasn't expecting the clicks to
    suffer from such delay (it takes sometimes 2-5sec).
    The app is very CPU intensive and the transparencies make it
    worse. Something inside the AIR framework is not dispatching the
    events properly.
    I say this because I tried using the virtualMouse class from
    senocular together with a socket to simulate the mouse clicks and
    that did the trick.
    In conclusion:
    Something in the AIR framework for windows XP is messing up
    the dispatch of the Mouse events when the app is under heavy cpu
    usage inside a chromeless window. I click on the window and it
    takes 1-2sec to receive the click event.
    However when I dispatch the MouseEvent.CLICK myself using
    the virtual mouse class the application immediately receives the
    event.
    I know this is a strange bug and not many people will have
    this problem, but I would like to know from someone with knowledge
    of the runtime why this could be happening.
    Thank you
    Tiago Bilou

    Hello everyone,
    I'm currently working on an standard as3 (1024x768) app that
    is running inside a chromeless Air window to take advantage of the
    transparency.
    All my tests where done using windows XP professional and AIR
    1.0 (the same problem existed in beta3).
    The issue I'm having is related with Mouse Events. Somehow
    the events take a lot of time to reach the swf file when the user
    clicks inside the transparent window.
    It's natural that the app runs slower inside a transparent
    window (the framerate drops) but I wasn't expecting the clicks to
    suffer from such delay (it takes sometimes 2-5sec).
    The app is very CPU intensive and the transparencies make it
    worse. Something inside the AIR framework is not dispatching the
    events properly.
    I say this because I tried using the virtualMouse class from
    senocular together with a socket to simulate the mouse clicks and
    that did the trick.
    In conclusion:
    Something in the AIR framework for windows XP is messing up
    the dispatch of the Mouse events when the app is under heavy cpu
    usage inside a chromeless window. I click on the window and it
    takes 1-2sec to receive the click event.
    However when I dispatch the MouseEvent.CLICK myself using
    the virtual mouse class the application immediately receives the
    event.
    I know this is a strange bug and not many people will have
    this problem, but I would like to know from someone with knowledge
    of the runtime why this could be happening.
    Thank you
    Tiago Bilou

  • Trying to create a surface  with multiple images with mouse events

    novice programmer (for a applet program)
    hi trying to create a surface i.e jpanel, canvas, that allows multiple images to be created.
    Each object is to contain a image(icon) and a name associated with that particular image. Then each image+label has a mouse event that allows the item to be dragged around the screen.
    I have tried creating own class that contains a image and string but I having problems.
    I know i can create a labels with icons but having major problems adding mouse events to allow each newly created label object to moved by the users mouse?
    if any one has any tips of how to acheive this it would be much appreciated. Thanks in advance.
    fraser.

    This should set you on the right track:- import java.awt.*;
        import java.awt.event.*;
        import javax.swing.*;
        public class DragTwoSquares extends JApplet implements MouseListener, MouseMotionListener {  
           int x1, y1;   // Coords of top-left corner of the red square.
           int x2, y2;   // Coords of top-left corner of the blue square.
           /* Some variables used during dragging */
           boolean dragging;      // Set to true when a drag is in progress.
           boolean dragRedSquare; // True if red square is being dragged, false                              //    if blue square is being dragged.                            
           int offsetX, offsetY;  // Offset of mouse-click coordinates from
                                  //   top-left corner of the square that was                           //   clicked.
           JPanel drawSurface;    // This is the panel on which the actual
                                  // drawing is done.  It is used as the
                                  // content pane of the applet.  It actually                      // belongs to an anonymous class which is
                                  // defined in place in the init() method.
            public void init() {
                 // Initialize the applet by putting the squares in a
                 // starting position and creating the drawing surface
                 // and installing it as the content pane of the applet.
              x1 = 10;  // Set up initial positions of the squares.
              y1 = 10;
              x2 = 50;
              y2 = 10;
              drawSurface = new JPanel() {
                        // This anonymous inner class defines the drawing
                        // surface for the applet.
                    public void paintComponent(Graphics g) {
                           // Draw the two squares and a black frame
                           // around the panel.
                       super.paintComponent(g);  // Fill with background color.
                       g.setColor(Color.red);
                       g.fillRect(x1, y1, 30, 30);
                       g.setColor(Color.blue);
                       g.fillRect(x2, y2, 30, 30);
                       g.setColor(Color.black);
                       g.drawRect(0,0,getSize().width-1,getSize().height-1);
              drawSurface.setBackground(Color.white);
              drawSurface.addMouseListener(this);
              drawSurface.addMouseMotionListener(this);
              setContentPane(drawSurface);
           } // end init();
           public void mousePressed(MouseEvent evt) {
                  // Respond when the user presses the mouse on the panel.
                  // Check which square the user clicked, if any, and start
                  // dragging that square.
              if (dragging)  // Exit if a drag is already in progress.
                 return;           
              int x = evt.getX();  // Location where user clicked.
              int y = evt.getY();        
              if (x >= x2 && x < x2+30 && y >= y2 && y < y2+30) {
                     // It's the blue square (which should be checked first,
                     // since it's in front of the red square.)
                 dragging = true;
                 dragRedSquare = false;
                 offsetX = x - x2;  // Distance from corner of square to (x,y).
                 offsetY = y - y2;
              else if (x >= x1 && x < x1+30 && y >= y1 && y < y1+30) {
                     // It's the red square.
                 dragging = true;
                 dragRedSquare = true;
                 offsetX = x - x1;  // Distance from corner of square to (x,y).
                 offsetY = y - y1;
           public void mouseReleased(MouseEvent evt) {
                  // Dragging stops when user releases the mouse button.
               dragging = false;
           public void mouseDragged(MouseEvent evt) {
                   // Respond when the user drags the mouse.  If a square is
                   // not being dragged, then exit. Otherwise, change the position
                   // of the square that is being dragged to match the position
                   // of the mouse.  Note that the corner of the square is placed
                   // in the same position with respect to the mouse that it had
                   // when the user started dragging it.
               if (dragging == false)
                 return;
               int x = evt.getX();
               int y = evt.getY();
               if (dragRedSquare) {  // Move the red square.
                  x1 = x - offsetX;
                  y1 = y - offsetY;
               else {   // Move the blue square.
                  x2 = x - offsetX;
                  y2 = y - offsetY;
               drawSurface.repaint();
           public void mouseMoved(MouseEvent evt) { }
           public void mouseClicked(MouseEvent evt) { }
           public void mouseEntered(MouseEvent evt) { }
           public void mouseExited(MouseEvent evt) { }  
        } // end class

  • Mouse events listener

    I'm having trouble listening for mouse events in Bridge CS6.
    This example script works well in Photoshop and Toolkit, but not in Bridge:
    var w =new Window ("dialog");
    var b = w.add ("button", undefined, "Qwerty");
    b.addEventListener("click", function (k){whatsup (k)});
    function whatsup (p)
      if(p.button == 2){ $.writeln ("Right-button clicked.") }
      if(p.shiftKey){ $.writeln ("Shift key pressed.") }
      $.writeln ("X: "+ p.clientX);
      $.writeln ("Y: "+ p.clientY);
    w.show ();
    Other event types like resize or focus work well.
    The event types that seem to be broken are: mousedown, mouseup, mouseover, mouseout, click
    Is there a work-around to this problem?

    Only the video edition team is using CC.
    We tried 2 times, on May and July to install 1 PC with CC and the apps (Photoshop and Bridge included) crashed several times.
    CS6 still is more stable.
    For my surprise, 90% of the code we have developed still works on photoshop/Bridge and now we are installing our 'private' company cloud network so my team will be editing also the photos from US on real time.
    Recently I have had success in discovering simple tricks regarding Bridge that anyone needs or uses, but crucial to hard workflows like the one we have.
    In that sense, may be next season we will be able to upgrade to cloud CC
    We'll see…

  • JLayeredPane not recieving mouse Events.

    When I try to add a MouseListener to a JLayeredPane, it does not pick up the mouse events at all. Or when I even try to add it to the only JPanel I added to the LayeredPane, still no mouse events. I never set the glassPane to visible, so I have no idea why the mouse events aren't going through.

    Your code won't compile. For one the layered constructor is within your MouseAdapter anonymous class. You are far better off posting compilable code here.
    edit: also, you are not overriding MouseAdapter methods. That would help get your code to work.
    Try compiling with an @Override annotation to see what I mean:
      private MouseAdapter exitListener = new MouseAdapter()
        @Override
        public void MousePressed(MouseEvent e) // does this compile?  MousePressed != mousePressed
          System.out.print("yrs");
      }capitalization matters:
    MousePressed != mousePressed
    Edited by: Encephalopathic on May 9, 2009 3:02 PM

  • Passing Param to Mouse Event in AS3

    Hello All,
    I want to make a tooltip box , when I mouse over an object it will appear with the object color and some other data
    how can I send the color param and other param to mouse event?
    Thanks in Advance

    Hi,
    Maybe this will help you :-
    http://www.ultrashock.com/forums/actionscript/as3-adding-parameter-to-eventlistener-104729 .html
    http://www.orlandmedia.com/blog/actionscript-3/passing-parameters-to-a-mouseevent-listener /

  • 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.

  • Working with mouse events in Strobe's Widget classes

    I'm adding a caption on/off toggle button (classname CaptionButton) to the ControlBar class of Strobe Media Playback 1.5.1, and I'm having a difficult time understanding how mouse events are passed to child widgets of a ButtonWidget. In my CaptionButton class (which extends ButtonWidget), I add an instance of another widget, ListWidget, that extends Widget, and I show/hide this ListWidget with a mouse click event in the CaptionButton. The ListWidget is a composite class with a List component from Flash CS5, and the cell renderers in the List component do not respond to mouse events (over, selected, etc). How do I enable this type of mouse interaction within a Widget class? With the VolumeWidget, it looks like all mouse events are recreated and then controls are manually positioned according to the event properties, but this would be rather difficult with a component that has a virtual layout like List component. Any suggestions would be greatly appreciated.
    -Robert

    Ok, found that WidgetHint sets mouseChildren = false, etc. But I have a new problem---how do I stop autoHide timer while the user is interacting with a child widget? I was looking at the VolumeWidget that is used from the MuteButton widget, but I don't see how it stops the autoHide timer from enacting.

  • Iocane: poison the rodent (simulate X11 mouse events from keyboard)

    Iocane: the colorless, oderless, tasteless poision that will rid your system of its rodent infestation.  Though no promises about its effectiveness against Rodents Of Unusual Size.
    Iocane simulates mouse events from the keyboard.  Iocane can be passed a few parameters which - ideally - could each have a key binding in your favorite window manager.
    If iocane is called with no parameters it starts in interactive mode (which currently lacks documentation ... hey, I just wrote this this morning).  In interactive mode the directional arrows or h/j/k/l keys move the mouse cursor.  The number keys simulate button presses (1 = left button, 2 = middle, 3 = right).  The page up and page down keys simulate mouse wheel activation.  "q" quits from interactive mode returning any grabbed keys to their normal behavior.  Key bindings are all controlled from a simple rc file.
    Iocane can also be passed a series of commands on the command line or the filename for a script file with a list of iocane commands.  Iocane can also read command from its standard input.
    Iocane is conceptually similar to some functions of xdotool, but iocane should work under any window manager (or no wm at all), is much smaller, and the interactive mode allows for a sequence of many actions without the program having to start up and close down many times in rapid succession.
    Please report bugs or feature requests here.  Iocane is currently 127 lines of C, and it will remain small; in other words, features will only be added if the can be added without substantially increasing resource use.
    EDIT: Version 0.2 is now in the AUR
    Last edited by Trilby (2012-11-03 02:23:15)

    Any arbitrary number of buttons should be easy enough to simulate - provided the Xserver actually responds to events with that button number.  An update I'll push to github tomorrow will include a few changes, including buttons 1-9, but if there is need/desire I could increase that.  Sticking to 1-9 allows for the computationally cheaper hack of converting a string to a number by simple substracting 48 from the value of the first character; numbers greater than 9 would require the use of atoi() or some funky conditionals.  In the grand scheme of things this is fairly trivial, but unless there is a real reason to use more than 9 mouse buttons I'd prefer to keep the lighter code.
    Passing a window name and getting it's coordinates is possible but after considering it I've decided it wouldn't fit well in iocane.  The reason being that to do a half-arsed job of it would be pretty easy.  To do it properly, however, it would take quite a bit of scanning through recursive calls to XQueryTree, polling atoms/wmhints, matching strings, checking for subwindows in the case of reparenting window managers, and a bunch of other nonsense ... all to get two coordinates.
    However iocane will play nicely with any tool that will provide those coordinates from a given window name, so I can imagine and invocation such as the following to move the mouse 10 pixels right and down from the top left of a window - lets call it FlamingSquirrel - and simulate a click there:
    iocane $(cool_app FlamingSquirrel) : move 10 10 : button 1
    Currently that could only be done from a command line invocation, not from a script or interactive session, as it requires shell processing for the command substitution.  I can add support for this type of invocation in scripts and interactive mode as well.  Then all you need to do is find (or write) a program that will give coordinates for a window given a title/name.  I suspect such a program probably exists out there, or if you are comfortable with C, I could give you the starting framework for it as I made something that would have much code in common for another task on these forums (it's in jumpstart.c in the "misc" repo on my github).
    In fact, you could use the following
    xdotool mousemove --window FlamingSquirrel 0 0 && iocane offset 10 10 : button 1
    Though if you are using xdotool anyways, I'm not sure if iocane would serve much of a purpose, unless you just prefer iocane's syntax.
    Last edited by Trilby (2012-11-01 00:21:14)

  • Firefox mouse event not behaving the same on PC and Mac computers

    I use the FCKEditor and having a very strange problem. When I click on the FCKEditor's editing area, the keyboard gets disabled untill I click the mouse somewhere outside of the editing window. The problem only happen on Firefox (3.6.10) on Mac computer (Snowleopard 10.6.4). Doing exactly the same steps on PC works without any problem.
    What I want to know:
    - Is it possible that the Firefox on Mac is different than the PC in handling mouse events? Or some other areas?

    Sounds more that Firefox is treating that editor area as read-only.
    Start Firefox in [[Safe Mode]] to check if one of your add-ons is causing your problem (switch to the DEFAULT theme: Tools > Add-ons > Themes).
    See [[Troubleshooting extensions and themes]] and [[Troubleshooting plugins]]

  • Disabling mouse events

    hi,
    I am having objects on a JFrame that respond to mouse events. I would like to know how I can disable these events. I use the addMouseListener to register a mouse event on something. Is there a way to remove or to deregister mouse events.
    I basically have a game of tiles on a JFrame and I am going to have the human player play against the computer. I want to be able to have turns; computer and human player turn.

    removeMouseListener()

  • Using activex component in openGL app:  mouse event issues.....

    i'm trying to get the Flash ActiveX control to work in an
    OpenGL app. so far i've managed to get the bitmap data and map it
    to a texture succesfully. but i'm having problems getting the mouse
    interaction to work.
    i get an hWnd from IShockWaveFlash's IOleWindow. when i send
    mouse messages to it, the mouse is interpreted correctly by
    actionscript (for example, i have a custom mouse cursor tracking
    _xmouse, _ymouse which works fine).
    however, buttons do not behave correctly. rollover is
    erratic, and only in rare circumstances can i get a button's
    onPress handler to fire.
    am i sending the mouse events in correctly? any ideas of any
    other way to send them in?

    Thank you for you mail,
    After I read this article
    http://digital.ni.com/public.nsf/3efedde4322fef198​62567740067f3cc/610540bb3ea4ebdd862568960055e498?O​penDocument
    I realized that ActiveX events are not supported on CVI 5.01 at all since
    its introduced as a new feature of CVI 5.5
    "Azucena" wrote:
    >Daniel,>>Have you tried the function CA_RegisterEventCallback function?
    (I am using>CVI 5.5)>>This function is used by the functions generated by
    the Automation>Controller Instrument Driver Wizard.>It is not intended to
    be used directly.>>It basically registers a callback for an ActiveX Automation
    server object>event.>To register the callback, you must specify the CAObjHandle
    of the server>object from which you want to receive events.>>W
    ith CVI 5.5,
    there is an example for IE with Active X under the>samples/activeX directory.>>Hope
    this helps,>>Azucena>>"Daniel Bentolila" wrote in message>news:[email protected]..>>>>
    Has anybody tried to capture an ActiveX component event in a CVI>application>>
    ?>>>> for example I've created a new instance of the Internet Explorer>application>>
    from the CVI , using the ActiveX Automation controler I choosed the>Microsoft>>
    internet controls then I selected IWebBrowser2 and the IWebBrowserEvents2>>
    classes and generated the fp file for the CVI.>> Under the the IWebBrowserEvents2
    I see there are events fucntion for>example>> OnQuit, and I wanted my CVI
    app. to attach the quit event when the user>closes>> the IE window.>> Now
    at this point I expected to find some mechanism that let me to install>>
    some callback function where I can put my customised code to the quit>event,>>
    somehow I have to tell the IE to call my function whenever the OnQuit>callback>>
    fun
    ction is attached and I don't know how to do this.>>

  • Mouse Event Listeners with Full Screen JMF

    I am trying to call the mouseClicked function from JMFs addMouseListner API in order to stop a media file when a user clicks the mouse button (or a key) like in a screensaver
    I am able to access the function just before the player is started but once the media file begins to play I am not?
    Here is the code I am using for the player and listener:
    public static void main(String[] argv) {
    JMF myFrame = new JMF("Java Media Framework Project");
    myFrame.setUndecorated(true);
    myFrame.show();
    Dimension screenDim =Toolkit.getDefaultToolkit().getScreenSize();
    myFrame.setSize(screenDim.width, screenDim.height);
    myFrame.setResizable(false);
    myFrame.addMouseListener(
    new MouseAdapter(){
    public void mouseClicked(MouseEvent e) {
    System.out.println("Mouse was clicked");
    System.exit(0);
    myFrame.play();
    Are there any other methods to get around this? Is it possible to embed a JMF application in a window that I can then monitor mouse events from??

    I passed the player object to a Listener class and I can get it to work ok with keyboard controls so Im sure the thread is not being blocked...but my problem still exists in being able to monitor mouse events within the JMF display while the media is being played at full screen. (i.e. in order to stop the media)
    Maybe I can use the ControllerListener within the JMF player to monitor mouse events? Any ideas on how I do this?
    Is it possible to layer the display with a transparent window from which I can monitor mouse events from?
    You mentioned asynchronical playback...I am looking into this idea, are there any examples of this on the web I can look at?
    Thanks for your speedy reply also!!
    Regards,
    Joe
    public static void main(String[] argv) {
    JMF myFrame = new JMF("Java Media Framework Project");
    myFrame.setUndecorated(true);
    myFrame.show();
    Dimension screenDim =Toolkit.getDefaultToolkit().getScreenSize();
    myFrame.setSize(screenDim.width, screenDim.height);
    myFrame.setResizable(false);
    myFrame.new Listener(myFrame);
    myFrame.play();
    public class Listener implements KeyListener,
    MouseListener,
    MouseMotionListener,
    WindowListener {
    private JMF owner;
    Listener(JMF w) {
    owner = w;
    owner.addMouseListener(this);
    owner.addKeyListener(this);
    owner.addMouseMotionListener(this);
    //owner.addWindowListener(this);
    private void stop() { owner.stop(); }
    //---------- KeyListener Implementation ------------------
    public void keyPressed (KeyEvent evt) { stop(); System.out.println("key pressed");}
    public void keyReleased(KeyEvent evt) { stop(); }
    public void keyTyped (KeyEvent evt) { stop(); }
    //---------- MouseListener Implementation ----------------
    public void mouseClicked (MouseEvent e) { stop(); System.out.println("Mouse clicked");}
    public void mousePressed (MouseEvent e) { stop(); }
    public void mouseReleased(MouseEvent e) { stop(); }
    public void mouseEntered (MouseEvent e) { }
    public void mouseExited (MouseEvent e) { }
    //---------- MouseMotionListener Implementation ----------
    public void mouseDragged(MouseEvent e) { }
    public void mouseMoved (MouseEvent e) {
    if (oldMouse == null)
    oldMouse = new Point(e.getX(), e.getY());
    else if (e.getX() != oldMouse.x
    || e.getY() != oldMouse.y)
    stop();
    Point oldMouse;
    //---------- WindowListener Implementation ---------------
    public void windowOpened (WindowEvent e) { stop(); }
    public void windowClosing (WindowEvent e) { stop(); }
    public void windowClosed (WindowEvent e) { stop(); }
    public void windowIconified (WindowEvent e) { stop(); }
    public void windowDeiconified(WindowEvent e) { stop(); }
    public void windowActivated (WindowEvent e) { stop(); }
    public void windowDeactivated(WindowEvent e) { stop(); }
    }

  • Inappropriate mouse event coordinates in the WebKit of HTMLLoader/StageWebView

    Hi,
    We have a desktp application which incorporates an HTMLRichTextEditor (implemented in HTML/JS and loaded into AIR).
    We have run into a big problem with text selection though. It seems that the both the HTMLLoader and the StageWebView are passing wrong mouse coordinates to the WebKit when the cursor is outside of the component.
    I've created a sample application which uses mx:HTML (which is a wrapper of the HTMLLoader) and a WebView class (a wrapper aroun StageWebView reference to which is given here).
    The application is located here in Dropbox. The source code of the app is here.
    The app was built with Flex 4.6 and ran in AIR 3.7
    The sample app has a WebView which loads loremipsum and HTML loading some dummy local HTML page. The HTML page uses the JS->AIR bridge to report the mouseevents to a function in AIR. In the snapshot below the selection was started from the first row and then slowly continued to the left. As soon as it reaches the green area the selection changes unexpectably. As it can be seen in the bottom right -> the WebKit has received a mouse event with incorrect coordinates. The reported mouse coordinates seem to be the mouse coordinates within the green component and the selection behaves like that. If the mouse is moved to the blue - the selection changes again (according to the coordinates in the blue area).
    The component which uses the StageWebView behaves in absolutely the same way.
    I'd assume that I have to post a bug but I decided to post here at first.
    I've tried a few workarounds in order to stop and ongoing selection or to change it's behaviour but none of them with any relevant success. Even disabling mouse children for the entire application has no effect on the selection once it's started.
    Any help and/or comments would be much appreciated.
    Thanks !

    Thank you for the heads up.  Do you know if this is a recent change in behavior with AIR (ie. does this occur in previous versions)?  Regardless, could you please open a new bug report on this over at bugbase.adobe.com? 
    Once added, please post back with the URL so that others affected can add their comments and votes and I can follow up internally.
     

Maybe you are looking for

  • Trying to use JDO objects as DTO over EJB???

    I have implemented the implemented the seralize interface in my JDO object classes. My JDO classes are only a data framework, I use them on both my EJB tier and I would like to use them on the web tier.... My thinking was to serialize the object grap

  • How can I get Juice 2.2 to run under Mavericks?

    Trying to install/use Juice 2.2 on a 2012 MacBook Pro w/16GB RAM and a Micron 980GB SSD. Juice runs perfectly on my 2010 Mac Mini running Snow Leopard, but on Mavericks it appears to install but won't run. Anyone out there have a solution?

  • Run postflight script for Plugin - step failed for mac

    So when I try and install adobe flash player on my mac OS X version 10.5, I get a message saying "The following install step failed: run postflight script for plugin. Contact the software manufacturer for assistance.

  • Portal iView from Backend

    Hi, Can I lauch portal iView from backend screen? My query is related to PCR forms. Richard

  • Quiz: Store the best percentage when having infinite attempts

    Dear all, Description: In my project there are six question slides, including the result slide at the end. Users must reach 80% correct answers, but have infinite attempts to reach this percentage. On the Result slide, Retake button is enabled, while