public class PSwingMouseEvent extends MouseEvent implements Serializable
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.
BUTTON1, BUTTON2, BUTTON3, MOUSE_CLICKED, MOUSE_DRAGGED, MOUSE_ENTERED, MOUSE_EXITED, MOUSE_FIRST, MOUSE_LAST, MOUSE_MOVED, MOUSE_PRESSED, MOUSE_RELEASED, MOUSE_WHEEL, NOBUTTONALT_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_MASKCOMPONENT_FIRST, COMPONENT_HIDDEN, COMPONENT_LAST, COMPONENT_MOVED, COMPONENT_RESIZED, COMPONENT_SHOWNACTION_EVENT_MASK, ADJUSTMENT_EVENT_MASK, COMPONENT_EVENT_MASK, consumed, CONTAINER_EVENT_MASK, FOCUS_EVENT_MASK, HIERARCHY_BOUNDS_EVENT_MASK, HIERARCHY_EVENT_MASK, 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_MASKsource| Modifier | Constructor and Description |
|---|---|
protected |
PSwingMouseEvent(int id,
MouseEvent e,
edu.umd.cs.piccolo.event.PInputEvent event)
Constructs a new ZMouse event from a Java MouseEvent.
|
| Modifier and Type | Method and Description |
|---|---|
static PSwingMouseEvent |
createMouseEvent(int id,
MouseEvent e,
edu.umd.cs.piccolo.event.PInputEvent pEvent)
Creates and returns a new ZMouse event from a Java MouseEvent.
|
void |
dispatchTo(Object listener)
Calls appropriate method on the listener based on this events ID.
|
edu.umd.cs.piccolo.PNode |
getCurrentNode()
Get the current node that is under the cursor.
|
edu.umd.cs.piccolo.util.PPickPath |
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.
|
edu.umd.cs.piccolo.PNode |
getGrabNode()
Determine the node the event originated at.
|
edu.umd.cs.piccolo.util.PPickPath |
getGrabPath()
Return the path from the ZCanvas down to the currently grabbed object.
|
int |
getID()
Determine the event type.
|
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.
|
edu.umd.cs.piccolo.PNode |
getNode()
Determine the node the event originated at.
|
edu.umd.cs.piccolo.util.PPickPath |
getPath()
Determine the path the event took from the ZCanvas down to the visual component.
|
void |
setSource(Object aSource)
Set the souce of this event.
|
getButton, getClickCount, getLocationOnScreen, getModifiersEx, getMouseModifiersText, getPoint, getX, getXOnScreen, getY, getYOnScreen, isPopupTrigger, paramString, translatePointconsume, getMaskForButton, getModifiers, getModifiersExText, getWhen, isAltDown, isAltGraphDown, isConsumed, isControlDown, isMetaDown, isShiftDowngetComponentgetSourceprotected PSwingMouseEvent(int id,
MouseEvent e,
edu.umd.cs.piccolo.event.PInputEvent event)
id - The event type (MOUSE_PRESSED, MOUSE_RELEASED, MOUSE_CLICKED, MOUSE_ENTERED, MOUSE_EXITED)e - The original Java mouse event when in MOUSE_RELEASED events.event - DOCUMENT ME!public static PSwingMouseEvent createMouseEvent(int id, MouseEvent e, edu.umd.cs.piccolo.event.PInputEvent pEvent)
id - The event type (MOUSE_PRESSED, MOUSE_RELEASED, MOUSE_CLICKED, MOUSE_ENTERED, MOUSE_EXITED,
MOUSE_MOVED, MOUSE_DRAGGED)e - The original Java mouse event when in MOUSE_DRAGGED and MOUSE_RELEASED events.pEvent - DOCUMENT ME!public Point2D getLocalPoint()
public double getLocalX()
public double getLocalY()
public int getID()
public edu.umd.cs.piccolo.PNode getNode()
public edu.umd.cs.piccolo.util.PPickPath getPath()
public edu.umd.cs.piccolo.PNode getGrabNode()
public edu.umd.cs.piccolo.util.PPickPath getGrabPath()
public edu.umd.cs.piccolo.PNode getCurrentNode()
public edu.umd.cs.piccolo.util.PPickPath getCurrentPath()
public void dispatchTo(Object listener)
listener - DOCUMENT ME!RuntimeException - DOCUMENT ME!Copyright © 2012–2025 cismet GmbH. All rights reserved.