|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.gnu.glib.Struct
org.gnu.glib.GObject
org.gnu.gtk.AccelMap
public class AccelMap
Method Summary | |
---|---|
static boolean |
changeEntry(java.lang.String accelPath,
int key,
ModifierType mods,
boolean replace)
Changes the key (from KeyValue ) and ModifierType
currently associated with accelPath. |
static AccelMap |
getAccelMap()
|
static AccelMap |
getAccelMap(org.gnu.glib.Handle handle)
Internal static factory method to be used by Java-Gnome only. |
static void |
load(java.lang.String filename)
Loads a file previously saved with the same method, parses the file for accelerator specifications, and propagates them accordingly. |
static void |
lockPath(java.lang.String path)
Locks the given accelerator path. |
static AccelKey |
lookupEntry(java.lang.String accelPath)
Looks up the accelerator entry for accelPath and returns the AccelKey |
static void |
save(java.lang.String filename)
Saves the current accelerator specification (accelerator path, key, and modifiers) to the filename specified. |
static void |
unlockPath(java.lang.String path)
Undoes the last call to lockPath(String) on this accel_path. |
Methods inherited from class org.gnu.glib.Struct |
---|
equals, getHandle, getNullHandle, hashCode |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static AccelMap getAccelMap(org.gnu.glib.Handle handle)
public static AccelMap getAccelMap()
public static void load(java.lang.String filename)
filename
- The name of the file to read.public static void save(java.lang.String filename)
filename
- The name of the file to write.public static void lockPath(java.lang.String path)
unlockPath(String)
Refer to
changeEntry(String, int, ModifierType, boolean)
for information
about runtime accelerator changes. If called more than once, accel_path
remains locked until unlockPath(String)
has been called an
equivalent number of times. Note that locking of individual accelerator
paths is independent from locking the AccelGroup
containing them.
For runtime accelerator changes to be possible both the accelerator path
and its AccelGroup have to be unlocked.
path
- The path to lockpublic static void unlockPath(java.lang.String path)
lockPath(String)
on this accel_path.
Refer to lockPath(String)
for information about accelerator path
locking.
path
- The path to unlockpublic static boolean changeEntry(java.lang.String accelPath, int key, ModifierType mods, boolean replace)
KeyValue
) and ModifierType
currently associated with accelPath. Due to conflicts with other
accelerators, a change may not always be possible, replace indicates
whether other accelerators may be deleted to resolve such conflicts. A
change will only occur if all conflicts could be resolved (which might
not be the case if conflicting accelerators are locked). Successful
changes are indicated by a true return value.
accelPath
- The path to changekey
- The new KeySymbol for the pathmods
- The new modifiers to the pathreplace
- If true, removes conflicting accelerators
public static AccelKey lookupEntry(java.lang.String accelPath)
accelPath
- The path to get the accelerator entry for
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |