|
Search this API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.util.EventObject y.view.Mouse2DEvent
public class Mouse2DEvent
Event object that closely resembles MouseEvent
, but offers double precision
coordinates.
Field Summary | |
---|---|
static int |
MOUSE_CLICKED
|
static int |
MOUSE_DRAGGED
|
static int |
MOUSE_ENTERED
|
static int |
MOUSE_EXITED
|
static int |
MOUSE_MOVED
|
static int |
MOUSE_PRESSED
|
static int |
MOUSE_RELEASED
|
Fields inherited from class java.util.EventObject |
---|
source |
Constructor Summary | |
---|---|
Mouse2DEvent(java.lang.Object source,
double x,
double y,
java.awt.event.MouseEvent me)
Constructs an event using the values obtained from the MouseEvent. |
|
Mouse2DEvent(java.lang.Object source,
int id,
long when,
int modifiers,
double x,
double y,
int button,
int clickCount,
boolean isPopupTrigger)
Constructs a Mouse2DEvent. |
|
Mouse2DEvent(java.lang.Object source,
java.lang.Object dispatcher,
double x,
double y,
java.awt.event.MouseEvent me)
Constructs an event using the values obtained from the MouseEvent. |
|
Mouse2DEvent(java.lang.Object source,
java.lang.Object dispatcher,
int id,
long when,
int modifiers,
double x,
double y,
int button,
int clickCount,
boolean isPopupTrigger)
Constructs a Mouse2DEvent. |
Method Summary | |
---|---|
int |
getButton()
The button constant as defined in MouseEvent.getButton() . |
int |
getClickCount()
The button constant as defined in MouseEvent.getClickCount() . |
java.lang.Object |
getDispatcher()
Returns the object that constructed and fired the event. |
int |
getId()
Returns the id constant for this event. |
int |
getModifiers()
The modifiers mask as defined in InputEvent.getModifiersEx() |
long |
getWhen()
Returns the time when this event happened. |
double |
getX()
Returns the x coordinates of the event. |
double |
getY()
Returns the y coordinates of the event. |
boolean |
isPopupTrigger()
Whether the event is considered a popup trigger. |
java.lang.String |
toString()
|
Methods inherited from class java.util.EventObject |
---|
getSource |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int MOUSE_PRESSED
public static final int MOUSE_DRAGGED
public static final int MOUSE_RELEASED
public static final int MOUSE_CLICKED
public static final int MOUSE_ENTERED
public static final int MOUSE_EXITED
public static final int MOUSE_MOVED
Constructor Detail |
---|
public Mouse2DEvent(java.lang.Object source, int id, long when, int modifiers, double x, double y, int button, int clickCount, boolean isPopupTrigger)
new Mouse2DEvent(source, null, id, when, modifiers, x, y, button, clickCount, isPopupTrigger)
source
- The object on which the Event initially occurred.id
- the type of the eventwhen
- the time when the event occurredmodifiers
- the modifiers maskx
- the x coordinate in world coordinatesy
- the x coordinate in world coordinatesbutton
- the button maskclickCount
- the number of clicksisPopupTrigger
- whether the event was a popup triggerpublic Mouse2DEvent(java.lang.Object source, java.lang.Object dispatcher, int id, long when, int modifiers, double x, double y, int button, int clickCount, boolean isPopupTrigger)
source
- The object on which the Event initially occurred.dispatcher
- The object that constructed and fired the event.
Typically a MouseInputMode
instance.id
- the type of the eventwhen
- the time when the event occurredmodifiers
- the modifiers maskx
- the x coordinate in world coordinatesy
- the x coordinate in world coordinatesbutton
- the button maskclickCount
- the number of clicksisPopupTrigger
- whether the event was a popup triggerpublic Mouse2DEvent(java.lang.Object source, double x, double y, java.awt.event.MouseEvent me)
new Mouse2DEvent(source, null, x, y, me)
source
- the source to use for the eventx
- the x coordinate in the world coordinate systemy
- the y coordinate in the world coordinate systemme
- the mouse event to get the other values frompublic Mouse2DEvent(java.lang.Object source, java.lang.Object dispatcher, double x, double y, java.awt.event.MouseEvent me)
new Mouse2DEvent(source, dispatcher, me.getID(), me.getWhen(), me.getModifiersEx(), x, y, mr.getButton(), me.getClickCount(), me.isPopupTrigger())
source
- the source to use for the eventdispatcher
- The object that constructed and fired the event.
Typically a MouseInputMode
instance.x
- the x coordinate in the world coordinate systemy
- the y coordinate in the world coordinate systemme
- the mouse event to get the other values fromMethod Detail |
---|
public double getX()
public double getY()
public int getId()
MOUSE_CLICKED
, MOUSE_DRAGGED
,
MOUSE_PRESSED
, MOUSE_RELEASED
, MOUSE_ENTERED
,
MOUSE_EXITED
, or MOUSE_MOVED
.public long getWhen()
System.currentTimeMillis()
public int getModifiers()
InputEvent.getModifiersEx()
public int getButton()
MouseEvent.getButton()
.
public int getClickCount()
MouseEvent.getClickCount()
.
public boolean isPopupTrigger()
public java.lang.Object getDispatcher()
MouseInputMode
instance.
public java.lang.String toString()
toString
in class java.util.EventObject
|
© Copyright 2000-2022, yWorks GmbH. All rights reserved. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |