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().
getAccelLabel
public static AccelLabel getAccelLabel(Handle handle)
Internal static factory method to be used by Java-Gnome only.
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.
- The width needed to display the accelerator keys.
getType
public static Type getType()
Retrieve the runtime type used by the GLib library.
- getType in interface Label
setAccelWidget
public void setAccelWidget(Widget accelWidget)
Set the widget for this AccelLabel