Package heronarts.glx.ui.component
Class UIItemList.Item
java.lang.Object
heronarts.glx.ui.component.UIItemList.Item
- Direct Known Subclasses:
UIItemList.Section
- Enclosing interface:
- UIItemList
Interface to which items in the list must conform
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
dispose()
Dispose of the itemint
getActiveColor
(UI ui) Active background color for this itemabstract String
getLabel()
String label that displays on this itemSection that this item belongs toboolean
isActive()
Whether this item is in a special active stateboolean
Whether the item is checked, applies only if checkbox mode set on the list.void
Action handler, invoked when item is activatedvoid
onCheck
(boolean checked) Action handler invoked when item is checkedvoid
Action handler, invoked when item is deactivated.void
onDelete()
Action handler, invoked when item is deletedvoid
onFocus()
Action handler, invoked when item is focusedvoid
Action handler, invoked when an item is renamed.void
onReorder
(int order) Action handler, invoked when an item is reordered.
-
Field Details
-
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
Active background color for this item- Parameters:
ui
- UI context- Returns:
- Background color
-
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
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
Section that this item belongs to- Returns:
- section or null
-
dispose
public void dispose()Dispose of the item
-