|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.EventObject
com.threerings.opengl.gui.event.Event
com.threerings.opengl.gui.event.InputEvent
com.threerings.opengl.gui.event.MouseEvent
public class MouseEvent
Encapsulates the information associated with a mouse event.
| Field Summary | |
|---|---|
static int |
BUTTON1
A constant representing the "left" mouse button. |
static int |
BUTTON2
A constant representing the "right" mouse button. |
static int |
BUTTON3
A constant representing the middle mouse button. |
static int |
BUTTON4
A constant representing the 4th mouse button. |
static int |
BUTTON5
A constant representing the 5th mouse button. |
static int |
MOUSE_CLICKED
An event generated when a mouse button is clicked. |
static int |
MOUSE_DRAGGED
An event generated when the mouse is dragged. |
static int |
MOUSE_ENTERED
An event generated when the mouse enters a component's bounds. |
static int |
MOUSE_EXITED
An event generated when the mouse exits a component's bounds. |
static int |
MOUSE_MOVED
An event generated when the mouse is moved. |
static int |
MOUSE_PRESSED
An event generated when a mouse button is pressed. |
static int |
MOUSE_RELEASED
An event generated when a mouse button is released. |
static int |
MOUSE_WHEELED
An event generated when the mouse wheel was rotated. |
| Fields inherited from class com.threerings.opengl.gui.event.InputEvent |
|---|
ALT_DOWN_MASK, BUTTON1_DOWN_MASK, BUTTON2_DOWN_MASK, BUTTON3_DOWN_MASK, CTRL_DOWN_MASK, META_DOWN_MASK, SHIFT_DOWN_MASK |
| Constructor Summary | |
|---|---|
MouseEvent(Object source,
long when,
int modifiers,
int type,
int mx,
int my)
|
|
MouseEvent(Object source,
long when,
int modifiers,
int type,
int button,
int mx,
int my)
|
|
MouseEvent(Object source,
long when,
int modifiers,
int type,
int button,
int mx,
int my,
int ccount)
|
|
MouseEvent(Object source,
long when,
int modifiers,
int type,
int button,
int mx,
int my,
int ccount,
int delta)
|
|
| Method Summary | |
|---|---|
void |
dispatch(ComponentListener listener)
Instructs this event to notify the supplied listener if they implement an interface appropriate to this event. |
int |
getButton()
Returns the index of the button pertaining to this event ( BUTTON1, BUTTON2, or BUTTON3) or -1 if this is
not a button related event. |
int |
getClickCount()
Returns the click count of the event. |
int |
getDelta()
For mouse wheel events this indicates the delta by which the wheel was moved. |
int |
getType()
Returns the type of this event, one of MOUSE_PRESSED,
{#link MOUSE_RELEASE}, etc. |
int |
getX()
Returns the (absolute) x coordinate of the mouse at the time this event was generated. |
int |
getY()
Returns the (absolute) y coordinate of the mouse at the time this event was generated. |
| Methods inherited from class com.threerings.opengl.gui.event.InputEvent |
|---|
getModifiers, isAltDown, isControlDown, isMetaDown, isShiftDown |
| Methods inherited from class com.threerings.opengl.gui.event.Event |
|---|
consume, getWhen, isConsumed, propagateUpHierarchy, toString |
| Methods inherited from class java.util.EventObject |
|---|
getSource |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int MOUSE_PRESSED
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
public static final int MOUSE_DRAGGED
public static final int MOUSE_WHEELED
public static final int BUTTON1
public static final int BUTTON2
public static final int BUTTON3
public static final int BUTTON4
public static final int BUTTON5
| Constructor Detail |
|---|
public MouseEvent(Object source,
long when,
int modifiers,
int type,
int mx,
int my)
public MouseEvent(Object source,
long when,
int modifiers,
int type,
int button,
int mx,
int my)
public MouseEvent(Object source,
long when,
int modifiers,
int type,
int button,
int mx,
int my,
int ccount)
public MouseEvent(Object source,
long when,
int modifiers,
int type,
int button,
int mx,
int my,
int ccount,
int delta)
| Method Detail |
|---|
public int getType()
MOUSE_PRESSED,
{#link MOUSE_RELEASE}, etc.
public int getButton()
BUTTON1, BUTTON2, or BUTTON3) or -1 if this is
not a button related event.
public int getX()
public int getY()
public int getClickCount()
public int getDelta()
public void dispatch(ComponentListener listener)
Event
dispatch in class Event
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||