|
VRJConfig UI API |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.vrjuggler.vrjconfig.commoneditors.EditorHelpers
public abstract class EditorHelpers
A collection of general helper functions that may be of use to authors of custom editors for VRJConfig.
| Field Summary |
|---|
| Constructor Summary | |
|---|---|
EditorHelpers()
|
|
| Method Summary | |
|---|---|
static int |
convertJavaKeyToJuggler(int javaKey)
Converts the given Java virtual key or mouse button (as defined in java.awt.event.KeyEvent and
java.awt.event.MouseEvent respectively) to the corresponding
VR Juggler key value. |
static int |
convertJavaModifiersToJuggler(int javaModifiers)
Converts the given modfier set (a composition of Java modifier masks as defined in java.awt.event.InputEvent) to the equivalent
VR Juggler modifier interpretation. |
static int |
convertJugglerKeyToJava(int jugglerKey)
Converts the given VR Juggler key to the corresponding Java virtual key or mouse button (as defined in java.awt.event.KeyEvent
and java.awt.event.MouseEvent respectively). |
static String |
getKeyPressText(ConfigElement keypressElt)
Constructs a string describing the given config element of type EditorConstants.KEY_MODIFIER_PAIR_TYPE. |
static String |
getKeyPressText(int key,
int mod)
Constructs a string describing the given key+modifier combination. |
static String |
getModifierText(int mod)
Constructs a string describing the given modifier value. |
static boolean |
isAllowedJavaKey(int javaKey)
Determines whether the given Java virtual key or mouse button value (as defined in java.awt.event.Keyevent and
java.awt.event.MouseEvent respectively) is allowed to be
used with VR Juggler configurations. |
static boolean |
isJavaKey(int v)
Determines whether the given value represents a Java virtual key. |
static boolean |
isJavaMouseButton(int v)
Determines whether the given value represents a Java mouse button. |
static boolean |
isJugglerKey(int v)
Determines whether the given value represents a VR Juggler key (in other words, not a VR Juggler mouse button or VR Juggler mouse motion). |
static boolean |
isJugglerMouseButton(int v)
Determines whether the given value represents a VR Juggler mouse button. |
static boolean |
isJugglerMouseMotion(int v)
Determines whether the given value represents a VR Juggler mouse motion. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public EditorHelpers()
| Method Detail |
|---|
public static int convertJavaKeyToJuggler(int javaKey)
java.awt.event.KeyEvent and
java.awt.event.MouseEvent respectively) to the corresponding
VR Juggler key value.
javaKey - the Java vritual key or mouse button value to convert
to a VR Juggler key value
KeyEvent,
MouseEventpublic static int convertJugglerKeyToJava(int jugglerKey)
java.awt.event.KeyEvent
and java.awt.event.MouseEvent respectively).
jugglerKey - the VR Juggler key value to convert to the Java
virtual key or mouse button value
KeyEvent,
MouseEventpublic static int convertJavaModifiersToJuggler(int javaModifiers)
java.awt.event.InputEvent) to the equivalent
VR Juggler modifier interpretation. If the modifier set contains
multiple modifiers, the value returned will be
EditorConstants.MODKEY_ANY_INT_VALUE.
javaModifiers - the modifier set that is a bitmask of values
such as
java.awt.event.InputEvent.CTRL_MASK
and/or
java.awt.event.InputEvent.ALT_MASK
EditorConstants.MODKEY_ANY_INT_VALUE,
EditorConstants.MODKEY_ALT_INT_VALUE,
EditorConstants.MODKEY_CTRL_INT_VALUE,
EditorConstants.MODKEY_SHIFT_INT_VALUE, or
EditorConstants.MODKEY_NONE_INT_VALUE.InputEvent,
InputEvent.getModifiers()public static boolean isAllowedJavaKey(int javaKey)
java.awt.event.Keyevent and
java.awt.event.MouseEvent respectively) is allowed to be
used with VR Juggler configurations.
KeyEvent,
MouseEvent,
convertJavaKeyToJuggler(int),
convertJavaModifiersToJuggler(int)public static boolean isJugglerMouseButton(int v)
public static boolean isJugglerMouseMotion(int v)
public static boolean isJugglerKey(int v)
public static boolean isJavaMouseButton(int v)
MouseEventpublic static boolean isJavaKey(int v)
KeyEventpublic static String getKeyPressText(ConfigElement keypressElt)
EditorConstants.KEY_MODIFIER_PAIR_TYPE.
keypressElt - a config element of type
EditorConstants.KEY_MODIFIER_PAIR_TYPE
public static String getKeyPressText(int key,
int mod)
key - a VR Juggler key value (including mouse buttons and
mouse motions)mod - a VR Juggler modifier key value
convertJavaKeyToJuggler(int),
convertJavaModifiersToJuggler(int)public static String getModifierText(int mod)
mod - a VR Juggler modifier key value
convertJavaModifiersToJuggler(int)
|
VRJConfig UI API |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||