Interface JavaClientToolbarItem
- All Superinterfaces:
Item<ToolbarContext>
- All Known Subinterfaces:
ExecutableGroupingToolbarItem,ExecutableToolbarItem,ToggleableToolbarItem
Definition of an item targeting the toolbar of the javaclient. These items are used to represent a main button
in the toolbar or the
ExecutableGroupingToolbarItem.getSubItems(ContextMenuContext) sub items} of a
grouping item.- Since:
- 5.0.204
-
Method Summary
Modifier and TypeMethodDescription@Nullable IcongetIcon(@NotNull ToolbarContext context) Returns the icon of this item ornullif this item has no icon.
The recommended dimensions for this icon are: Within25x25 pxfor java client toolbar button19x19intoolbar sub itemsEnsure to deliver icons of the same dimension in all methods delivering icons (icon,pressed,roll over)@NotNull StringgetLabel(@NotNull ToolbarContext context) Provide the label for this item.@Nullable IcongetPressedIcon(@NotNull ToolbarContext context) Returns the icon in pressed state for this item ornullif this item has no pressed icon.
If this method deliversnullthenormal iconwill be used.@Nullable IcongetRollOverIcon(@NotNull ToolbarContext context) Returns an optional roll-over-icon of this item ornullif thenormal iconshould be used.
The recommended dimensions for this icon are: Within25x25 pxfor java client toolbar button19x19intoolbar sub itemsEnsure to deliver icons of the same dimension in all methods delivering icons (icon,pressed,roll over) The hover background will be rendered from FirstSpirit.booleanisEnabled(@NotNull ToolbarContext context) Indicate, whether this item is enabled wrt. the given context.booleanisVisible(@NotNull ToolbarContext context) Indicates the visibility of this item wrt. the given context.
-
Method Details
-
getLabel
Provide the label for this item.- Parameters:
context- The context to be considered for providing a label.- Returns:
- A label.
- Since:
- 5.0.204
-
isEnabled
Indicate, whether this item is enabled wrt. the given context.- Specified by:
isEnabledin interfaceItem<ToolbarContext>- Parameters:
context- The context to be considered for deciding upon the item being enabled.- Returns:
true, if enabled,false, else.- Since:
- 5.0.204
-
isVisible
Indicates the visibility of this item wrt. the given context.- Specified by:
isVisiblein interfaceItem<ToolbarContext>- Parameters:
context- The context to be considered for deciding upon visibility.- Returns:
true, if visible,false, else.- Since:
- 5.0.204
-
getIcon
Returns the icon of this item ornullif this item has no icon.
The recommended dimensions for this icon are:- Within
25x25 pxfor java client toolbar button 19x19intoolbar sub items
icon,pressed,roll over)- Parameters:
context- The context to be considered for providing the icon.- Returns:
- The icon of this item or
null, if the item has no icon. - Since:
- 5.0.204
- Within
-
getPressedIcon
Returns the icon in pressed state for this item ornullif this item has no pressed icon.
If this method deliversnullthenormal iconwill be used. The recommended dimensions for this icon are:- Within
25x25 pxfor java client toolbar button 19x19intoolbar sub items
icon,pressed,roll over)- Parameters:
context- The context to be considered for providing the icon.- Returns:
- The pressed icon of this item or
null, if the item has no pressed icon. - Since:
- 5.0.204
- Within
-
getRollOverIcon
Returns an optional roll-over-icon of this item ornullif thenormal iconshould be used.
The recommended dimensions for this icon are:- Within
25x25 pxfor java client toolbar button 19x19intoolbar sub items
icon,pressed,roll over) The hover background will be rendered from FirstSpirit. If this method deliversnullthenormal iconwill be used as hover icon combined with the background.- Parameters:
context- The context to be considered for providing the icon.- Returns:
- The roll-over-icon of this item or
null, if the item has no roll-over-icon. - Since:
- 5.0.204
- Within
-