Package com.iizix.prop.vs
Class VSTableRowSelection
java.lang.Object
com.iizix.prop.vs.VSTableRowSelection
Class holding the changed table row selection.
- Author:
- Christopher Mindus
- Constructor SummaryConstructorsConstructorDescription- VSTableRowSelection- (VSTable table, int index) Constructor for a single selection.- VSTableRowSelection- (VSTable table, int[] indicies) Constructor for selection of indicies.
- Method SummaryModifier and TypeMethodDescription- booleanChecks if two selections are equal.- intGets the single selected row index.- int[]Gets the selected indicies.- getTable()Gets the table for the selection.- booleanReturns if the selection is a multiple selection, i.e.- booleanReturns if the selection event is a single selection event.- booleanReturns if the selection event is that all rows in the table are unselected.- toString()Returns the selection as a string as "NONE", "index", or "[index1, ..., indexN]".
- Constructor Details- VSTableRowSelectionConstructor for selection of indicies.- Parameters:
- table- The table for the selection.
- indicies- The selected indicies.
 
- VSTableRowSelectionConstructor for a single selection.- Parameters:
- table- The table for the selection.
- index- The selected row index, or -1 for no selection.
 
 
- Method Details- isUnselectedpublic boolean isUnselected()Returns if the selection event is that all rows in the table are unselected.- Returns:
- true if all rows are unselected, false otherwise.
 
- isSingleSelectionpublic boolean isSingleSelection()Returns if the selection event is a single selection event.- Returns:
- true if a single index is selected, false if no rows are selected or more than one index is selected.
 
- isMultipleSelectionpublic boolean isMultipleSelection()Returns if the selection is a multiple selection, i.e. two or more rows are selected.- Returns:
- true if two or more rows are selected, false for one row selected or no row.
 
- getSelectedIndexpublic int getSelectedIndex()Gets the single selected row index.- Returns:
- The single selection row index, or -1 if none is selected or more than one is selected.
 
- getSelectedIndiciespublic int[] getSelectedIndicies()Gets the selected indicies.- Returns:
- The selected indicies. The length of the array is zero if no selection is present. It is one in length for single selections, otherwise the array contains the sorted selected row indicies (lowest to highest index).
 
- getTableGets the table for the selection.- Returns:
- The VS table.
 
- toStringReturns the selection as a string as "NONE", "index", or "[index1, ..., indexN]".
- equalsChecks if two selections are equal.