Interface Selectable
- All Known Implementing Classes:
ToggleItemComponent
public interface Selectable
Represents a selectable component that allows users to make a selection from a set of options.
Classes that implement this interface must provide methods for managing the selection model and the currently selected option.
Created: 21.05.2023 Author: Tobias Madlberger (Tobias)
-
Method Summary
Modifier and TypeMethodDescriptionint
Get the index of the currently selected option from the selection model.String[]
Get the selection model containing available options.void
setSelected
(int selected) Set the index of the selected option from the selection model.
-
Method Details
-
getSelectionModel
String[] getSelectionModel()Get the selection model containing available options. This method returns an array of strings representing the available options that can be selected.- Returns:
- An array of strings representing the selection model.
-
getSelected
int getSelected()Get the index of the currently selected option from the selection model.- Returns:
- The index of the currently selected option.
-
setSelected
void setSelected(int selected) Set the index of the selected option from the selection model. The provided index should be a valid index within the selection model array.- Parameters:
selected
- The index of the option to be selected.
-