Class MouseEvent
java.lang.Object
java.util.EventObject
java.awt.AWTEvent
vaadinx.awt.event.ComponentEvent
vaadinx.awt.event.InputEvent
vaadinx.awt.event.MouseEvent
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
MouseWheelEvent
Port of
MouseEvent. Extends our InputEvent.
Carries both the component-relative (x,y) and the screen-absolute (xAbs,yAbs) coordinates — AWT only derived absolute lazily from the peer graphics device, which we don't have, so we require them at construction.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intFields inherited from class InputEvent
ALT_DOWN_MASK, ALT_GRAPH_DOWN_MASK, ALT_GRAPH_MASK, ALT_MASK, BUTTON1_DOWN_MASK, BUTTON1_MASK, BUTTON2_DOWN_MASK, BUTTON2_MASK, BUTTON3_DOWN_MASK, BUTTON3_MASK, CTRL_DOWN_MASK, CTRL_MASK, META_DOWN_MASK, META_MASK, SHIFT_DOWN_MASK, SHIFT_MASKFields inherited from class ComponentEvent
COMPONENT_FIRST, COMPONENT_HIDDEN, COMPONENT_LAST, COMPONENT_MOVED, COMPONENT_RESIZED, COMPONENT_SHOWNFields inherited from class AWTEvent
ACTION_EVENT_MASK, ADJUSTMENT_EVENT_MASK, COMPONENT_EVENT_MASK, consumed, CONTAINER_EVENT_MASK, FOCUS_EVENT_MASK, HIERARCHY_BOUNDS_EVENT_MASK, HIERARCHY_EVENT_MASK, id, INPUT_METHOD_EVENT_MASK, INVOCATION_EVENT_MASK, ITEM_EVENT_MASK, KEY_EVENT_MASK, MOUSE_EVENT_MASK, MOUSE_MOTION_EVENT_MASK, MOUSE_WHEEL_EVENT_MASK, PAINT_EVENT_MASK, RESERVED_ID_MAX, TEXT_EVENT_MASK, WINDOW_EVENT_MASK, WINDOW_FOCUS_EVENT_MASK, WINDOW_STATE_EVENT_MASKFields inherited from class EventObject
source -
Constructor Summary
ConstructorsConstructorDescriptionMouseEvent(Component source, int id, long when, int modifiers, int x, int y, int clickCount, boolean popupTrigger) MouseEvent(Component source, int id, long when, int modifiers, int x, int y, int clickCount, boolean popupTrigger, int button) MouseEvent(Component source, int id, long when, int modifiers, int x, int y, int xAbs, int yAbs, int clickCount, boolean popupTrigger, int button) -
Method Summary
Modifier and TypeMethodDescriptionintintstatic StringgetMouseModifiersText(int modifiers) "Button1+Shift" etc.getPoint()intgetX()intintgetY()intbooleanvoidtranslatePoint(int dx, int dy) Methods inherited from class InputEvent
consume, getMaskForButton, getModifiers, getModifiersEx, getModifiersExText, getWhen, isAltDown, isAltGraphDown, isConsumed, isControlDown, isMetaDown, isShiftDownMethods inherited from class ComponentEvent
getComponentMethods inherited from class EventObject
getSource
-
Field Details
-
MOUSE_FIRST
public static final int MOUSE_FIRST- See Also:
-
MOUSE_LAST
public static final int MOUSE_LAST- See Also:
-
MOUSE_CLICKED
public static final int MOUSE_CLICKED- See Also:
-
MOUSE_PRESSED
public static final int MOUSE_PRESSED- See Also:
-
MOUSE_RELEASED
public static final int MOUSE_RELEASED- See Also:
-
MOUSE_MOVED
public static final int MOUSE_MOVED- See Also:
-
MOUSE_ENTERED
public static final int MOUSE_ENTERED- See Also:
-
MOUSE_EXITED
public static final int MOUSE_EXITED- See Also:
-
MOUSE_DRAGGED
public static final int MOUSE_DRAGGED- See Also:
-
MOUSE_WHEEL
public static final int MOUSE_WHEEL- See Also:
-
NOBUTTON
public static final int NOBUTTON- See Also:
-
BUTTON1
public static final int BUTTON1- See Also:
-
BUTTON2
public static final int BUTTON2- See Also:
-
BUTTON3
public static final int BUTTON3- See Also:
-
-
Constructor Details
-
MouseEvent
public MouseEvent(Component source, int id, long when, int modifiers, int x, int y, int xAbs, int yAbs, int clickCount, boolean popupTrigger, int button) -
MouseEvent
public MouseEvent(Component source, int id, long when, int modifiers, int x, int y, int clickCount, boolean popupTrigger, int button) -
MouseEvent
public MouseEvent(Component source, int id, long when, int modifiers, int x, int y, int clickCount, boolean popupTrigger)
-
-
Method Details
-
getX
public int getX() -
getY
public int getY() -
getXOnScreen
public int getXOnScreen() -
getYOnScreen
public int getYOnScreen() -
getPoint
-
getLocationOnScreen
-
translatePoint
public void translatePoint(int dx, int dy) -
getClickCount
public int getClickCount() -
isPopupTrigger
public boolean isPopupTrigger() -
getButton
public int getButton() -
getMouseModifiersText
"Button1+Shift" etc. Delegates to AWT — constants are compatible. -
paramString
- Overrides:
paramStringin classComponentEvent
-