Interface GUISelectable<T>

Type Parameters:
T - the type of object stored.
All Known Implementing Classes:
GUICycler

public interface GUISelectable<T>
An interface that describes GUI objects that contain a set of objects.
Author:
Matthew Tropiano
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    Index value for no selection.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Gets the selected index on the object.
     
    setSelectedIndex(int index)
    Sets the selected index on the object.
  • Field Details

    • NO_SELECTION

      static final int NO_SELECTION
      Index value for no selection.
      See Also:
  • Method Details

    • getSelectedIndex

      int getSelectedIndex()
      Gets the selected index on the object.
      Returns:
      the current selected index.
    • setSelectedIndex

      GUISelectable<T> setSelectedIndex(int index)
      Sets the selected index on the object. If the index is out of bounds, it should be set to -1, meaning nothing selected.
      Parameters:
      index - the new selected index.
      Returns:
      this selectable.
    • getSelectedValue

      T getSelectedValue()
      Returns:
      the current selected value, or null if no value selected.