Enum Shape
- java.lang.Object
-
- java.lang.Enum<Shape>
-
- org.pepstock.charba.client.colors.tiles.Shape
-
- All Implemented Interfaces:
Serializable
,Comparable<Shape>
,IsShape
,Key
public enum Shape extends Enum<Shape> implements IsShape
Enumerates all available shapes applicable onto a tile.- Author:
- Andrea "Stock" Stocchero
-
-
Enum Constant Summary
Enum Constants Enum Constant Description BACK_SLASHED_LINE
Draws a back slashed line.BOX
Draws a box on the tile.CROSS
Draws a cross on the tile.CROSS_DASH
Draws a cross and a dash on the tile.DASH
Draws a dash on the tile.DIAGONAL
Draws a diagonal (from left to right) on the tile.DIAMOND
Draws a diamond on the tile.DIAMOND_BOX
Draws a diamond and a box on the tile.DISC
Draws a disc on the tile.DOT
Draws a dot on the tile.DOT_DASH
Draws a dot and a dash on the tile.DOUBLE_DIAGONAL
Draws a double diagonals on the tile.EMPTY_STAR
Draws a start (no filled) on the tile.INVERTED_DIAGONAL
Draws a diagonal (from right to left) on the tile.INVERTED_DOUBLE_DIAGONAL
Draws a double diagonals (from right to left) on the tile.INVERTED_TRIANGLE
Draws a triangle (with spike down) on the tile.LINE
Draws a line on the tile.PLUS
Draws a plus on the tile.RING
Draws a ring on the tile.SLASHED_LINE
Draws a slashed line.SOLID
Draws an empty tile.SQUARE
Draws a square on the tile.STAR
Draws a star.TRIANGLE
Draws a triangle on the tile.VERTICAL_LINE
Draws a line vertically on the tile.VERTICAL_ZIGZAG
Draws a zig zag vertically on the tile.WEAVE
Draws a weave on the tile.ZIGZAG
Draws a zig zag line on the tile.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ShapeDrawer
getDrawer()
Returns the instance of shape drawer.String
getKeyPrefix()
Returns a unique key prefix for shape to use in the cache.String
value()
Returns the name value of propertystatic Shape
valueOf(String name)
Returns the enum constant of this type with the specified name.static Shape[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
BACK_SLASHED_LINE
public static final Shape BACK_SLASHED_LINE
Draws a back slashed line.
-
BOX
public static final Shape BOX
Draws a box on the tile.
-
CROSS
public static final Shape CROSS
Draws a cross on the tile.
-
CROSS_DASH
public static final Shape CROSS_DASH
Draws a cross and a dash on the tile.
-
DASH
public static final Shape DASH
Draws a dash on the tile.
-
DIAGONAL
public static final Shape DIAGONAL
Draws a diagonal (from left to right) on the tile.
-
DIAMOND
public static final Shape DIAMOND
Draws a diamond on the tile.
-
DIAMOND_BOX
public static final Shape DIAMOND_BOX
Draws a diamond and a box on the tile.
-
DISC
public static final Shape DISC
Draws a disc on the tile.
-
DOT
public static final Shape DOT
Draws a dot on the tile.
-
DOT_DASH
public static final Shape DOT_DASH
Draws a dot and a dash on the tile.
-
DOUBLE_DIAGONAL
public static final Shape DOUBLE_DIAGONAL
Draws a double diagonals on the tile.
-
EMPTY_STAR
public static final Shape EMPTY_STAR
Draws a start (no filled) on the tile.
-
INVERTED_DIAGONAL
public static final Shape INVERTED_DIAGONAL
Draws a diagonal (from right to left) on the tile.
-
INVERTED_DOUBLE_DIAGONAL
public static final Shape INVERTED_DOUBLE_DIAGONAL
Draws a double diagonals (from right to left) on the tile.
-
INVERTED_TRIANGLE
public static final Shape INVERTED_TRIANGLE
Draws a triangle (with spike down) on the tile.
-
LINE
public static final Shape LINE
Draws a line on the tile.
-
PLUS
public static final Shape PLUS
Draws a plus on the tile.
-
RING
public static final Shape RING
Draws a ring on the tile.
-
SLASHED_LINE
public static final Shape SLASHED_LINE
Draws a slashed line.
-
SOLID
public static final Shape SOLID
Draws an empty tile.
-
STAR
public static final Shape STAR
Draws a star.
-
SQUARE
public static final Shape SQUARE
Draws a square on the tile.
-
TRIANGLE
public static final Shape TRIANGLE
Draws a triangle on the tile.
-
WEAVE
public static final Shape WEAVE
Draws a weave on the tile.
-
ZIGZAG
public static final Shape ZIGZAG
Draws a zig zag line on the tile.
-
VERTICAL_LINE
public static final Shape VERTICAL_LINE
Draws a line vertically on the tile.
-
VERTICAL_ZIGZAG
public static final Shape VERTICAL_ZIGZAG
Draws a zig zag vertically on the tile.
-
-
Method Detail
-
values
public static Shape[] 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 (Shape c : Shape.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static Shape 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
-
value
public String value()
Description copied from interface:Key
Returns the name value of property
-
getKeyPrefix
public String getKeyPrefix()
Description copied from interface:IsShape
Returns a unique key prefix for shape to use in the cache.- Specified by:
getKeyPrefix
in interfaceIsShape
- Returns:
- a unique key prefix for shape to use in the cache
-
getDrawer
public ShapeDrawer getDrawer()
Description copied from interface:IsShape
Returns the instance of shape drawer.
-
-