edu.umd.cs.jazz.event
Class ZMouseEvent
java.lang.Object
|
+--java.util.EventObject
|
+--java.awt.AWTEvent
|
+--java.awt.event.ComponentEvent
|
+--java.awt.event.InputEvent
|
+--java.awt.event.MouseEvent
|
+--edu.umd.cs.jazz.event.ZMouseEvent
- All Implemented Interfaces:
- java.io.Serializable
- public class ZMouseEvent
- extends java.awt.event.MouseEvent
ZMouseEvent is an event which indicates that a mouse action occurred in a node.
This event is used both for mouse events (click, enter, exit) and mouse
motion events (moves and drags).
This low-level event is generated by a node object for:
- Mouse Events
- a mouse button is pressed
- a mouse button is released
- a mouse button is clicked (pressed and released)
- the mouse cursor enters a node
- the mouse cursor exits a node
- Mouse Motion Events
- the mouse is moved
- the mouse is dragged
A ZMouseEvent object is passed to every ZMouseListener
or ZMouseAdapter object which registered to receive
the "interesting" mouse events using the component's
addMouseListener method.
(ZMouseAdapter objects implement the
ZMouseListener interface.) Each such listener object
gets a ZMouseEvent containing the mouse event.
A ZMouseEvent object is also passed to every ZMouseMotionListener
or ZMouseMotionAdapter object which registered to receive
mouse motion events using the component's addMouseMotionListener
method. (ZMouseMotionAdapter objects implement the
ZMouseMotionListener interface.) Each such listener object
gets a ZMouseEvent containing the mouse motion event.
- See Also:
ZMouseAdapter,
ZMouseListener,
ZMouseMotionAdapter,
ZMouseMotionListener, Serialized Form
| Fields inherited from class java.awt.event.MouseEvent |
MOUSE_CLICKED,
MOUSE_DRAGGED,
MOUSE_ENTERED,
MOUSE_EXITED,
MOUSE_FIRST,
MOUSE_LAST,
MOUSE_MOVED,
MOUSE_PRESSED,
MOUSE_RELEASED |
| Fields inherited from class java.awt.event.InputEvent |
ALT_GRAPH_MASK,
ALT_MASK,
BUTTON1_MASK,
BUTTON2_MASK,
BUTTON3_MASK,
CTRL_MASK,
META_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,
PAINT_EVENT_MASK,
RESERVED_ID_MAX,
TEXT_EVENT_MASK,
WINDOW_EVENT_MASK |
| Fields inherited from class java.util.EventObject |
source |
|
Constructor Summary |
ZMouseEvent(int id,
ZNode node,
java.awt.event.MouseEvent e,
ZSceneGraphPath path)
Constructs a new ZMouse event from a Java MouseEvent. |
|
Method Summary |
int |
getID()
Determine the event type. |
ZNode |
getNode()
Determine the node the event ocurred on |
ZSceneGraphPath |
getPath()
Determine the path the event took from the ZCanvas down to the visual component. |
| Methods inherited from class java.awt.event.MouseEvent |
getClickCount,
getPoint,
getX,
getY,
isPopupTrigger,
paramString,
translatePoint |
| Methods inherited from class java.awt.event.InputEvent |
consume,
getModifiers,
getWhen,
isAltDown,
isAltGraphDown,
isConsumed,
isControlDown,
isMetaDown,
isShiftDown |
| Methods inherited from class java.awt.event.ComponentEvent |
getComponent |
| Methods inherited from class java.awt.AWTEvent |
finalize,
toString |
| Methods inherited from class java.util.EventObject |
getSource |
| Methods inherited from class java.lang.Object |
clone,
equals,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
ZMouseEvent
public ZMouseEvent(int id,
ZNode node,
java.awt.event.MouseEvent e,
ZSceneGraphPath path)
- Constructs a new ZMouse event from a Java MouseEvent.
- Parameters:
id - The event type (MOUSE_PRESSED, MOUSE_RELEASED, MOUSE_CLICKED, MOUSE_ENTERED, MOUSE_EXITED, MOUSE_MOVED, MOUSE_DRAGGED)node - The node the event occurred one - The original Java mouse eventpath - The path the event took from the ZCanvas to the visual component
getID
public int getID()
- Determine the event type.
- Overrides:
- getID in class java.awt.AWTEvent
- Returns:
- the id
getNode
public ZNode getNode()
- Determine the node the event ocurred on
- Returns:
- the node.
getPath
public ZSceneGraphPath getPath()
- Determine the path the event took from the ZCanvas down to the visual component.