|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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
ZMouseEvent is an event which indicates that a mouse action occurred in a node.
This low-level event is generated by a node object for:
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.
Warning: Serialized and ZSerialized objects of this class will not be compatible with future Jazz releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Jazz. A future release of Jazz will provide support for long term persistence.
ZMouseAdapter
,
ZMouseListener
, Serialized FormFields 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,
java.awt.event.MouseEvent e,
ZSceneGraphPath aGrabPath,
ZSceneGraphPath aCurrentPath)
Deprecated. as of Jazz 1.1, use createMouseEvent() instead. |
protected |
ZMouseEvent(int id,
java.awt.event.MouseEvent e,
ZSceneGraphPath aGrabPath,
ZSceneGraphPath aCurrentPath,
java.lang.Object dummy)
|
|
ZMouseEvent(int id,
ZNode aNode,
java.awt.event.MouseEvent e,
ZSceneGraphPath aGrabPath)
Deprecated. as of Jazz 1.1, use createMouseEvent() instead. |
Method Summary | |
static ZMouseEvent |
createMouseEvent(int id,
java.awt.event.MouseEvent e,
ZSceneGraphPath path,
ZSceneGraphPath mouseOverPath)
Creates and returns a new ZMouse event from a Java MouseEvent. |
void |
dispatchTo(java.lang.Object listener)
Calls appropriate method on the listener based on this events ID. |
ZNode |
getCurrentNode()
Get the current node that is under the cursor. |
ZSceneGraphPath |
getCurrentPath()
Get the path from the ZCanvas down to the visual component currently under the mouse.This may give a different result then getGrabPath() durring a MOUSE_DRAGGED or MOUSE_RELEASED operation. |
ZNode |
getGrabNode()
Determine the node the event originated at. |
ZSceneGraphPath |
getGrabPath()
Return the path from the ZCanvas down to the currently grabbed object. |
int |
getID()
Determine the event type. |
java.lang.Class |
getListenerType()
Returns the ZMouseLister class. |
java.awt.geom.Point2D |
getLocalPoint()
Returns the x,y position of the event in the local coordinate system of the node the event occurred on. |
double |
getLocalX()
Returns the horizontal x position of the event in the local coordinate system of the node the event occurred on. |
double |
getLocalY()
Returns the vertical y position of the event in the local coordinate system of the node the event occurred on. |
ZNode |
getNode()
Determine the node the event originated at. |
ZSceneGraphPath |
getPath()
Determine the path the event took from the ZCanvas down to the visual component. |
void |
setSource(java.lang.Object aSource)
Set the souce of this event. |
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 |
Methods inherited from interface edu.umd.cs.jazz.event.ZEvent |
isConsumed |
Constructor Detail |
public ZMouseEvent(int id, java.awt.event.MouseEvent e, ZSceneGraphPath aGrabPath, ZSceneGraphPath aCurrentPath)
id
- The event type (MOUSE_PRESSED, MOUSE_RELEASED, MOUSE_CLICKED, MOUSE_ENTERED, MOUSE_EXITED)e
- The original Java mouse eventpath
- The path to use for getNode() and getPath()mouseOverPath
- The path to the current node under the mouse, this may be differnt then the normal path
when in MOUSE_RELEASED events.public ZMouseEvent(int id, ZNode aNode, java.awt.event.MouseEvent e, ZSceneGraphPath aGrabPath)
protected ZMouseEvent(int id, java.awt.event.MouseEvent e, ZSceneGraphPath aGrabPath, ZSceneGraphPath aCurrentPath, java.lang.Object dummy)
Method Detail |
public static ZMouseEvent createMouseEvent(int id, java.awt.event.MouseEvent e, ZSceneGraphPath path, ZSceneGraphPath mouseOverPath)
id
- The event type (MOUSE_PRESSED, MOUSE_RELEASED, MOUSE_CLICKED, MOUSE_ENTERED, MOUSE_EXITED, MOUSE_MOVED, MOUSE_DRAGGED)e
- The original Java mouse eventpath
- The path to use for getNode() and getPath()mouseOverPath
- The path to the current node under the mouse, this may be differnt then the normal path
when in MOUSE_DRAGGED and MOUSE_RELEASED events.public java.awt.geom.Point2D getLocalPoint()
public double getLocalX()
public double getLocalY()
public int getID()
getID
in class java.awt.AWTEvent
public ZNode getNode()
public ZSceneGraphPath getPath()
public ZNode getGrabNode()
public ZSceneGraphPath getGrabPath()
public ZNode getCurrentNode()
public ZSceneGraphPath getCurrentPath()
public void dispatchTo(java.lang.Object listener)
dispatchTo
in interface ZEvent
public java.lang.Class getListenerType()
getListenerType
in interface ZEvent
public void setSource(java.lang.Object aSource)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |