Enum Class ROIState
- All Implemented Interfaces:
Serializable, Comparable<ROIState>, Constable
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionROIState for a deleted ROI.ROIState for a deleted ROI that is selected by the user.ROIState for a normal selected irregular ROI when its outline is editable.ROIState for a normal, selected and editable ROI.ROIState for a normal, unselected ROI.ROIState for a normal, selected ROI. -
Method Summary
Modifier and TypeMethodDescriptionstatic ColorgetChoosableColor(int index) Returns one of the user-choosable ROI colours.getDrawColor(byte userColour) Returns the colour with which an ROI in this state should be drawn.static intReturns the number of user-choosable ROI colours that may be set.static voidsetChoosableColor(int index, Color c) Sets one of the user-choosable ROI colours.toString()Returns a string describing this ROI state.static ROIStateReturns the enum constant of this class with the specified name.static ROIState[]values()Returns an array containing the constants of this enum class, in the order they are declared.Methods inherited from class Enum
compareTo, describeConstable, equals, getDeclaringClass, hashCode, name, ordinal, valueOf
-
Enum Constant Details
-
DELETED
ROIState for a deleted ROI. -
DELETED_SELECTED
ROIState for a deleted ROI that is selected by the user. -
NORMAL
ROIState for a normal, unselected ROI. -
SELECTED
ROIState for a normal, selected ROI. -
EDITABLE
ROIState for a normal, selected and editable ROI. -
EDIT_OUTLINE
ROIState for a normal selected irregular ROI when its outline is editable.
-
-
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
-
getDrawColor
Returns the colour with which an ROI in this state should be drawn.- Parameters:
userColour- the user-defined colour for the ROI.- Returns:
- the colour with which an ROI in this state should be drawn.
-
getNChoosableColors
public static int getNChoosableColors()Returns the number of user-choosable ROI colours that may be set.- Returns:
- the number of user-choosable ROI colours that may be set.
-
getChoosableColor
Returns one of the user-choosable ROI colours.- Parameters:
index- the index to the user-choosable colour.- Returns:
- c the user-choosable colour at the given index.
- Throws:
ArrayIndexOutOfBoundsException- if the supplied index is outside the range for the number of user-choosable colours.
-
setChoosableColor
Sets one of the user-choosable ROI colours.- Parameters:
index- the index to the user-choosable colour.c- the user-choosable colour.- Throws:
ArrayIndexOutOfBoundsException- if the supplied index is outside the range for the number of user-choosable colours that may be set.
-
toString
-