Package org.pepstock.charba.client.enums
Enum Fill
- java.lang.Object
-
- java.lang.Enum<Fill>
-
- org.pepstock.charba.client.enums.Fill
-
- All Implemented Interfaces:
Serializable
,Comparable<Fill>
,Key
,IsFill
public enum Fill extends Enum<Fill> implements IsFill
Both line and radar charts support a fill option on the data set object which can be used to create area between two data sets or a data set and a boundary.
These are the constants of predefined filling mode values.- Author:
- Andrea "Stock" Stocchero
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static IsFill
getFill(int index)
Returns a fill, based on absolute data set index, using the passed index.static IsFill
getFill(String index)
Returns a fill, based on relative data set index, using the passed index.
If the passed argument is not a relative data set index, checks if is predefined fill.FillingMode
getMode()
Returns the type of filling.String
getValue()
Returns the value as string (valid ONLY for relative dataset index and predefined), otherwiseUndefined.STRING
.int
getValueAsInt()
Returns the value as integer (valid ONLY for absolute dataset index), otherwiseUndefined.INTEGER
.static boolean
isPredefined(IsFill fill)
Checks if the fill passed by argument is a predefined fill, the returnstrue
.String
value()
Returns the name value of propertystatic Fill
valueOf(String name)
Returns the enum constant of this type with the specified name.static Fill[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
START
public static final Fill START
Fill the area from the bottom X axis
-
END
public static final Fill END
Fill the area from the top X axis
-
ORIGIN
public static final Fill ORIGIN
Fill the area from 0 axis to top or bottom, depending on value.
Default.
-
STACK
public static final Fill STACK
Fill the area from stacked value below.
-
FALSE
public static final Fill FALSE
Does not fill any area
-
-
Method Detail
-
values
public static Fill[] 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 (Fill c : Fill.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static Fill 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
-
getMode
public FillingMode getMode()
Description copied from interface:IsFill
Returns the type of filling.
-
getValueAsInt
public int getValueAsInt()
Description copied from interface:IsFill
Returns the value as integer (valid ONLY for absolute dataset index), otherwiseUndefined.INTEGER
.- Specified by:
getValueAsInt
in interfaceIsFill
- Returns:
- the value as integer (valid ONLY for absolute dataset index), otherwise
Undefined.INTEGER
.
-
getValue
public String getValue()
Description copied from interface:IsFill
Returns the value as string (valid ONLY for relative dataset index and predefined), otherwiseUndefined.STRING
.- Specified by:
getValue
in interfaceIsFill
- Returns:
- the value as string (valid ONLY for relative dataset index and predefined), otherwise
Undefined.STRING
.
-
isPredefined
public static boolean isPredefined(IsFill fill)
Checks if the fill passed by argument is a predefined fill, the returnstrue
.- Parameters:
fill
- fill instance- Returns:
true
if the fill passed by argument is a predefined fill otherwisefalse
.
-
getFill
public static IsFill getFill(int index)
Returns a fill, based on absolute data set index, using the passed index.- Parameters:
index
- absolute data set index to use for filling- Returns:
- a fill object with the right configuration to set in the chart
-
getFill
public static IsFill getFill(String index)
Returns a fill, based on relative data set index, using the passed index.
If the passed argument is not a relative data set index, checks if is predefined fill.- Parameters:
index
- relative data set index to use for filling- Returns:
- a fill object with the right configuration to set in the chart.
-
-