public interface MouseListener
All methods does nothing by default which allows the widget implements only the wanted mouse action(s).
The given coordinates are widget relative: it is not the main mouse coordinates.
| Modifier and Type | Interface and Description | 
|---|---|
| static class  | MouseListener.MouseButtonSome mouse events hold a mouse button. | 
| Modifier and Type | Method and Description | 
|---|---|
| default void | mouseDragged(int x,
            int y)Invoked when a mouse has been dragged on a widget. | 
| default void | mouseEntered(int x,
            int y)Invoked when a mouse enters a widget. | 
| default void | mouseExited(int x,
           int y)Invoked when a mouse exits a widget. | 
| default void | mouseMoved(int x,
          int y)Invoked when a mouse has been moved on a widget. | 
| default void | mousePressed(int x,
            int y,
            MouseListener.MouseButton button)Invoked when a mouse has been pressed on a widget. | 
| default void | mouseReleased(int x,
             int y,
             MouseListener.MouseButton button)Invoked when a mouse has been released on a widget. | 
| default void | mouseWheelMoved(int x,
               int y,
               MouseListener.MouseButton button,
               int count)Invoked when a mouse wheel has been moved on a widget. | 
default void mouseDragged(int x,
                          int y)
x - the mouse x coordinate relative to widget position.y - the mouse y coordinate relative to widget position.default void mouseEntered(int x,
                          int y)
x - the mouse x coordinate relative to widget position.y - the mouse y coordinate relative to widget position.default void mouseExited(int x,
                         int y)
x - the mouse x coordinate relative to widget position.y - the mouse y coordinate relative to widget position.default void mouseMoved(int x,
                        int y)
x - the mouse x coordinate relative to widget position.y - the mouse y coordinate relative to widget position.default void mousePressed(int x,
                          int y,
                          MouseListener.MouseButton button)
x - the mouse x coordinate relative to widget position.y - the mouse y coordinate relative to widget position.button - the button that has been pressed.default void mouseReleased(int x,
                           int y,
                           MouseListener.MouseButton button)
x - the mouse x coordinate relative to widget position.y - the mouse y coordinate relative to widget position.button - the button that has been released.default void mouseWheelMoved(int x,
                             int y,
                             MouseListener.MouseButton button,
                             int count)
x - the mouse x coordinate relative to widget position.y - the mouse y coordinate relative to widget position.button - the button that has been wheeled.count - the number of wheel moves (can be positive or negative according to the way of the wheel).