|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.gnu.gtk.Accelerator
public class Accelerator
Constructor Summary | |
---|---|
Accelerator()
|
Method Summary | |
---|---|
static ModifierType |
getDefaultModifierMask()
Gets the value set by setDefaultModifierMask(ModifierType) . |
static java.lang.String |
getLabel(int key,
ModifierType mods)
Converts an accelerator keyval and modifier mask into a string which can be used to represent the accelerator to the user. |
static java.lang.String |
getName(int key,
ModifierType mods)
Converts an accelerator keyval and modifier mask into a string parseable by parseKey(String) or parseModifier(String) . |
static boolean |
isValid(int key,
ModifierType mods)
Determines whether a given keyv and modifier mask constitute a valid keyboard accelerator. |
static int |
parseKey(java.lang.String accelerator)
Parses a string representing an accelerator. |
static ModifierType |
parseModifier(java.lang.String accelerator)
Parses a string representing an accelerator. |
static void |
setDefaultModifierMask(ModifierType mask)
Sets the modifiers that will be considered significant for keyboard accelerators. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Accelerator()
Method Detail |
---|
public static boolean isValid(int key, ModifierType mods)
key
- The key for the accelerator4mods
- The modifiers for the accelerator4
public static int parseKey(java.lang.String accelerator)
accelerator
- The string to parse
KeyValue
) corresponding to the key part of
the acceleratorpublic static ModifierType parseModifier(java.lang.String accelerator)
accelerator
- The string to parse
public static java.lang.String getName(int key, ModifierType mods)
parseKey(String)
or parseModifier(String)
. For
example, if you pass in KeySymbol.q and ModifierType.CONTROL_MASK, this
function returns "getLabel(int, ModifierType)
.
key
- The key for the acceleratormods
- The modifier mask for the accelerator
public static java.lang.String getLabel(int key, ModifierType mods)
key
- The key for teh acceleratormods
- The modifier mask for the accelerator
public static void setDefaultModifierMask(ModifierType mask)
mask
- The new default modifier maskpublic static ModifierType getDefaultModifierMask()
setDefaultModifierMask(ModifierType)
.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |