com.jidesoft.gauge
Enum MarkerShape
java.lang.Object
java.lang.Enum<MarkerShape>
com.jidesoft.gauge.MarkerShape
- All Implemented Interfaces:
- MarkerShapeFactory, Serializable, Comparable<MarkerShape>
public enum MarkerShape
- extends Enum<MarkerShape>
- implements MarkerShapeFactory
This class acts both as a value to indicate a type of shape as well as a factory class to generate a Shape instance
given some size and position parameters.
Method Summary |
Shape |
createShape(double x,
double y,
double width,
double height)
This is the method of the MarkerShapeFactory interface that is called by the DialValueMarker class |
static MarkerShape |
valueOf(String name)
Returns the enum constant of this type with the specified name. |
static MarkerShape[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared. |
DOWN_TRIANGLE
public static final MarkerShape DOWN_TRIANGLE
UP_TRIANGLE
public static final MarkerShape UP_TRIANGLE
ELLIPSE
public static final MarkerShape ELLIPSE
RECTANGLE
public static final MarkerShape RECTANGLE
values
public static MarkerShape[] 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 (MarkerShape c : MarkerShape.values())
System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in
the order they are declared
valueOf
public static MarkerShape valueOf(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:
IllegalArgumentException
- if this enum type has no constant
with the specified name
NullPointerException
- if the argument is null
createShape
public Shape createShape(double x,
double y,
double width,
double height)
- This is the method of the MarkerShapeFactory interface that is called by the DialValueMarker class
- Specified by:
createShape
in interface MarkerShapeFactory
- Parameters:
x
- the pixel x coordinatey
- the pixel y coordinatewidth
- the width of the shapeheight
- the height of the shape
- Returns:
- the shape for the marker