Class UIItemList.Item

java.lang.Object
heronarts.glx.ui.component.UIItemList.Item
Direct Known Subclasses:
UIItemList.Section
Enclosing interface:
UIItemList

public abstract static class UIItemList.Item extends Object
Interface to which items in the list must conform
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected boolean
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Dispose of the item
    int
    Active background color for this item
    abstract String
    String label that displays on this item
    Section that this item belongs to
    boolean
    Whether this item is in a special active state
    boolean
    Whether the item is checked, applies only if checkbox mode set on the list.
    void
    Action handler, invoked when item is activated
    void
    onCheck(boolean checked)
    Action handler invoked when item is checked
    void
    Action handler, invoked when item is deactivated.
    void
    Action handler, invoked when item is deleted
    void
    Action handler, invoked when item is focused
    void
    Action handler, invoked when an item is renamed.
    void
    onReorder(int order)
    Action handler, invoked when an item is reordered.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • hidden

      protected boolean hidden
  • Constructor Details

    • Item

      public Item()
  • Method Details

    • isActive

      public boolean isActive()
      Whether this item is in a special active state
      Returns:
      If this item is active
    • isChecked

      public boolean isChecked()
      Whether the item is checked, applies only if checkbox mode set on the list.
      Returns:
      If this item is checked
    • getActiveColor

      public int getActiveColor(UI ui)
      Active background color for this item
      Parameters:
      ui - UI context
      Returns:
      Background color
    • getLabel

      public abstract String getLabel()
      String label that displays on this item
      Returns:
      Label for the item
    • onActivate

      public void onActivate()
      Action handler, invoked when item is activated
    • onCheck

      public void onCheck(boolean checked)
      Action handler invoked when item is checked
      Parameters:
      checked - If checked
    • onDeactivate

      public void onDeactivate()
      Action handler, invoked when item is deactivated. Only applies when setMomentary(true)
    • onRename

      public void onRename(String name)
      Action handler, invoked when an item is renamed. Only applies when setRenamable(true)
      Parameters:
      name - New name for item
    • onReorder

      public void onReorder(int order)
      Action handler, invoked when an item is reordered. Only applies to the item that the action was taken upon, not other items affected by the reordering. Only applies when setReorderable(true)
      Parameters:
      order - New position for item
    • onDelete

      public void onDelete()
      Action handler, invoked when item is deleted
    • onFocus

      public void onFocus()
      Action handler, invoked when item is focused
    • getSection

      public UIItemList.Section getSection()
      Section that this item belongs to
      Returns:
      section or null
    • dispose

      public void dispose()
      Dispose of the item