public class LayerEvent
extends 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
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
COMPONENT_FIRST, COMPONENT_HIDDEN, COMPONENT_LAST, COMPONENT_MOVED, COMPONENT_RESIZED, COMPONENT_SHOWN
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
Constructor and Description |
---|
LayerEvent(java.awt.event.MouseEvent e)
Create a new layer event from the given mouse event.
|
LayerEvent(java.awt.event.MouseEvent e,
int id)
Create a new layer event from the given mouse event, but give
it a different ID.
|
Modifier and Type | Method and Description |
---|---|
void |
consume()
Consume this event.
|
Figure |
getFigureSource()
Get the figure that the event occurred on.
|
java.awt.geom.Point2D |
getLayerPoint()
Get the point where the event occurred.
|
CanvasLayer |
getLayerSource()
Get the layer that the event occurred on.
|
double |
getLayerX()
Get the horizontal component of the point where the event
occurred.
|
double |
getLayerY()
Get the vertical component of the point where the event
occurred.
|
static java.lang.String |
idToString(int id)
Print the string representation of an event ID
|
void |
setFigureSource(Figure figureSource)
Set the figure that the event occurred on.
|
void |
setLayerPoint(java.awt.geom.Point2D point)
Set the layer position of the event
|
void |
setLayerSource(CanvasLayer layerSource)
Set the layer that the event occurred on.
|
void |
setLayerX(double x)
Set the layer X position of the event
|
void |
setLayerY(double y)
Set the layer Y position of the event
|
java.lang.String |
toString()
Print the string representation of this event
|
static java.lang.String |
toString(int flags)
Print the string representation of modifier flags
|
void |
transform(java.awt.geom.AffineTransform at)
Transform the layer coordinates of the event with the given
transform.
|
getButton, getClickCount, getLocationOnScreen, getModifiersEx, getMouseModifiersText, getPoint, getX, getXOnScreen, getY, getYOnScreen, isPopupTrigger, paramString, translatePoint
public LayerEvent(java.awt.event.MouseEvent e)
public LayerEvent(java.awt.event.MouseEvent e, int id)
public void consume()
consume
in class java.awt.event.InputEvent
public CanvasLayer getLayerSource()
public Figure getFigureSource()
public java.awt.geom.Point2D getLayerPoint()
public double getLayerX()
public double getLayerY()
public void setFigureSource(Figure figureSource)
public void setLayerSource(CanvasLayer layerSource)
public void setLayerPoint(java.awt.geom.Point2D point)
public void setLayerX(double x)
public void setLayerY(double y)
public java.lang.String toString()
toString
in class java.awt.AWTEvent
public static java.lang.String toString(int flags)
public static java.lang.String idToString(int id)
public void transform(java.awt.geom.AffineTransform at)