public class InteractionEvent
extends java.awt.event.ActionEvent
Title: InteractionEvent
Description: This class is used to describe the basic interaction with a 3d element. It extends ActionEvent in order to allow for the object generating the event to include an object with additional information and the mouse event which was used in the interaction.
It is up to the interacted element to decide which information (object) to pass along.
Copyright: Open Source Physics project
Modifier and Type | Field and Description |
---|---|
static int |
MOUSE_DRAGGED
ID for the action of dragging the mouse on the element
|
static int |
MOUSE_ENTERED
ID for the action of entering (lingering on) the element
|
static int |
MOUSE_EXITED
ID for the action of exiting the element
|
static int |
MOUSE_MOVED
ID for the action of moving the mouse on the element
|
static int |
MOUSE_PRESSED
ID for the action of pressing the mouse on the element
|
static int |
MOUSE_RELEASED
ID for the action of releasing the mouse on the element
|
ACTION_FIRST, ACTION_LAST, ACTION_PERFORMED, ALT_MASK, CTRL_MASK, META_MASK, SHIFT_MASK
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 |
---|
InteractionEvent(java.lang.Object _source,
int _id,
java.lang.String _command,
java.lang.Object _info,
java.awt.event.MouseEvent _mouseEvent)
Constructor for the event
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
getInfo()
The object with additional information provided by the source.
|
java.awt.event.MouseEvent |
getMouseEvent()
The mouse event which generated the interaction event.
|
public static final int MOUSE_PRESSED
public static final int MOUSE_DRAGGED
public static final int MOUSE_RELEASED
public static final int MOUSE_ENTERED
public static final int MOUSE_EXITED
public static final int MOUSE_MOVED
public InteractionEvent(java.lang.Object _source, int _id, java.lang.String _command, java.lang.Object _info, java.awt.event.MouseEvent _mouseEvent)
_source
- Object The object which generated the event._id
- int An integer which identifies the type of event._command
- String An action command associated to the event._info
- Object The object provided as additional information._mouseEvent
- MouseEvent The mouse event which generated the interaction event.
It is useful to extract additional information such as the number of mouse
clicks or the modifier keys and mouse buttons that were down during the
event.public java.lang.Object getInfo()
public java.awt.event.MouseEvent getMouseEvent()