org.gnu.gtk
Class Accelerator

java.lang.Object
  extended by org.gnu.gtk.Accelerator

Deprecated. This class is part of the java-gnome 2.x family of libraries, which, due to their inefficiency and complexity, are no longer being maintained and have been abandoned by the java-gnome project. This class may in the future have an equivalent in java-gnome 4.0, try looking for org.gnome.gtk.Accelerator. You should be aware that there is a considerably different API in the new library: the architecture is completely different and most notably internals are no longer exposed to public view.

public class Accelerator
extends java.lang.Object

Since:
2.8.1

Constructor Summary
Accelerator()
          Deprecated.  
 
Method Summary
static ModifierType getDefaultModifierMask()
          Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
static java.lang.String getLabel(int key, ModifierType mods)
          Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
static java.lang.String getName(int key, ModifierType mods)
          Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
static boolean isValid(int key, ModifierType mods)
          Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
static int parseKey(java.lang.String accelerator)
          Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
static ModifierType parseModifier(java.lang.String accelerator)
          Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
static void setDefaultModifierMask(ModifierType mask)
          Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Accelerator

public Accelerator()
Deprecated. 
Method Detail

isValid

public static boolean isValid(int key,
                              ModifierType mods)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Determines whether a given keyv and modifier mask constitute a valid keyboard accelerator. For example, the KeyChar.a key plus ModifierType.CONTROL_MASK is valid - this is a "Ctrl+a" accelerator. But, you can't, for instance, use the KeySymbol.Control_L keyval as an accelerator.

Parameters:
key - The key for the accelerator4
mods - The modifiers for the accelerator4
Returns:
true if the accelerator is valid, false otherwise
Since:
2.8.1

parseKey

public static int parseKey(java.lang.String accelerator)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Parses a string representing an accelerator. The format looks like "a" or "F1" or "z" (the last one is for key release). The parser is fairly liberal and allows lower or upper case, and also abbreviations such as "" and "". If the parse fails, it will return a KeySymbol with value 0.

Parameters:
accelerator - The string to parse
Returns:
The int (from KeyValue) corresponding to the key part of the accelerator
Since:
2.8.1

parseModifier

public static ModifierType parseModifier(java.lang.String accelerator)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Parses a string representing an accelerator. The format looks like "a" or "F1" or "z" (the last one is for key release). The parser is fairly liberal and allows lower or upper case, and also abbreviations such as "" and "". If the parse fails, it will return a ModifierType with value 0.

Parameters:
accelerator - The string to parse
Returns:
The ModifierType corresponding to the modifier mask of the accelerator
Since:
2.8.1

getName

public static java.lang.String getName(int key,
                                       ModifierType mods)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Converts an accelerator keyval and modifier mask into a string parseable by parseKey(String) or parseModifier(String). For example, if you pass in KeySymbol.q and ModifierType.CONTROL_MASK, this function returns "q". If you need to display accelerators in the user interface, see getLabel(int, ModifierType).

Parameters:
key - The key for the accelerator
mods - The modifier mask for the accelerator
Returns:
The string representation of the accelerator
Since:
2.8.1

getLabel

public static java.lang.String getLabel(int key,
                                        ModifierType mods)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Converts an accelerator keyval and modifier mask into a string which can be used to represent the accelerator to the user.

Parameters:
key - The key for teh accelerator
mods - The modifier mask for the accelerator
Returns:
The user-readable string representation of the accelerator

setDefaultModifierMask

public static void setDefaultModifierMask(ModifierType mask)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Sets the modifiers that will be considered significant for keyboard accelerators. The default mod mask is CONTROL_MASK | SHIFT_MASK | MOD1_MASK | SUPER_MASK | HYPER_MASK | META_MASK, that is, Control, Shift, Alt, Super, Hyper and Meta. Other modifiers will by default be ignored by AccelGroup. You must include at least the three modifiers Control, Shift and Alt in any value you pass to this function. The default mod mask should be changed on application startup, before using any accelerator groups.

Parameters:
mask - The new default modifier mask

getDefaultModifierMask

public static ModifierType getDefaultModifierMask()
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Gets the value set by setDefaultModifierMask(ModifierType).

Returns:
The default modifier mask