Interface JavaClientToolbarItem

All Superinterfaces:
Item<ToolbarContext>
All Known Subinterfaces:
ExecutableGroupingToolbarItem, ExecutableToolbarItem, ToggleableToolbarItem

public interface JavaClientToolbarItem extends Item<ToolbarContext>
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 Type
    Method
    Description
    @Nullable Icon
    getIcon(@NotNull ToolbarContext context)
    Returns the icon of this item or null if this item has no icon.
    The recommended dimensions for this icon are: Within 25x25 px for java client toolbar button 19x19 in toolbar 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 or null if this item has no pressed icon.
    If this method delivers null the normal icon will be used.
    @Nullable Icon
    getRollOverIcon(@NotNull ToolbarContext context)
    Returns an optional roll-over-icon of this item or null if the normal icon should be used.
    The recommended dimensions for this icon are: Within 25x25 px for java client toolbar button 19x19 in toolbar 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

      @NotNull @NotNull String getLabel(@NotNull @NotNull ToolbarContext context)
      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

      boolean isEnabled(@NotNull @NotNull ToolbarContext context)
      Indicate, whether this item is enabled wrt. the given context.
      Specified by:
      isEnabled in interface Item<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

      boolean isVisible(@NotNull @NotNull ToolbarContext context)
      Indicates the visibility of this item wrt. the given context.
      Specified by:
      isVisible in interface Item<ToolbarContext>
      Parameters:
      context - The context to be considered for deciding upon visibility.
      Returns:
      true, if visible, false, else.
      Since:
      5.0.204
    • getIcon

      @Nullable @Nullable Icon getIcon(@NotNull @NotNull ToolbarContext context)
      Returns the icon of this item or null if this item has no icon.
      The recommended dimensions for this icon are: Ensure to deliver icons of the same dimension in all methods delivering icons (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
    • getPressedIcon

      @Nullable @Nullable Icon getPressedIcon(@NotNull @NotNull ToolbarContext context)
      Returns the icon in pressed state for this item or null if this item has no pressed icon.
      If this method delivers null the normal icon will be used. The recommended dimensions for this icon are: Ensure to deliver icons of the same dimension in all methods delivering icons (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
    • getRollOverIcon

      @Nullable @Nullable Icon getRollOverIcon(@NotNull @NotNull ToolbarContext context)
      Returns an optional roll-over-icon of this item or null if the normal icon should be used.
      The recommended dimensions for this icon are: 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. If this method delivers null the normal 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