Package selector

Enum Class SplineSelectionModel.SplineState

java.lang.Object
java.lang.Enum<SplineSelectionModel.SplineState>
selector.SplineSelectionModel.SplineState
All Implemented Interfaces:
Serializable, Comparable<SplineSelectionModel.SplineState>, Constable, SelectionModel.SelectionState
Enclosing class:
SplineSelectionModel

static enum SplineSelectionModel.SplineState extends Enum<SplineSelectionModel.SplineState> implements SelectionModel.SelectionState
The possible states that a spline 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 Constants
    Enum Constant
    Description
    An even number of control points have been selected.
    No selection is currently in progress (no starting point has been selected).
    An odd number of control points have been selected.
    The selection path represents a closed selection that start and ends at the same point.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Return whether it is legal to invoke `addPoint()` in this state in order to extend the selection.
    boolean
    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
    Return whether it is legal to invoke `undo()` in this state in order to remove the control point that was most recently added.
    boolean
    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.
    Returns an array containing the constants of this enum class, in the order they are declared.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • NO_SELECTION

      public static final SplineSelectionModel.SplineState NO_SELECTION
      No selection is currently in progress (no starting point has been selected).
    • ODD

      public static final SplineSelectionModel.SplineState ODD
      An odd number of control points have been selected. The current selection path ends at the last control point (assuming there are more than 1). The selection cannot be finished (because the total number of control points in a complete selection must be even).
    • EVEN

      public static final SplineSelectionModel.SplineState EVEN
      An even number of control points have been selected. The last control point does not lie on the selection path. The selection can be finished.
    • SELECTED

      public static final SplineSelectionModel.SplineState 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

      public static SplineSelectionModel.SplineState[] 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

      public static SplineSelectionModel.SplineState valueOf(String name)
      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 name
      NullPointerException - 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 interface SelectionModel.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 interface SelectionModel.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 interface SelectionModel.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 interface SelectionModel.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 interface SelectionModel.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 interface SelectionModel.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 interface SelectionModel.SelectionState