|
||||||||||
| 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.ControllerEvent
public class ControllerEvent
Encapsulates the information associated with a controller (joystick, gamepad) event.
| Field Summary | |
|---|---|
static int |
CONTROLLER_MOVED
An event generated when the controller is moved on an axis. |
static int |
CONTROLLER_POV_X_MOVED
An event generated when the controller's pov is moved on the x axis. |
static int |
CONTROLLER_POV_Y_MOVED
An event generated when the controller's pov is moved on the y axis. |
static int |
CONTROLLER_PRESSED
An event generated when a controller button is pressed. |
static int |
CONTROLLER_RELEASED
An event generated when a controller button is released. |
| 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 | |
|---|---|
ControllerEvent(org.lwjgl.input.Controller source,
long when,
int modifiers,
int type,
float value)
Creates a new controller pov event. |
|
ControllerEvent(org.lwjgl.input.Controller source,
long when,
int modifiers,
int type,
int controlIndex)
Creates a new controller button event. |
|
ControllerEvent(org.lwjgl.input.Controller source,
long when,
int modifiers,
int type,
int controlIndex,
boolean xAxis,
boolean yAxis,
float value)
Creates a new controller event. |
|
| Method Summary | |
|---|---|
void |
dispatch(ComponentListener listener)
Instructs this event to notify the supplied listener if they implement an interface appropriate to this event. |
int |
getControlIndex()
Returns the index of the control (button or axis) that caused the event, or -1 if not caused by a button or axis. |
org.lwjgl.input.Controller |
getController()
Returns a reference to the controller that caused the event. |
int |
getType()
Returns the type of this event, one of CONTROLLER_PRESSED,
{#link CONTROLLER_RELEASED}, etc. |
float |
getValue()
Returns the value corresponding to the event. |
boolean |
isXAxis()
Checks whether the event pertains to the x axis. |
boolean |
isYAxis()
Checks whether the event pertains to the y axis. |
| 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 CONTROLLER_PRESSED
public static final int CONTROLLER_RELEASED
public static final int CONTROLLER_MOVED
public static final int CONTROLLER_POV_X_MOVED
public static final int CONTROLLER_POV_Y_MOVED
| Constructor Detail |
|---|
public ControllerEvent(org.lwjgl.input.Controller source,
long when,
int modifiers,
int type,
int controlIndex)
public ControllerEvent(org.lwjgl.input.Controller source,
long when,
int modifiers,
int type,
float value)
public ControllerEvent(org.lwjgl.input.Controller source,
long when,
int modifiers,
int type,
int controlIndex,
boolean xAxis,
boolean yAxis,
float value)
| Method Detail |
|---|
public org.lwjgl.input.Controller getController()
public int getType()
CONTROLLER_PRESSED,
{#link CONTROLLER_RELEASED}, etc.
public int getControlIndex()
public boolean isXAxis()
public boolean isYAxis()
public float getValue()
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 | |||||||||