net.grelf.grip
Enum DrawingMode

java.lang.Object
  extended by java.lang.Enum<DrawingMode>
      extended by net.grelf.grip.DrawingMode
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<DrawingMode>

public enum DrawingMode
extends java.lang.Enum<DrawingMode>

Define the modes by which a user can interact with an image with a mouse, to create a PointList. Some modes are measuring modes: when the mouse is released a dialogue appears showing the measurements of the drawn shape. The mouse interaction code is in ImPane. The points or shape are drawn by GlassPane.


Enum Constant Summary
BLOB_HOVER
          On the image obtained by detecting blobs, display measurements of the nearest blob as the mouse moves.
BLOB_PAIR
          Similar to POINT_PAIR except that each point is always on the nearest blob to the mouse cursor when it is moved or clicked.
CALIBRATE
          Interaction is the same as for POINT_PAIR but calibration will be set when the mouse is released.
CLOSED_CURVE
          Similar to open curve but when the mouse is released a closed curve is created by appending the starting point to the list of points; this is a measuring mode.
CONTROL_POINTS
          For setting multiple unconnected points on an image.
CROP
          Similar to RECTANGLE but when the mouse is released the image is cropped to the rectangle instead of being measured.
DELETE_MATCHES
          Same interaction as RECTANGLE but on releasing the mouse a search of match lists is done to find any which intersect the rectangle.
ENCLOSE_SPECTRUM
          Same interaction as RECTANGLE but on releasing the mouse the image is analysed for a star spectrum
HOVER
          Measurements are shown over the image while the mouse is moved across it.
KERNEL
          Same interaction as POINT (single point) but when the mouse is released the centre of a convolution is set rather than the point being measured.
MASK
          Not for user interaction but to tell GlassPane to use the mask of thresholded pixels.
MOVE
          For moving the last measurement shape.
OPEN_CURVE
          Drag the mouse around to create a list of points, ending when the mouse is released; this is a measuring mode.
POINT
          Single mouse click creates one point; while the mouse is held down a cross is shown, which can be dragged to the required position; this is a measuring mode.
POINT_PAIR
          First mouse click creates one point; then drag an elastic line around; releasing the mouse creates the second point; this is a measuring mode.
PROFILE2D
          Interaction the same as for RECTANGLE but a 2D profile is drawn on release.
RECTANGLE
          Interaction is similar to POINT_PAIR but an elastic rectangle is drawn which has the two points as opposite corners; this is a measuring mode.
STAR_CHART
          Another mouse hovering mode, this time for when the image is a star chart.
STAR_PAIR
          Similar to BLOB_PAIR but for use with a StarChart, where we have a list of net.grelf.Star objects rather than Blobs.
UNDEFINED
          No user interaction is expected or possible in this mode.
WHOLE
          Says that the whole image is to be measured, without waiting for any interaction; this is a measuring mode.
ZOOM_POINT_M
          Point for zooming into Mandelbrot curve.
 
Method Summary
static DrawingMode valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static DrawingMode[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

BLOB_HOVER

public static final DrawingMode BLOB_HOVER
On the image obtained by detecting blobs, display measurements of the nearest blob as the mouse moves.


BLOB_PAIR

public static final DrawingMode BLOB_PAIR
Similar to POINT_PAIR except that each point is always on the nearest blob to the mouse cursor when it is moved or clicked. Only available after blobs have been detected in the levels menu, so in some ways similar also to BLOB_HOVER.


CALIBRATE

public static final DrawingMode CALIBRATE
Interaction is the same as for POINT_PAIR but calibration will be set when the mouse is released.


CLOSED_CURVE

public static final DrawingMode CLOSED_CURVE
Similar to open curve but when the mouse is released a closed curve is created by appending the starting point to the list of points; this is a measuring mode.


CONTROL_POINTS

public static final DrawingMode CONTROL_POINTS
For setting multiple unconnected points on an image.


CROP

public static final DrawingMode CROP
Similar to RECTANGLE but when the mouse is released the image is cropped to the rectangle instead of being measured.


DELETE_MATCHES

public static final DrawingMode DELETE_MATCHES
Same interaction as RECTANGLE but on releasing the mouse a search of match lists is done to find any which intersect the rectangle. For each one found, ask the user to confirm deleting it.


ENCLOSE_SPECTRUM

public static final DrawingMode ENCLOSE_SPECTRUM
Same interaction as RECTANGLE but on releasing the mouse the image is analysed for a star spectrum


HOVER

public static final DrawingMode HOVER
Measurements are shown over the image while the mouse is moved across it.


KERNEL

public static final DrawingMode KERNEL
Same interaction as POINT (single point) but when the mouse is released the centre of a convolution is set rather than the point being measured.


MASK

public static final DrawingMode MASK
Not for user interaction but to tell GlassPane to use the mask of thresholded pixels.


MOVE

public static final DrawingMode MOVE
For moving the last measurement shape. When the mouse is released the image is re-measured. This is a measuring mode.


OPEN_CURVE

public static final DrawingMode OPEN_CURVE
Drag the mouse around to create a list of points, ending when the mouse is released; this is a measuring mode.


POINT

public static final DrawingMode POINT
Single mouse click creates one point; while the mouse is held down a cross is shown, which can be dragged to the required position; this is a measuring mode.


POINT_PAIR

public static final DrawingMode POINT_PAIR
First mouse click creates one point; then drag an elastic line around; releasing the mouse creates the second point; this is a measuring mode.


PROFILE2D

public static final DrawingMode PROFILE2D
Interaction the same as for RECTANGLE but a 2D profile is drawn on release.


RECTANGLE

public static final DrawingMode RECTANGLE
Interaction is similar to POINT_PAIR but an elastic rectangle is drawn which has the two points as opposite corners; this is a measuring mode.


STAR_CHART

public static final DrawingMode STAR_CHART
Another mouse hovering mode, this time for when the image is a star chart. Mouse cursor will show star details.


STAR_PAIR

public static final DrawingMode STAR_PAIR
Similar to BLOB_PAIR but for use with a StarChart, where we have a list of net.grelf.Star objects rather than Blobs.


UNDEFINED

public static final DrawingMode UNDEFINED
No user interaction is expected or possible in this mode.


WHOLE

public static final DrawingMode WHOLE
Says that the whole image is to be measured, without waiting for any interaction; this is a measuring mode.


ZOOM_POINT_M

public static final DrawingMode ZOOM_POINT_M
Point for zooming into Mandelbrot curve.

Method Detail

values

public static DrawingMode[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (DrawingMode c : DrawingMode.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static DrawingMode valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null