public class ToolItem extends Bin implements Activatable
Toolbar.
Usually you will prefer to use a subtype of this class, such as
ToolButton, in your Toolbars. However, if you want to add another
kind of Widget, you have to create a new ToolItem and add() the desired Widget to it.
ToolbarWidget.ButtonPressEvent, Widget.ButtonReleaseEvent, Widget.Destroy, Widget.Draw, Widget.EnterNotifyEvent, Widget.FocusInEvent, Widget.FocusOutEvent, Widget.Hide, Widget.KeyPressEvent, Widget.KeyReleaseEvent, Widget.LeaveNotifyEvent, Widget.MapEvent, Widget.MotionNotifyEvent, Widget.PopupMenu, Widget.QueryTooltip, Widget.ScrollEvent, Widget.SizeAllocate, Widget.UnmapEvent, Widget.VisibilityNotifyEvent| Constructor and Description |
|---|
ToolItem()
Create a new ToolItem.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
getExpand()
Get if this ToolItem will be [is] expanded in the presence of extra
available space on the Toolbar.
|
Action |
getRelatedAction()
Get the Action that is triggered when this Activatable is activated, if
any.
|
void |
setExpand(boolean expand)
Set whether this ToolItem will be expanded when there is available
space on the Toolbar.
|
void |
setIsImportant(boolean setting)
Indicate that this ToolItem is to be considered to have
"priority text".
|
void |
setRelatedAction(Action action)
Set the Action that is triggered when this Activatable is activated.
|
add, getChildren, remove, setBorderWidthactivate, addEvents, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, destroy, getAllocatedHeight, getAllocatedWidth, getAllocation, getCanDefault, getCanFocus, getHasFocus, getName, getParent, getPreferredHeightForWidthMinimum, getPreferredHeightForWidthNatural, getPreferredHeightMinimum, getPreferredHeightNatural, getPreferredWidthForHeightMinimum, getPreferredWidthForHeightNatural, getPreferredWidthMinimum, getPreferredWidthNatural, getRequestMode, getRequisition, getSensitive, getStyleContext, getToplevel, getWindow, grabAdd, grabDefault, grabFocus, grabRemove, hide, isSensitive, overrideBackground, overrideColor, overrideFont, queueDraw, queueDrawArea, realize, setAlignHorizontal, setAlignVertical, setCanDefault, setCanFocus, setEvents, setExpandHorizontal, setExpandVertical, setName, setSensitive, setSizeRequest, setTooltipMarkup, setTooltipText, show, showAllpublic boolean getExpand()
public Action getRelatedAction()
ActivatablegetRelatedAction in interface Activatablepublic void setExpand(boolean expand)
public void setIsImportant(boolean setting)
BOTH_HORIZ (which is the default in
GNOME these days) only ToolItems with this property set will have their
labels showing. For example, browsers often have the label "Back" but
not "Forward" or "Up" marked important and thus showing.public void setRelatedAction(Action action)
ActivatableThis replaced Action's connectProxy().
setRelatedAction in interface Activatable