edu.umd.cs.piccolox.pswing
Class PSwingMouseMotionEvent
java.lang.Object
java.util.EventObject
java.awt.AWTEvent
java.awt.event.ComponentEvent
java.awt.event.InputEvent
java.awt.event.MouseEvent
edu.umd.cs.piccolox.pswing.PSwingMouseEvent
edu.umd.cs.piccolox.pswing.PSwingMouseMotionEvent
- All Implemented Interfaces:
- PSwingEvent, Serializable
public class PSwingMouseMotionEvent
- extends PSwingMouseEvent
PMouseMotionEvent is an event which indicates that a mouse motion
action occurred in a node.
This low-level event is generated by a node object for:
- Mouse Motion Events
- the mouse is moved
- the mouse is dragged
A PMouseEvent object is passed to every PMouseMotionListener
or
PMouseMotionAdapter
object which registered to receive mouse
motion events using the component's addMouseMotionListener
method. (PMouseMotionAdapter
objects implement the
PMouseMotionListener
interface.) Each such listener object gets
a PMouseEvent
containing the mouse motion event.
Warning: Serialized objects of this class will not be compatible with
future Piccolo releases. The current serialization support is appropriate for
short term storage or RMI between applications running the same version of
Piccolo. A future release of Piccolo will provide support for long term
persistence.
- Author:
- Benjamin B. Bederson, Sam R. Reid, Lance E. Good
- See Also:
- Serialized Form
Fields inherited from class 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 |
Fields inherited from class java.awt.event.InputEvent |
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 |
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, 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 |
Method Summary |
void |
dispatchTo(Object listener)
Calls appropriate method on the listener based on this events ID. |
Methods inherited from class edu.umd.cs.piccolox.pswing.PSwingMouseEvent |
asMouseEvent, createMouseEvent, getCurrentNode, getCurrentPath, getGrabNode, getGrabPath, getID, getLocalPoint, getLocalX, getLocalY, getNode, getPath, setSource |
Methods inherited from class java.awt.event.MouseEvent |
getButton, getClickCount, getLocationOnScreen, getMouseModifiersText, getPoint, getX, getXOnScreen, getY, getYOnScreen, isPopupTrigger, paramString, translatePoint |
Methods inherited from class java.awt.event.InputEvent |
consume, getModifiers, getModifiersEx, getModifiersExText, getWhen, isAltDown, isAltGraphDown, isConsumed, isControlDown, isMetaDown, isShiftDown |
PSwingMouseMotionEvent
protected PSwingMouseMotionEvent(int id,
MouseEvent swingEvent,
PInputEvent piccoloEvent)
- Constructs a new PMouse event from a Java MouseEvent.
- Parameters:
id
- The event type (MOUSE_MOVED, MOUSE_DRAGGED)swingEvent
- The original Java mouse event when in MOUSE_DRAGGED eventspiccoloEvent
- Piccolo2d event to use when querying about the event's
piccolo2d context
dispatchTo
public void dispatchTo(Object listener)
- Calls appropriate method on the listener based on this events ID.
- Specified by:
dispatchTo
in interface PSwingEvent
- Overrides:
dispatchTo
in class PSwingMouseEvent
- Parameters:
listener
- the target for dispatch.
Copyright © 1995-2010 Piccolo2D. All Rights Reserved.