Package com.iizix.prop.ui.selection
Class SingleIndexSelection
java.lang.Object
com.iizix.prop.ui.selection.SingleIndexSelection
- All Implemented Interfaces:
- IUIIndexedSelection,- IUISelection,- IUISingleIndexedSelection
- Direct Known Subclasses:
- AnimatedSingleIndexSelection
The single index-based selection state used by e.g. comboboxes.
- Author:
- Christopher Mindus
- Field Summary- Fields inherited from interface com.iizix.prop.ui.selection.IUISingleIndexedSelection- EMPTY
- Constructor SummaryConstructorsConstructorDescription- SingleIndexSelection- (IUISingleIndexedSelectionComp source, int selectedIndex) Constructor.
- Method SummaryModifier and TypeMethodDescription- booleanEquals.Get the source component of the event.- intGets the first selected index.- int[]Gets the selected indicies.Get the source component of the event.Get the source component of the event.Gets the UI component being the source of the event.- toString()Converts the selection to a string.- Methods inherited from class java.lang.Object- clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait- Methods inherited from interface com.iizix.prop.ui.selection.IUISelection- asAnimatedSingleIndexedSelection, asBooleanSelection, asCellSelection, asIndexedSelection, asSingleIndexedSelection, asTriStateSelection- Methods inherited from interface com.iizix.prop.ui.selection.IUISingleIndexedSelection- getFirstSelectedIndex
- Constructor Details- SingleIndexSelectionConstructor.- Parameters:
- source- The component source.
- selectedIndex- The selected index, or -1 for none.
 
 
- Method Details- getSourceGet the source component of the event.- Specified by:
- getSourcein interface- IUISelection
- Returns:
- The source.
 
- getUISourceGets the UI component being the source of the event.- Specified by:
- getUISourcein interface- IUISelection
- Returns:
- The UI component.
 
- getSelectedIndexpublic int getSelectedIndex()Gets the first selected index.- Specified by:
- getSelectedIndexin interface- IUISingleIndexedSelection
- Returns:
- The first index in the current selection, or -1 for none.
 
- getSelectedIndiciespublic int[] getSelectedIndicies()Gets the selected indicies.- Specified by:
- getSelectedIndiciesin interface- IUIIndexedSelection
- Specified by:
- getSelectedIndiciesin interface- IUISingleIndexedSelection
- Returns:
- A new array of the selected indices (that may be modified to your liking), or a static zero in length array for no selection.
 
- getIndexedSourceGet the source component of the event.- Specified by:
- getIndexedSourcein interface- IUIIndexedSelection
- Specified by:
- getIndexedSourcein interface- IUISingleIndexedSelection
- Returns:
- The indexed-type component.
 
- getSingleIndexedSourceGet the source component of the event.- Specified by:
- getSingleIndexedSourcein interface- IUISingleIndexedSelection
- Returns:
- The single-indexed-type component.
 
- equalsEquals.
- toStringConverts the selection to a string.