Interface ToggleableToolbarItem

All Superinterfaces:
Item<ToolbarContext>, JavaClientToolbarItem, ToggleablePluginItem<ToolbarContext>

public interface ToggleableToolbarItem extends JavaClientToolbarItem, ToggleablePluginItem<ToolbarContext>
A toggleable item to be used in a toolbar.
Since:
5.0.204
  • Method Details

    • setSelected

      void setSelected(@NotNull @NotNull ToolbarContext context, boolean selected)
      Sets the selection mode of this item.
      Specified by:
      setSelected in interface ToggleablePluginItem<ToolbarContext>
      Parameters:
      context - The context operating in.
      selected - true, if selected.
      Since:
      5.0.204
    • getSelectedIcon

      @Nullable @Nullable Icon getSelectedIcon(@NotNull @NotNull ToolbarContext context)
      Returns the icon of this item in selected state or null if the pressed icon should be used.
      The recommended dimensions for this icon is within 25x25 px. Ensure to deliver icons of the same dimension in all methods delivering icons (selected, icon, pressed, roll over)
      Parameters:
      context - The context to be considered for providing the icon.
      Returns:
      The icon of this item in selected state or null, if the pressed icon should be used.
      Since:
      5.0.204