Enum GradientOrientation
- java.lang.Object
-
- java.lang.Enum<GradientOrientation>
-
- org.pepstock.charba.client.colors.GradientOrientation
-
- All Implemented Interfaces:
Serializable,Comparable<GradientOrientation>,Key
public enum GradientOrientation extends Enum<GradientOrientation> implements Key
Represents the gradient orientation for gradient.
Every orientation contains also on which gradient type can be applied.- Author:
- Andrea "Stock" Stocchero
-
-
Enum Constant Summary
Enum Constants Enum Constant Description BOTTOM_LEFTFrom bottom(right) to left(top) (diagonal)BOTTOM_RIGHTFrom bottom(left) to right(top) (diagonal)BOTTOM_UPFrom bottom to to (vertical)IN_OUTFrom center to the borders (ONLY radial)LEFT_RIGHTFrom left to right (horizontal)OUT_INFrom borders to the center (ONLY radial)RIGHT_LEFTFrom right to left (horizontal)TOP_DOWNFrom top to bottom (vertical)TOP_LEFTFrom top(right) to left(bottom) (diagonal)TOP_RIGHTFrom top(left) to right(bottom) (diagonal)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetCssStatement()Returns the CSS statement which represents the gradient orientation.static GradientOrientationgetDefaultByType(GradientType type)Returns the default orientation based on gradient type.GradientTypegetType()Returns the supported gradient type.Stringvalue()Returns the name value of propertystatic GradientOrientationvalueOf(String name)Returns the enum constant of this type with the specified name.static GradientOrientation[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
TOP_DOWN
public static final GradientOrientation TOP_DOWN
From top to bottom (vertical)
-
BOTTOM_UP
public static final GradientOrientation BOTTOM_UP
From bottom to to (vertical)
-
LEFT_RIGHT
public static final GradientOrientation LEFT_RIGHT
From left to right (horizontal)
-
RIGHT_LEFT
public static final GradientOrientation RIGHT_LEFT
From right to left (horizontal)
-
TOP_RIGHT
public static final GradientOrientation TOP_RIGHT
From top(left) to right(bottom) (diagonal)
-
BOTTOM_LEFT
public static final GradientOrientation BOTTOM_LEFT
From bottom(right) to left(top) (diagonal)
-
TOP_LEFT
public static final GradientOrientation TOP_LEFT
From top(right) to left(bottom) (diagonal)
-
BOTTOM_RIGHT
public static final GradientOrientation BOTTOM_RIGHT
From bottom(left) to right(top) (diagonal)
-
IN_OUT
public static final GradientOrientation IN_OUT
From center to the borders (ONLY radial)
-
OUT_IN
public static final GradientOrientation OUT_IN
From borders to the center (ONLY radial)
-
-
Method Detail
-
values
public static GradientOrientation[] 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 (GradientOrientation c : GradientOrientation.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static GradientOrientation 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
-
getType
public GradientType getType()
Returns the supported gradient type.- Returns:
- the supported gradient type
-
value
public String value()
Description copied from interface:KeyReturns the name value of property
-
getDefaultByType
public static final GradientOrientation getDefaultByType(GradientType type)
Returns the default orientation based on gradient type.- Parameters:
type- gradient type- Returns:
- the default orientation based on gradient type.
-
getCssStatement
public String getCssStatement()
Returns the CSS statement which represents the gradient orientation.- Returns:
- the CSS statement which represents the gradient orientation
-
-