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 Icon
getIcon
(@NotNull ToolbarContext context) Returns the icon of this item ornull
if this item has no icon.
The recommended dimensions for this icon are: Within25x25 px
for java client toolbar button19x19
intoolbar sub items
Ensure to deliver icons of the same dimension in all methods delivering icons (icon
,pressed
,roll over
)@NotNull String
getLabel
(@NotNull ToolbarContext context) Provide the label for this item.@Nullable Icon
getPressedIcon
(@NotNull ToolbarContext context) Returns the icon in pressed state for this item ornull
if this item has no pressed icon.
If this method deliversnull
thenormal icon
will be used.@Nullable Icon
getRollOverIcon
(@NotNull ToolbarContext context) Returns an optional roll-over-icon of this item ornull
if thenormal icon
should be used.
The recommended dimensions for this icon are: Within25x25 px
for java client toolbar button19x19
intoolbar sub items
Ensure to deliver icons of the same dimension in all methods delivering icons (icon
,pressed
,roll over
) The hover background will be rendered from FirstSpirit.boolean
isEnabled
(@NotNull ToolbarContext context) Indicate, whether this item is enabled wrt. the given context.boolean
isVisible
(@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:
isEnabled
in 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:
isVisible
in 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 ornull
if this item has no icon.
The recommended dimensions for this icon are:- Within
25x25 px
for java client toolbar button 19x19
intoolbar 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 ornull
if this item has no pressed icon.
If this method deliversnull
thenormal icon
will be used. The recommended dimensions for this icon are:- Within
25x25 px
for java client toolbar button 19x19
intoolbar 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 ornull
if thenormal icon
should be used.
The recommended dimensions for this icon are:- Within
25x25 px
for java client toolbar button 19x19
intoolbar sub items
icon
,pressed
,roll over
) The hover background will be rendered from FirstSpirit. If this method deliversnull
thenormal icon
will 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
-