|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.threerings.opengl.gui.util.PseudoKeys
public class PseudoKeys
Provides a unified system for handling keys, mouse buttons, and other key-like features. The
pseudo-keys are in the same identifier space as the key codes defined in Keyboard.
| Nested Class Summary | |
|---|---|
static class |
PseudoKeys.Adapter
For convenience, provides no-op implementations of the observer interface. |
static interface |
PseudoKeys.Observer
An interface for objects listening for key press and release events. |
static class |
PseudoKeys.Unifier
Processes unconsumed key, mouse, and controller events, converting them into unified "key" events. |
| Field Summary | |
|---|---|
static int |
KEY_BUTTON1
A special "key" mapping for the left mouse button. |
static int |
KEY_BUTTON2
A special "key" mapping for the right mouse button. |
static int |
KEY_BUTTON3
A special "key" mapping for the middle mouse button. |
static int |
KEY_BUTTON4
A special "key" mapping for the 4th mouse button. |
static int |
KEY_BUTTON5
A special "key" mapping for the 5th mouse button. |
static int |
KEY_CONTROLLER_AXIS_NEGATIVE
A special "key" mapping for negative movement on a controller axis. |
static int |
KEY_CONTROLLER_AXIS_POSITIVE
A special "key" mapping for positive movement on a controller axis. |
static int |
KEY_CONTROLLER_BUTTON
A special "key" mapping for a controller button. |
static int |
KEY_CONTROLLER_POV_X_NEGATIVE
A special "key" mapping for negative movement on a controller pov x axis. |
static int |
KEY_CONTROLLER_POV_X_POSITIVE
A special "key" mapping for positive movement on a controller pov x axis. |
static int |
KEY_CONTROLLER_POV_Y_NEGATIVE
A special "key" mapping for negative movement on a controller pov y axis. |
static int |
KEY_CONTROLLER_POV_Y_POSITIVE
A special "key" mapping for positive movement on a controller pov y axis. |
static int |
KEY_WHEEL_DOWN
A special "key" mapping for scrolling the mouse wheel down. |
static int |
KEY_WHEEL_UP
A special "key" mapping for scrolling the mouse wheel up. |
| Constructor Summary | |
|---|---|
PseudoKeys()
|
|
| Method Summary | |
|---|---|
static int |
getControlIndex(int key)
Returns the control index. |
static int |
getControllerIndex(int key)
Returns the controller index. |
static int |
getControllerKey(int type,
int controllerIndex,
int controlIndex)
Returns the "key" mapping for the identified controller parameters. |
static String |
getDesc(com.threerings.util.MessageBundle msgs,
int key)
Returns a string describing the specified key. |
static int |
getMouseKey(int button)
Returns the "key" mapping for the identified mouse button. |
static String |
getName(int key)
Returns the name for the specified key. |
static int |
getType(int key)
Returns the key type. |
static boolean |
isValid(int key)
Checks whether the supplied key is valid. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int KEY_BUTTON1
public static final int KEY_BUTTON2
public static final int KEY_BUTTON3
public static final int KEY_WHEEL_UP
public static final int KEY_WHEEL_DOWN
public static final int KEY_CONTROLLER_BUTTON
public static final int KEY_CONTROLLER_AXIS_POSITIVE
public static final int KEY_CONTROLLER_AXIS_NEGATIVE
public static final int KEY_CONTROLLER_POV_X_POSITIVE
public static final int KEY_CONTROLLER_POV_X_NEGATIVE
public static final int KEY_CONTROLLER_POV_Y_POSITIVE
public static final int KEY_CONTROLLER_POV_Y_NEGATIVE
public static final int KEY_BUTTON4
public static final int KEY_BUTTON5
| Constructor Detail |
|---|
public PseudoKeys()
| Method Detail |
|---|
public static int getMouseKey(int button)
public static int getControllerKey(int type,
int controllerIndex,
int controlIndex)
public static boolean isValid(int key)
public static String getDesc(com.threerings.util.MessageBundle msgs,
int key)
public static String getName(int key)
public static int getType(int key)
public static int getControllerIndex(int key)
public static int getControlIndex(int key)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||