Package com.iizix.prop.ui.selection
Class MultipleIndiciesSelection
java.lang.Object
com.iizix.prop.ui.selection.MultipleIndiciesSelection
- All Implemented Interfaces:
- IUIIndexedSelection,- IUISelection
The multiple index-based selection state used by e.g. list items or map markers.
- Author:
- Christopher Mindus
- Field Summary- Fields inherited from interface com.iizix.prop.ui.selection.IUIIndexedSelection- EMPTY
- Constructor SummaryConstructorsConstructorDescription- MultipleIndiciesSelection- (IUISingleIndexedSelectionComp source, int[] selectedIndicies) Constructor.
- Method SummaryModifier and TypeMethodDescription- booleanEquals.- intGets the first selected index.Get the source component of the event.- int[]Gets the selected indicies.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
- Constructor Details- MultipleIndiciesSelectionConstructor.- Parameters:
- source- The component source.
- selectedIndicies- The selected indicies, or null 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.
 
- getFirstSelectedIndexpublic int getFirstSelectedIndex()Gets the first selected index.- Specified by:
- getFirstSelectedIndexin interface- IUIIndexedSelection
- Returns:
- The first index in the current selection, or -1 for none.
 
- getSelectedIndiciespublic int[] getSelectedIndicies()Gets the selected indicies.- Specified by:
- getSelectedIndiciesin interface- IUIIndexedSelection
- 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. The array is always sorted from lowest to highest index.
 
- getIndexedSourceGet the source component of the event.- Specified by:
- getIndexedSourcein interface- IUIIndexedSelection
- Returns:
- The indexed-type component.
 
- equalsEquals.- Note: A single selection can match a multiple selection if both are of no-selection or the same index is selected in both, and the multiple selection indicies array has a length of one. 
- toStringConverts the selection to a string.