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 -
Method Summary
Modifier and TypeMethodDescriptionintGets the selected index on the object.setSelectedIndex(int index) Sets the selected index on the object.
-
Field Details
-
NO_SELECTION
static final int NO_SELECTIONIndex value for no selection.- See Also:
-
-
Method Details
-
getSelectedIndex
int getSelectedIndex()Gets the selected index on the object.- Returns:
- the current selected index.
-
setSelectedIndex
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.
-