org.gnu.gtk
Class AccelLabel
java.lang.Object
org.gnu.glib.Struct
org.gnu.glib.GObject
org.gnu.gtk.GtkObject
org.gnu.gtk.Widget
org.gnu.gtk.Misc
org.gnu.gtk.Label
org.gnu.gtk.AccelLabel
public class AccelLabel
- extends Label
The AccelLabel widget is a subclass of Label that also displays an
accelerator key on the right side of the label text, e.g. 'Ctrl+S'. It is
commonly used in menus to show the keyboard shortcut for the command.
The accelerator key to display is not set explicitly. Instead, the AccelLabel
displays the accelerator which have been added to a particular widget. This
widget is set by calling setAccelWidget().
Constructor Summary |
AccelLabel(org.gnu.glib.Handle handle)
Construct a AccelLabel using a handle to a native resource. |
AccelLabel(java.lang.String str)
Create an AccelLabel. |
Methods inherited from class org.gnu.gtk.Label |
getAngle, getAttributes, getEllipsize, getJustification, getLabel, getLabel, getLineWrap, getMaxWidthChars, getMnemonicWidget, getSelectable, getSelected, getSelectionEnd, getSelectionStart, getSingleLineMode, getText, getUseMarkup, getUseMnemonic, getWidthChars, select, setAngle, setAttributes, setEllipsize, setJustification, setLabel, setLineWrap, setMarkup, setMarkup, setMaxWidthChars, setMnemonicWidget, setSelectable, setSingleLineMode, setText, setUnderlinePattern, setUseMarkup, setUseMnemonic, setWidthChars |
Methods inherited from class org.gnu.gtk.Widget |
activate, addAccelerator, addEvents, addListener, addListener, addListener, addListener, addListener, addListener, addListener, addListener, addListener, addListener, addListener, canActivateAccel, createContext, createLayout, draw, drawArea, drawArea, finish, getAccessible, getAllocation, getCanFocus, getColormap, getContext, getData, getDisplay, getDragData, getEventListenerClass, getEventType, getExtensionEvents, getModifierStyle, getName, getParent, getParentWindow, getPointer, getRootWindow, getScreen, getSensitive, getStyle, getToplevel, getWidget, getWindow, grabDefault, grabFocus, hasFocus, hasScreen, hide, hideAll, highlight, highlight, intersect, isAncestor, makeWidget, modifyStyle, popColormap, pushColormap, realize, removeAccelerator, removeListener, removeListener, removeListener, removeListener, removeListener, removeListener, removeListener, removeListener, removeListener, removeListener, removeListener, reparent, setBackgroundColor, setBaseColor, setCanFocus, setColormap, setDoubleBuffered, setDragDestination, setDragIcon, setDragIconPixbuf, setDragIconStock, setDragSource, setEvents, setExtensionEvents, setFont, setForegroundColor, setMinimumSize, setName, setNoDragDestination, setNoDragSource, setSensitive, setTextColor, shapeCombineMask, show, showAll, unHighlight, unHighlight |
Methods inherited from class org.gnu.glib.GObject |
addEventHandler, addEventHandler, addEventHandler, addEventHandler, addEventHandler, addEventHandler, addEventHandler, addListener, collect, freezeNotify, getBooleanProperty, getData, getDoubleProperty, 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 |
AccelLabel
public AccelLabel(java.lang.String str)
- Create an AccelLabel.
AccelLabel
public AccelLabel(org.gnu.glib.Handle handle)
- Construct a AccelLabel using a handle to a native resource.
getAccelLabel
public static AccelLabel getAccelLabel(org.gnu.glib.Handle handle)
- Internal static factory method to be used by Java-Gnome only.
setAccelWidget
public void setAccelWidget(Widget accelWidget)
- Set the widget for this AccelLabel
getAccelWidget
public Widget getAccelWidget()
- Retrieve the widget for this AccelLabel
getAccelWidth
public int getAccelWidth()
- Returns the width needed to display the accelerator key(s). This is used
by menus to align all of the MenuItem widgets and shouldn't be needed by
applications.
- Returns:
- The width needed to display the accelerator keys.
getType
public static Type getType()
- Retrieve the runtime type used by the GLib library.