Enum VertexShape
- java.lang.Object
-
- java.lang.Enum<VertexShape>
-
- adams.gui.visualization.object.objectannotations.outline.VertexShape
-
- All Implemented Interfaces:
Serializable
,Comparable<VertexShape>
public enum VertexShape extends Enum<VertexShape>
Shapes for plotting vertices.- Author:
- fracpete (fracpete at waikato dot ac dot nz)
-
-
Enum Constant Summary
Enum Constants Enum Constant Description BOX
a square box.BOX_FILLED
a filled square box.CIRCLE
a circle.CIRCLE_FILLED
a filled circle.NONE
no shape.TRIANGLE
a triangle.TRIANGLE_FILLED
a filled triangle.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
plot(Graphics2D g, int posX, int posY, int extent)
Plots the shape at the specified position.static VertexShape
valueOf(String name)
Returns the enum constant of this type with the specified name.static VertexShape[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
NONE
public static final VertexShape NONE
no shape.
-
BOX
public static final VertexShape BOX
a square box.
-
BOX_FILLED
public static final VertexShape BOX_FILLED
a filled square box.
-
CIRCLE
public static final VertexShape CIRCLE
a circle.
-
CIRCLE_FILLED
public static final VertexShape CIRCLE_FILLED
a filled circle.
-
TRIANGLE
public static final VertexShape TRIANGLE
a triangle.
-
TRIANGLE_FILLED
public static final VertexShape TRIANGLE_FILLED
a filled triangle.
-
-
Method Detail
-
values
public static VertexShape[] 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 (VertexShape c : VertexShape.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static VertexShape 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 nameNullPointerException
- if the argument is null
-
plot
public void plot(Graphics2D g, int posX, int posY, int extent)
Plots the shape at the specified position.- Parameters:
g
- the graphics contextposX
- the x positionposY
- the y positionextent
- the size of the marker
-
-