Package selector
Enum Class PointToPointSelectionModel.PointToPointState
java.lang.Object
java.lang.Enum<PointToPointSelectionModel.PointToPointState>
selector.PointToPointSelectionModel.PointToPointState
- All Implemented Interfaces:
Serializable
,Comparable<PointToPointSelectionModel.PointToPointState>
,Constable
,SelectionModel.SelectionState
- Enclosing class:
PointToPointSelectionModel
static enum PointToPointSelectionModel.PointToPointState
extends Enum<PointToPointSelectionModel.PointToPointState>
implements SelectionModel.SelectionState
The possible states that a point-to-point selection model can be in.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionNo selection is currently in progress (no starting point has been selected).The selection path represents a closed selection that start and ends at the same point.Currently assembling a selection. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Return whether it is legal to invoke `addPoint()` in this state in order to extend the selection.boolean
canEdit()
Return whether it is legal to invoke `movePoint()` in this state in order to modify the location of an existing control point.boolean
Return whether it is legal to invoke `finishSelection()` in this state in order to close the selection by connecting it back to its start.boolean
canUndo()
Return whether it is legal to invoke `undo()` in this state in order to remove the control point that was most recently added.boolean
isEmpty()
Return true if we are at the start of the selection process and no control points have been defined.boolean
Return true if the selection has been completed, in which case no more points can be added, but the existing points can be moved.boolean
Return whether this is a transient state that is performing work in the background.Returns the enum constant of this class with the specified name.values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
NO_SELECTION
No selection is currently in progress (no starting point has been selected). -
SELECTING
Currently assembling a selection. A starting point has been selected, and the selection path may contain a sequence of segments, which can be appended to by adding points. -
SELECTED
The selection path represents a closed selection that start and ends at the same point. Points may be moved, but no additional points may be added. The selected region of the image may be extracted and saved from this state.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
isEmpty
public boolean isEmpty()Description copied from interface:SelectionModel.SelectionState
Return true if we are at the start of the selection process and no control points have been defined.- Specified by:
isEmpty
in interfaceSelectionModel.SelectionState
-
isFinished
public boolean isFinished()Description copied from interface:SelectionModel.SelectionState
Return true if the selection has been completed, in which case no more points can be added, but the existing points can be moved.- Specified by:
isFinished
in interfaceSelectionModel.SelectionState
-
canUndo
public boolean canUndo()Description copied from interface:SelectionModel.SelectionState
Return whether it is legal to invoke `undo()` in this state in order to remove the control point that was most recently added.- Specified by:
canUndo
in interfaceSelectionModel.SelectionState
-
canAddPoint
public boolean canAddPoint()Description copied from interface:SelectionModel.SelectionState
Return whether it is legal to invoke `addPoint()` in this state in order to extend the selection.- Specified by:
canAddPoint
in interfaceSelectionModel.SelectionState
-
canFinish
public boolean canFinish()Description copied from interface:SelectionModel.SelectionState
Return whether it is legal to invoke `finishSelection()` in this state in order to close the selection by connecting it back to its start.- Specified by:
canFinish
in interfaceSelectionModel.SelectionState
-
canEdit
public boolean canEdit()Description copied from interface:SelectionModel.SelectionState
Return whether it is legal to invoke `movePoint()` in this state in order to modify the location of an existing control point.- Specified by:
canEdit
in interfaceSelectionModel.SelectionState
-
isProcessing
public boolean isProcessing()Description copied from interface:SelectionModel.SelectionState
Return whether this is a transient state that is performing work in the background. Typically the only legal operations in such a state are `cancelProcessing()` and `reset()`.- Specified by:
isProcessing
in interfaceSelectionModel.SelectionState
-