Package org.pepstock.charba.client.enums
Enum Weight
- java.lang.Object
-
- java.lang.Enum<Weight>
-
- org.pepstock.charba.client.enums.Weight
-
- All Implemented Interfaces:
Serializable,Comparable<Weight>,Key
public enum Weight extends Enum<Weight> implements Key
The weight sets how thick or thin characters in text should be displayed.- Author:
- Andrea "Stock" Stocchero
-
-
Enum Constant Summary
Enum Constants Enum Constant Description BOLDDefines thick characters.BOLDERDefines thicker characters.INHERITInherits this property from its parent element.INITIALSets this property to its default value.LIGHTERDefines lighter characters.NORMALDefines normal characters.W100Defines from thin to thick characters, value 100.W200Defines from thin to thick characters, value 200.W300Defines from thin to thick characters, value 300.W400Defines from thin to thick characters, value 400.W500Defines from thin to thick characters, value 500.W600Defines from thin to thick characters, value 600.W700Defines from thin to thick characters, value 700.W800Defines from thin to thick characters, value 800.W900Defines from thin to thick characters, value 900.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static WeightgetByIntValue(int value, Weight defaultValue)Returns the weight instance searched by the integer value.intgetValueAsInt()Returns the value definition from thin to thick characters.booleanisValueAsInt()Returnstrueif the weight has been defined by a number.Stringvalue()Returns the name value of propertystatic WeightvalueOf(String name)Returns the enum constant of this type with the specified name.static Weight[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
NORMAL
public static final Weight NORMAL
Defines normal characters. This is default.
-
BOLD
public static final Weight BOLD
Defines thick characters.
-
BOLDER
public static final Weight BOLDER
Defines thicker characters.
-
LIGHTER
public static final Weight LIGHTER
Defines lighter characters.
-
INITIAL
public static final Weight INITIAL
Sets this property to its default value.
-
INHERIT
public static final Weight INHERIT
Inherits this property from its parent element.
-
W100
public static final Weight W100
Defines from thin to thick characters, value 100.
-
W200
public static final Weight W200
Defines from thin to thick characters, value 200.
-
W300
public static final Weight W300
Defines from thin to thick characters, value 300.
-
W400
public static final Weight W400
Defines from thin to thick characters, value 400.
-
W500
public static final Weight W500
Defines from thin to thick characters, value 500.
-
W600
public static final Weight W600
Defines from thin to thick characters, value 600.
-
W700
public static final Weight W700
Defines from thin to thick characters, value 700.
-
W800
public static final Weight W800
Defines from thin to thick characters, value 800.
-
W900
public static final Weight W900
Defines from thin to thick characters, value 900.
-
-
Method Detail
-
values
public static Weight[] 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 (Weight c : Weight.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static Weight 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:KeyReturns the name value of property
-
getValueAsInt
public int getValueAsInt()
Returns the value definition from thin to thick characters.- Returns:
- the value definition from thin to thick characters
-
isValueAsInt
public boolean isValueAsInt()
Returnstrueif the weight has been defined by a number.- Returns:
trueif the weight has been defined by a number
-
getByIntValue
public static Weight getByIntValue(int value, Weight defaultValue)
Returns the weight instance searched by the integer value.- Parameters:
value- integer value to use for searchingdefaultValue- default value if the value does not match- Returns:
- the weight instance searched by the integer value
-
-