public class StripeSelection extends Object implements IStripeSelection, IEnumerable<IStripe>
IStripeSelection interface.EMPTY| Constructor and Description |
|---|
StripeSelection()
Default constructor that creates empty selection models.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addItemSelectionChangedListener(IEventHandler<ItemSelectionChangedEventArgs<IStripe>> itemSelectionChangedEvent)
Adds the given listener for the
ItemSelectionChanged event that occurs when an item changed its selection state
from selected to unselected or vice versa. |
void |
clear()
Clears the selection.
|
IEnumerator<IStripe> |
enumerator()
Returns an
IEnumerator over a set of elements of type T. |
ISelectionModel<IColumn> |
getSelectedColumns()
An
ISelectionModel of the selected columns. |
ISelectionModel<IRow> |
getSelectedRows()
An
ISelectionModel of the selected rows. |
boolean |
isCrossTableSelectionAllowed()
Whether to allow the selection to span multiple table instances.
|
boolean |
isMixedSelectionAllowed()
Whether to allow mixed row/column selections.
|
boolean |
isSelected(IStripe stripe)
Return whether
stripe is currently selected. |
protected void |
onItemSelectionChanged(ItemSelectionChangedEventArgs<IStripe> args)
Raises the
ItemSelectionChanged event. |
void |
removeItemSelectionChangedListener(IEventHandler<ItemSelectionChangedEventArgs<IStripe>> itemSelectionChangedEvent)
Removes the given listener for the
ItemSelectionChanged event that occurs when an item changed its selection
state from selected to unselected or vice versa. |
void |
setCrossTableSelectionAllowed(boolean value)
Whether to allow the selection to span multiple table instances.
|
void |
setMixedSelectionAllowed(boolean value)
Whether to allow mixed row/column selections.
|
void |
setSelected(IStripe item,
boolean selected)
Sets the selection state of an item.
|
int |
size()
Returns the number of selected items.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitconcat, concat, create, create, iterator, parallelStream, streamforEach, spliteratorpublic StripeSelection()
public final void addItemSelectionChangedListener(IEventHandler<ItemSelectionChangedEventArgs<IStripe>> itemSelectionChangedEvent)
ISelectionModelItemSelectionChanged event that occurs when an item changed its selection state
from selected to unselected or vice versa.addItemSelectionChangedListener in interface ISelectionModel<IStripe>itemSelectionChangedEvent - The listener to add.ISelectionModel.setSelected(java.lang.Object, boolean),
ISelectionModel.removeItemSelectionChangedListener(IEventHandler)public final void clear()
ISelectionModelThis is a convenience method that will set the selection state of all elements to unselected.
clear in interface ISelectionModel<IStripe>ISelectionModel.addItemSelectionChangedListener(IEventHandler)public final IEnumerator<IStripe> enumerator()
IEnumerableIEnumerator over a set of elements of type T.enumerator in interface IEnumerable<IStripe>IEnumerator.public final ISelectionModel<IColumn> getSelectedColumns()
IStripeSelectionISelectionModel of the selected columns.
This is the column part of the selection that this instance is a composite of.
getSelectedColumns in interface IStripeSelectionpublic final ISelectionModel<IRow> getSelectedRows()
IStripeSelectionISelectionModel of the selected rows.
This is the row part of the selection that this instance is a composite of.
getSelectedRows in interface IStripeSelectionpublic final boolean isCrossTableSelectionAllowed()
The default is true
isCrossTableSelectionAllowed in interface IStripeSelectionsetCrossTableSelectionAllowed(boolean)public final boolean isMixedSelectionAllowed()
The default is false
isMixedSelectionAllowed in interface IStripeSelectionsetMixedSelectionAllowed(boolean)public final boolean isSelected(IStripe stripe)
stripe is currently selected.isSelected in interface ISelectionModel<IStripe>stripe - The stripe to testtrue iff stripe is currently selectedprotected void onItemSelectionChanged(ItemSelectionChangedEventArgs<IStripe> args)
ItemSelectionChanged event.args - The parameters for the eventpublic final void removeItemSelectionChangedListener(IEventHandler<ItemSelectionChangedEventArgs<IStripe>> itemSelectionChangedEvent)
ISelectionModelItemSelectionChanged event that occurs when an item changed its selection
state from selected to unselected or vice versa.removeItemSelectionChangedListener in interface ISelectionModel<IStripe>itemSelectionChangedEvent - The listener to remove.ISelectionModel.setSelected(java.lang.Object, boolean),
ISelectionModel.addItemSelectionChangedListener(IEventHandler)public final void setCrossTableSelectionAllowed(boolean value)
The default is true
setCrossTableSelectionAllowed in interface IStripeSelectionvalue - The CrossTableSelectionAllowed to set.isCrossTableSelectionAllowed()public final void setMixedSelectionAllowed(boolean value)
The default is false
setMixedSelectionAllowed in interface IStripeSelectionvalue - The MixedSelectionAllowed to set.isMixedSelectionAllowed()public final void setSelected(IStripe item, boolean selected)
ISelectionModel
If the state changes, this will trigger the ItemSelectionChanged
event.
setSelected in interface ISelectionModel<IStripe>item - The item to set the selection state for.selected - Whether to select the object.public final int size()
ISelectionModelsize in interface ISelectionModel<IStripe>