Package org.xhtmlrenderer.css.constants
Class IdentValue
java.lang.Object
org.xhtmlrenderer.css.constants.IdentValue
- All Implemented Interfaces:
FSDerivedValue
An IdentValue represents a string that you can assign to a CSS property,
where the string is one of several enumerated values. For example,
"whitespace" can take the values "nowrap", "pre" and "normal". There is a
static instance for all idents in the CSS 2 spec, which you can retrieve
using the
getByIdentString(String)
method. The instance doesn't have
any behavior: it's just a marker so that you can retrieve an ident from a
DerivedValue or CalculatedStyle, then compare to the instance here. For
example: CalculatedStyle style = ...getstyle from somewhere IdentValue whitespace = style.getIdent(CSSName.WHITESPACE); if ( whitespace == IdentValue.NORMAL ) { // perform normal spacing } else if ( whitespace == IdentValue.NOWRAP ) { // space with no wrapping } else if ( whitespace == IdentValue.PRE ) { // preserve spacing }All static instances are instantiated automatically, and are Singletons, so you can compare using a simple Object comparison using
==
.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final IdentValue
private static final Map<String,
IdentValue> static final IdentValue
static final IdentValue
static final IdentValue
static final IdentValue
static final IdentValue
static final IdentValue
static final IdentValue
static final IdentValue
static final IdentValue
static final IdentValue
static final IdentValue
static final IdentValue
static final IdentValue
static final IdentValue
static final IdentValue
static final IdentValue
static final IdentValue
static final IdentValue
static final IdentValue
static final IdentValue
static final IdentValue
static final IdentValue
static final IdentValue
static final IdentValue
static final IdentValue
static final IdentValue
static final IdentValue
static final IdentValue
static final IdentValue
static final IdentValue
static final IdentValue
static final IdentValue
static final IdentValue
static final IdentValue
static final IdentValue
static final IdentValue
static final IdentValue
static final IdentValue
static final IdentValue
static final IdentValue
static final IdentValue
static final IdentValue
static final IdentValue
static final IdentValue
static final IdentValue
static final IdentValue
final int
static final IdentValue
static final IdentValue
static final IdentValue
static final IdentValue
static final IdentValue
static final IdentValue
static final IdentValue
static final IdentValue
static final IdentValue
private final String
static final IdentValue
static final IdentValue
static final IdentValue
static final IdentValue
static final IdentValue
static final IdentValue
static final IdentValue
static final IdentValue
static final IdentValue
static final IdentValue
static final IdentValue
static final IdentValue
static final IdentValue
static final IdentValue
static final IdentValue
static final IdentValue
static final IdentValue
static final IdentValue
static final IdentValue
static final IdentValue
static final IdentValue
static final IdentValue
static final IdentValue
static final IdentValue
static final IdentValue
static final IdentValue
static final IdentValue
private static int
static final IdentValue
static final IdentValue
static final IdentValue
static final IdentValue
static final IdentValue
static final IdentValue
static final IdentValue
static final IdentValue
static final IdentValue
static final IdentValue
static final IdentValue
static final IdentValue
static final IdentValue
static final IdentValue
static final IdentValue
static final IdentValue
static final IdentValue
static final IdentValue
static final IdentValue
static final IdentValue
static final IdentValue
static final IdentValue
static final IdentValue
static final IdentValue
static final IdentValue
static final IdentValue
static final IdentValue
static final IdentValue
static final IdentValue
static final IdentValue
static final IdentValue
static final IdentValue
static final IdentValue
static final IdentValue
static final IdentValue
static final IdentValue
static final IdentValue
static final IdentValue
static final IdentValue
static final IdentValue
static final IdentValue
static final IdentValue
static final IdentValue
static final IdentValue
static final IdentValue
static final IdentValue
static final IdentValue
static final IdentValue
static final IdentValue
static final IdentValue
static final IdentValue
static final IdentValue
static final IdentValue
static final IdentValue
static final IdentValue
static final IdentValue
static final IdentValue
static final IdentValue
static final IdentValue
static final IdentValue
static final IdentValue
static final IdentValue
static final IdentValue
static final IdentValue
static final IdentValue
static final IdentValue
static final IdentValue
static final IdentValue
static final IdentValue
static final IdentValue
static final IdentValue
static final IdentValue
static final IdentValue
static final IdentValue
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static IdentValue
Adds a feature to the Value attribute of the IdentValue classasColor()
float
asFloat()
asString()
String[]
static IdentValue
getByIdentString
(String ident) Returns the Singleton IdentValue that corresponds to the given string, e.g.float
getFloatProportionalTo
(CSSName cssName, float baseValue, CssContext ctx) static int
boolean
boolean
boolean
boolean
isIdent()
static boolean
looksLikeIdent
(String ident) toString()
Returns a string representation of the object, in this case, the ident as a string (as it appears in the CSS spec).static IdentValue
-
Field Details
-
ALL_IDENT_VALUES
-
maxAssigned
private static int maxAssigned -
ident
-
FS_ID
public final int FS_ID -
ABSOLUTE
-
ALWAYS
-
ARMENIAN
-
AUTO
-
AVOID
-
BASELINE
-
BLINK
-
BLOCK
-
BOLD
-
BOLDER
-
BORDER_BOX
-
BOTH
-
BOTTOM
-
CAPITALIZE
-
CENTER
-
CIRCLE
-
CJK_IDEOGRAPHIC
-
CLOSE_QUOTE
-
COLLAPSE
-
COMPACT
-
CONTAIN
-
CONTENT_BOX
-
COVER
-
CREATE
-
DASHED
-
DECIMAL
-
DECIMAL_LEADING_ZERO
-
DISC
-
DOTTED
-
DOUBLE
-
DYNAMIC
-
FIXED
-
FONT_WEIGHT_100
-
FONT_WEIGHT_200
-
FONT_WEIGHT_300
-
FONT_WEIGHT_400
-
FONT_WEIGHT_500
-
FONT_WEIGHT_600
-
FONT_WEIGHT_700
-
FONT_WEIGHT_800
-
FONT_WEIGHT_900
-
FS_CONTENT_PLACEHOLDER
-
FS_INITIAL_VALUE
-
GEORGIAN
-
GROOVE
-
HEBREW
-
HIDDEN
-
HIDE
-
HIRAGANA
-
HIRAGANA_IROHA
-
INHERIT
-
INLINE
-
INLINE_BLOCK
-
INLINE_TABLE
-
INSET
-
INSIDE
-
ITALIC
-
JUSTIFY
-
KATAKANA
-
KATAKANA_IROHA
-
KEEP
-
LANDSCAPE
-
LEFT
-
LIGHTER
-
LINE
-
LINE_THROUGH
-
LIST_ITEM
-
LOWER_ALPHA
-
LOWER_GREEK
-
LOWER_LATIN
-
LOWER_ROMAN
-
LOWERCASE
-
LTR
-
MARKER
-
MIDDLE
-
NO_CLOSE_QUOTE
-
NO_OPEN_QUOTE
-
NO_REPEAT
-
NONE
-
NORMAL
-
NOWRAP
-
BREAK_WORD
-
OBLIQUE
-
OPEN_QUOTE
-
OUTSET
-
OUTSIDE
-
OVERLINE
-
PAGINATE
-
POINTER
-
PORTRAIT
-
PRE
-
PRE_LINE
-
PRE_WRAP
-
RELATIVE
-
REPEAT
-
REPEAT_X
-
REPEAT_Y
-
RIDGE
-
RIGHT
-
RUN_IN
-
SCROLL
-
SEPARATE
-
SHOW
-
SMALL_CAPS
-
SOLID
-
SQUARE
-
STATIC
-
SUB
-
SUPER
-
TABLE
-
TABLE_CAPTION
-
TABLE_CELL
-
TABLE_COLUMN
-
TABLE_COLUMN_GROUP
-
TABLE_FOOTER_GROUP
-
TABLE_HEADER_GROUP
-
TABLE_ROW
-
TABLE_ROW_GROUP
-
TEXT_BOTTOM
-
TEXT_TOP
-
THICK
-
THIN
-
TOP
-
TRANSPARENT
-
UNDERLINE
-
UPPER_ALPHA
-
UPPER_LATIN
-
UPPER_ROMAN
-
UPPERCASE
-
VISIBLE
-
CROSSHAIR
-
DEFAULT
-
EMBED
-
E_RESIZE
-
HELP
-
LARGE
-
LARGER
-
MEDIUM
-
MOVE
-
N_RESIZE
-
NE_RESIZE
-
NW_RESIZE
-
PROGRESS
-
S_RESIZE
-
SE_RESIZE
-
SMALL
-
SMALLER
-
START
-
SW_RESIZE
-
TEXT
-
W_RESIZE
-
WAIT
-
X_LARGE
-
X_SMALL
-
XX_LARGE
-
XX_SMALL
-
MANUAL
-
-
Constructor Details
-
IdentValue
-
-
Method Details
-
toString
Returns a string representation of the object, in this case, the ident as a string (as it appears in the CSS spec). -
getByIdentString
Returns the Singleton IdentValue that corresponds to the given string, e.g. for "normal" will return IdentValue.NORMAL. Use this when you have the string but need to look up the Singleton. If the string doesn't match an ident in the CSS spec, a runtime exception is thrown.- Parameters:
ident
- The identifier to retrieve the Singleton IdentValue for.
-
looksLikeIdent
-
valueOf
-
getIdentCount
public static int getIdentCount() -
addValue
Adds a feature to the Value attribute of the IdentValue class- Parameters:
ident
- The feature to be added to the Value attribute
-
isDeclaredInherit
public boolean isDeclaredInherit()- Specified by:
isDeclaredInherit
in interfaceFSDerivedValue
-
computedValue
-
asFloat
public float asFloat()- Specified by:
asFloat
in interfaceFSDerivedValue
-
asColor
- Specified by:
asColor
in interfaceFSDerivedValue
-
getFloatProportionalTo
- Specified by:
getFloatProportionalTo
in interfaceFSDerivedValue
-
asString
- Specified by:
asString
in interfaceFSDerivedValue
-
asStringArray
- Specified by:
asStringArray
in interfaceFSDerivedValue
-
asIdentValue
- Specified by:
asIdentValue
in interfaceFSDerivedValue
-
hasAbsoluteUnit
public boolean hasAbsoluteUnit()- Specified by:
hasAbsoluteUnit
in interfaceFSDerivedValue
-
isIdent
public boolean isIdent()- Specified by:
isIdent
in interfaceFSDerivedValue
-
isDependentOnFontSize
public boolean isDependentOnFontSize()- Specified by:
isDependentOnFontSize
in interfaceFSDerivedValue
-