Package com.iizix.prop.vs
Class VSTableRowSelection
- java.lang.Object
- com.iizix.prop.vs.VSTableRowSelection
 
- public final class VSTableRowSelection extends java.lang.ObjectClass holding the changed table row selection.- Author:
- Christopher Mindus
 
- Constructor Summary- Constructors - Constructor - Description - VSTableRowSelection(VSTable table, int index)Constructor for a single selection.- VSTableRowSelection(VSTable table, int[] indicies)Constructor for selection of indicies.
 - Method Summary- All Methods Instance Methods Concrete Methods - Modifier and Type - Method - Description - boolean- equals(java.lang.Object o)Checks if two selections are equal.- int- getSelectedIndex()Gets the single selected row index.- int[]- getSelectedIndicies()Gets the selected indicies.- VSTable- getTable()Gets the table for the selection.- boolean- isMultipleSelection()Returns if the selection is a multiple selection, i.e.- boolean- isSingleSelection()Returns if the selection event is a single selection event.- boolean- isUnselected()Returns if the selection event is that all rows in the table are unselected.- java.lang.String- toString()Returns the selection as a string as "NONE", "index", or "[index1, ..., indexN]".
 
- Constructor Detail- VSTableRowSelection- public VSTableRowSelection(VSTable table, int[] indicies) Constructor for selection of indicies.- Parameters:
- table- The table for the selection.
- indicies- The selected indicies.
 
 - VSTableRowSelection- public VSTableRowSelection(VSTable table, int index) Constructor for a single selection.- Parameters:
- table- The table for the selection.
- index- The selected row index, or -1 for no selection.
 
 
 - Method Detail- isUnselected- public 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.
 
 - isSingleSelection- public 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.
 
 - isMultipleSelection- public 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.
 
 - getSelectedIndex- public 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.
 
 - getSelectedIndicies- public 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).
 
 - getTable- public VSTable getTable() Gets the table for the selection.- Returns:
- The VS table.
 
 - toString- public java.lang.String toString() Returns the selection as a string as "NONE", "index", or "[index1, ..., indexN]".- Overrides:
- toStringin class- java.lang.Object
- Returns:
- The selection string for e.g. debug purposes.
 
 - equals- public boolean equals(java.lang.Object o) Checks if two selections are equal.- Overrides:
- equalsin class- java.lang.Object
- Parameters:
- o- The Object to check equality with.
- Returns:
- true if the Object ois the same selection, false if not the same selection or the object is not an instance of this class.