org.apache.batik.gvt.event
public class GraphicsNodeMouseEvent extends GraphicsNodeInputEvent
Field Summary | |
---|---|
static int | MOUSE_CLICKED
The id for the "mouseClicked" event. |
static int | MOUSE_DRAGGED
The id for the "mouseDragged" event. |
static int | MOUSE_ENTERED
The id for the "mouseEntered" event. |
static int | MOUSE_EXITED
The id for the "mouseExited" event. |
static int | MOUSE_MOVED
The id for the "mouseMoved" event. |
static int | MOUSE_PRESSED
The id for the "mousePressed" event. |
static int | MOUSE_RELEASED
The id for the "mouseReleased" event. |
Constructor Summary | |
---|---|
GraphicsNodeMouseEvent(GraphicsNode source, int id, long when, int modifiers, int lockState, int button, float x, float y, int clientX, int clientY, int screenX, int screenY, int clickCount, GraphicsNode relatedNode)
Constructs a new graphics node mouse event. | |
GraphicsNodeMouseEvent(GraphicsNode source, MouseEvent evt, int button, int lockState)
Constructs a new graphics node mouse event from an AWT MouseEvent. |
Method Summary | |
---|---|
int | getButton()
Returns the mouse button that changed state. |
int | getClickCount()
Returns the number of mouse clicks associated with this event. |
Point | getClientPoint()
Returns the (x, y) position of the event relative to the screen. |
float | getClientX()
Returns the horizontal x position of the event relative to the
source graphics node. |
float | getClientY()
Returns the vertical y position of the event relative to the source node. |
Point2D | getPoint2D()
Returns the (x, y) position of the event relative to the source node. |
GraphicsNode | getRelatedNode()
Returns the related node for this GraphicsNodeMouseEvent .
|
Point | getScreenPoint()
Returns the (x, y) position of the event relative to the screen. |
int | getScreenX()
Returns the horizontal x position of the event relative to the
screen. |
int | getScreenY()
Returns the vertical y position of the event relative to the screen. |
float | getX()
Returns the horizontal x position of the event relative to the
source graphics node. |
float | getY()
Returns the vertical y position of the event relative to the source node. |
Parameters: source the graphics node where the event originated id the id of this event when the time the event occurred modifiers the modifier keys down when event occurred lockState the lock keys active when the event occurred button the mouse button that changed state x the mouse x coordinate y the mouse y coordinate screenX the mouse x coordinate relative to the screen screenY the mouse y coordinate relative to the screen clickCount the number of clicks relatedNode the related node
See Also: GraphicsNodeMouseEvent
Parameters: source the source where the event originated evt the AWT mouse event which is the source of this GraphicsNodeEvent
Returns: integer value for the number of clicks
Returns: a Point object containing the x and y coordinates
Returns: x a float indicating horizontal position relative to the node
Returns: y a float indicating vertical position relative to the node
Returns: a Point object containing the x and y coordinates
GraphicsNodeMouseEvent
.
For a MOUSE_ENTERED
event it is the previous node target,
for a MOUSE_EXITED
event it is the next node target and
for a MOUSE_DRAGGED
event it is the node under the mouse
pointer. Otherwise the value is null
.Returns: a Point object containing the x and y coordinates
Returns: x a float indicating horizontal position relative to the screen
Returns: y a float indicating vertical position relative to the screen
Returns: x a float indicating horizontal position relative to the node
Returns: y a float indicating vertical position relative to the node