public interface PSwingEvent
Modifier and Type | Method and Description |
---|---|
MouseEvent |
asMouseEvent()
Returns this event as a mouse event.
|
void |
dispatchTo(Object listener)
Calls appropriate method on the listener based on this events ID.
|
PNode |
getCurrentNode()
Get the current node that is under the cursor.
|
PPickPath |
getCurrentPath()
Get the path from the PCanvas down to the visual component currently
under the mouse.This may give a different result then getGrabPath()
during a MOUSE_DRAGGED or MOUSE_RELEASED operation.
|
PNode |
getGrabNode()
Determine the node the event originated at.
|
PPickPath |
getGrabPath()
Return the path from the PCanvas 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.
|
PNode |
getNode()
Determine the node the event originated at.
|
PPickPath |
getPath()
Determine the path the event took from the PCanvas down to the visual
component.
|
void |
setSource(Object aSource)
Set the source of this event.
|
Point2D getLocalPoint()
double getLocalX()
double getLocalY()
int getID()
PNode getNode()
PPickPath getPath()
PNode getGrabNode()
PPickPath getGrabPath()
PNode getCurrentNode()
PPickPath getCurrentPath()
void dispatchTo(Object listener)
listener
- the MouseListener or MouseMotionListener to dispatch to.void setSource(Object aSource)
aSource
- the source of the eventMouseEvent asMouseEvent()
Copyright © 1995–2013 Piccolo2D. All rights reserved.