org.gnu.gtk
Class AccelGroup

java.lang.Object
  extended by org.gnu.glib.Struct
      extended by org.gnu.glib.GObject
          extended by org.gnu.gtk.AccelGroup

public class AccelGroup
extends GObject

An AccelGroup represents a group of keyboard accelerators, typically attached to a toplevel Window. Usually you will not need to create an AccelGroup directoy; instead, when using ItemFactory, GTK+ automatically sets up the accelerators for your menus in the item factory's AccelGroup.

Note that accelerators are different from mnemonics. Accelerators are shortcuts for activating a menu item; they appear alongside the menu item they're a shortcut for. For example, "Ctrl+Q" might appear alongside the "Quit" menu item. Mnemonics are shortcuts for GUI elements such as text entries or buttons; they appear as underlined characters.


Constructor Summary
AccelGroup()
          Create a new AccelGroup.
AccelGroup(org.gnu.glib.Handle handle)
          Create a new AccelGroup from a handle to a native resource.
 
Method Summary
static AccelGroup getAccelGroup(org.gnu.glib.Handle handle)
          Create a new AccelGroup from a handle to a native resource.
static Type getType()
          Retrieve the runtime type used by the GLib library.
 void lock()
          Locks the accelerator group.
 void unlock()
          Undoes the last call to lock.
 
Methods inherited from class org.gnu.glib.GObject
addEventHandler, addEventHandler, addEventHandler, addEventHandler, addEventHandler, addEventHandler, addEventHandler, addListener, collect, freezeNotify, getBooleanProperty, getData, getDoubleProperty, getEventListenerClass, getEventType, getFloatProperty, getGObjectFromHandle, getIntProperty, getJavaObjectProperty, getLongProperty, getPixbufProperty, getProperty, getStringProperty, hasProperty, notify, removeEventHandler, removeListener, setBooleanProperty, setData, setDoubleProperty, setFloatProperty, setIntProperty, setJavaObjectProperty, setLongProperty, setPixbufProperty, setProperty, setStringProperty, thawNotify
 
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
 

Constructor Detail

AccelGroup

public AccelGroup()
Create a new AccelGroup.


AccelGroup

public AccelGroup(org.gnu.glib.Handle handle)
Create a new AccelGroup from a handle to a native resource.

Method Detail

getAccelGroup

public static AccelGroup getAccelGroup(org.gnu.glib.Handle handle)
Create a new AccelGroup from a handle to a native resource.


lock

public void lock()
Locks the accelerator group. Locking an acclerator group prevents the accelerators contained within it to be changed during runtime. If this method is called more than once, the AccelGroup remains locked until unlock is called the equivalent number of times.


unlock

public void unlock()
Undoes the last call to lock.


getType

public static Type getType()
Retrieve the runtime type used by the GLib library.