Package com.inductiveautomation.rm.shape
Class RMShapeMouseEvent
java.lang.Object
java.util.EventObject
java.awt.AWTEvent
java.awt.event.ComponentEvent
java.awt.event.InputEvent
java.awt.event.MouseEvent
com.inductiveautomation.rm.shape.RMShapeMouseEvent
- All Implemented Interfaces:
Serializable
The RMShapeMouseEvent is a subclass of MouseEvent which is sent to an RMShape's mouse listeners. It is the same as a
regular mouse event except for two differences: The shape the action was performed on can be retrieved with
getShape(), and event point in the shape's coordinate system can be retrieved with getShapePoint().
- See Also:
-
Field Summary
Fields inherited from class java.awt.event.MouseEvent
BUTTON1, BUTTON2, BUTTON3, MOUSE_CLICKED, MOUSE_DRAGGED, MOUSE_ENTERED, MOUSE_EXITED, MOUSE_FIRST, MOUSE_LAST, MOUSE_MOVED, MOUSE_PRESSED, MOUSE_RELEASED, MOUSE_WHEEL, NOBUTTON
Fields inherited from class java.awt.event.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_MASK
Fields inherited from class java.awt.event.ComponentEvent
COMPONENT_FIRST, COMPONENT_HIDDEN, COMPONENT_LAST, COMPONENT_MOVED, COMPONENT_RESIZED, COMPONENT_SHOWN
Fields inherited from class java.awt.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_MASK
Fields inherited from class java.util.EventObject
source
-
Constructor Summary
ConstructorsConstructorDescriptionRMShapeMouseEvent
(RMShape aShape, MouseEvent anEvent) Creates a new shape mouse event. -
Method Summary
Modifier and TypeMethodDescriptionvoid
consume()
Overrides MouseEvent version to forward on to encapsulated event.static RMShapeMouseEvent
Returns the most recently delivered event.Returns the mouse down event.Returns the original mouse event.Returns the event location in shape's parent's coords.double
Returns the event location in shape's parent's coords.double
Returns the event location in shape's parent's coords.getPoint()
Overrides MouseEvent version to return point in shape coords.Returns the event point in shape coords.getShape()
Returns the event shape.Returns the viewer.Returns the event location in viewer coords.int
Returns the event location in viewer coords.int
Returns the event location in viewer coords.int
getX()
Overrides MouseEvent version to return point in shape coords.double
getX2D()
Returns the event point x.int
getY()
Overrides MouseEvent version to return point in shape coords.double
getY2D()
Returns the event point y.Methods inherited from class java.awt.event.MouseEvent
getButton, getClickCount, getLocationOnScreen, getModifiersEx, getMouseModifiersText, getXOnScreen, getYOnScreen, isPopupTrigger, paramString, translatePoint
Methods inherited from class java.awt.event.InputEvent
getMaskForButton, getModifiers, getModifiersExText, getWhen, isAltDown, isAltGraphDown, isConsumed, isControlDown, isMetaDown, isShiftDown
Methods inherited from class java.awt.event.ComponentEvent
getComponent
Methods inherited from class java.util.EventObject
getSource
-
Constructor Details
-
RMShapeMouseEvent
Creates a new shape mouse event.
-
-
Method Details
-
getShape
Returns the event shape. -
getViewer
Returns the viewer. -
getMouseEvent
Returns the original mouse event. -
getX2D
public double getX2D()Returns the event point x. -
getY2D
public double getY2D()Returns the event point y. -
getPoint2D
Returns the event point in shape coords. -
getX
public int getX()Overrides MouseEvent version to return point in shape coords.- Overrides:
getX
in classMouseEvent
-
getY
public int getY()Overrides MouseEvent version to return point in shape coords.- Overrides:
getY
in classMouseEvent
-
getPoint
Overrides MouseEvent version to return point in shape coords.- Overrides:
getPoint
in classMouseEvent
-
getParentX
public double getParentX()Returns the event location in shape's parent's coords. -
getParentY
public double getParentY()Returns the event location in shape's parent's coords. -
getParentPoint
Returns the event location in shape's parent's coords. -
getViewerX
public int getViewerX()Returns the event location in viewer coords. -
getViewerY
public int getViewerY()Returns the event location in viewer coords. -
getViewerPoint
Returns the event location in viewer coords. -
getMouseDownEvent
Returns the mouse down event. -
consume
public void consume()Overrides MouseEvent version to forward on to encapsulated event.- Overrides:
consume
in classInputEvent
-
getCurrentEvent
Returns the most recently delivered event.
-