UserSelectionState class

A immutable description of the disposition of UserSelectionModels in a given moment.

selections stores the currently active user selections.

This is the portion of selections on SwayzeSelectionController that are created and changed by user gestures. It is guaranteed to have at least one user selection active at any given moment.

See also:

Annotations

Properties

activeCellCoordinate → IntVector2
The cell that represents the origin of the current selection state.
no setter
hashCode int
The hash code for this object.
no setteroverride
primarySelection UserSelectionModel
The selection that contains the activeCellCoordinate.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
secondarySelections Iterable<UserSelectionModel>
no setter
selections → BuiltList<UserSelectionModel>
The currently active selections.
final

Methods

addSelection(UserSelectionModel newSelection) UserSelectionState
Add a new selection to the end of selections.
expandLastSelection(AxisDirection direction, {required IntVector2 getNextCoordinate(IntVector2 coordinate)}) UserSelectionState
Expands last selection in a given AxisDirection.
expandLastSelectionByBlock(AxisDirection direction, {required IntVector2 getNextCoordinateInCellsBlock(IntVector2 coordinate), required int limit}) UserSelectionState
Expands last selection in a given AxisDirection by a block of cells.
moveActiveCell(IntVector2 getNextCoordinate(IntVector2 coordinate)) UserSelectionState
Converts the primarySelection's originCell into a CellUserSelectionModel and moves it in a given AxisDirection.
moveActiveCellByBlock(IntVector2 getNextCoordinateInCellsBlock(IntVector2 coordinate)) UserSelectionState
Converts the primarySelection's originCell into a CellUserSelectionModel and moves it in a given AxisDirection by a block of cells.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
reset() UserSelectionState
Reset user selections into it's initial value.
resetSelectionsToACellSelection({required IntVector2 anchor, required IntVector2 focus}) UserSelectionState
Reset all selections to a single CellUserSelectionModel created from anchor and focus.
resetSelectionsToHeaderSelection({required Axis axis, required int anchor, required int focus}) UserSelectionState
Reset all selections to a single HeaderUserSelectionModel created from anchor, focus and axis.
resetSelectionsToTableSelection() UserSelectionState
Converts the last selections's to a new TableUserSelectionModel
toString() String
A string representation of this object.
inherited
updateLastSelectionToCellSelection({IntVector2? anchor, required IntVector2 focus}) UserSelectionState
Transform the last selection on selections into a CellUserSelectionModel with anchor and focus.
updateLastSelectionToHeaderSelection({int? anchor, required int focus, required Axis axis}) UserSelectionState
Transform the last selection on selections into a HeaderUserSelectionModel with anchor, focus and axis.

Operators

operator ==(Object other) bool
The equality operator.
override

Static Properties

initial UserSelectionState
A UserSelectionState to be applied to a table as soon as it renders for the first time.
no setter