Package org.apache.batik.css.engine
Class StyleMap
java.lang.Object
org.apache.batik.css.engine.StyleMap
This class represents objects which contains property/value mappings.
- Version:
- $Id: StyleMap.java 1733416 2016-03-03 07:07:13Z gadams $
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final short
static final short
static final short
static final short
static final short
static final short
protected boolean
Whether the values of this map cannot be re-cascaded.static final short
static final short
static final short
static final short
static final short
protected short[]
To store the value masks.static final short
static final short
static final short
static final short
static final short
static final short
static final short
protected Value[]
The values. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionshort
getMask
(int i) Returns the mask of the given property value.short
getOrigin
(int i) Returns the origin value.getValue
(int i) Returns the value at the given index, null if unspecified.boolean
Whether this map has fixed cascaded value.boolean
isBlockHeightRelative
(int i) Tells whether the given property value is relative to the height of the containing block.boolean
isBlockWidthRelative
(int i) Tells whether the given property value is relative to the width of the containing block.boolean
isColorRelative
(int i) Tells whether the given property value is relative to 'color'.boolean
isComputed
(int i) Tells whether the given property value is computed.boolean
isFontSizeRelative
(int i) Tells whether the given property value is relative to 'font-size'.boolean
isImportant
(int i) Tells whether the given property value is important.boolean
isInherited
(int i) Tells whether the given cascaded property value was inherited from it's parent or set locally.boolean
isLineHeightRelative
(int i) Tells whether the given property value is relative to 'line-height'.boolean
isNullCascaded
(int i) Tells whether the given cascaded property value is null.boolean
isParentRelative
(int i) Tells whether the given property value is relative to the parent's property value.void
putBlockHeightRelative
(int i, boolean b) Sets the block-height-relative flag of a property value.void
putBlockWidthRelative
(int i, boolean b) Sets the block-width-relative flag of a property value.void
putColorRelative
(int i, boolean b) Sets the color-relative flag of a property value.void
putComputed
(int i, boolean b) Sets the computed flag of a property value.void
putFontSizeRelative
(int i, boolean b) Sets the font-size-relative flag of a property value.void
putImportant
(int i, boolean b) Sets the priority of a property value.void
putInherited
(int i, boolean b) Sets the inherited flag of a property value.void
putLineHeightRelative
(int i, boolean b) Sets the line-height-relative flag of a property value.void
putMask
(int i, short m) Puts a property mask, given the property index.void
putNullCascaded
(int i, boolean b) Sets the null-cascaded flag of a property value.void
putOrigin
(int i, short val) Sets the origin of the given value.void
putParentRelative
(int i, boolean b) Sets the parent-relative flag of a property value.void
Puts a property value, given the property index.void
setFixedCascadedStyle
(boolean b) Sets the fixedCascadedValues property.Returns a printable representation of this style map.
-
Field Details
-
IMPORTANT_MASK
public static final short IMPORTANT_MASK- See Also:
-
COMPUTED_MASK
public static final short COMPUTED_MASK- See Also:
-
NULL_CASCADED_MASK
public static final short NULL_CASCADED_MASK- See Also:
-
INHERITED_MASK
public static final short INHERITED_MASK- See Also:
-
LINE_HEIGHT_RELATIVE_MASK
public static final short LINE_HEIGHT_RELATIVE_MASK- See Also:
-
FONT_SIZE_RELATIVE_MASK
public static final short FONT_SIZE_RELATIVE_MASK- See Also:
-
COLOR_RELATIVE_MASK
public static final short COLOR_RELATIVE_MASK- See Also:
-
PARENT_RELATIVE_MASK
public static final short PARENT_RELATIVE_MASK- See Also:
-
BLOCK_WIDTH_RELATIVE_MASK
public static final short BLOCK_WIDTH_RELATIVE_MASK- See Also:
-
BLOCK_HEIGHT_RELATIVE_MASK
public static final short BLOCK_HEIGHT_RELATIVE_MASK- See Also:
-
BOX_RELATIVE_MASK
public static final short BOX_RELATIVE_MASK- See Also:
-
ORIGIN_MASK
public static final short ORIGIN_MASK- See Also:
-
USER_AGENT_ORIGIN
public static final short USER_AGENT_ORIGIN- See Also:
-
USER_ORIGIN
public static final short USER_ORIGIN- See Also:
-
NON_CSS_ORIGIN
public static final short NON_CSS_ORIGIN- See Also:
-
AUTHOR_ORIGIN
public static final short AUTHOR_ORIGIN- See Also:
-
INLINE_AUTHOR_ORIGIN
public static final short INLINE_AUTHOR_ORIGIN- See Also:
-
OVERRIDE_ORIGIN
public static final short OVERRIDE_ORIGIN- See Also:
-
values
The values. -
masks
protected short[] masksTo store the value masks. -
fixedCascadedValues
protected boolean fixedCascadedValuesWhether the values of this map cannot be re-cascaded.
-
-
Constructor Details
-
StyleMap
public StyleMap(int size) Creates a new StyleMap.
-
-
Method Details
-
hasFixedCascadedValues
public boolean hasFixedCascadedValues()Whether this map has fixed cascaded value. -
setFixedCascadedStyle
public void setFixedCascadedStyle(boolean b) Sets the fixedCascadedValues property. -
getValue
Returns the value at the given index, null if unspecified. -
getMask
public short getMask(int i) Returns the mask of the given property value. -
isImportant
public boolean isImportant(int i) Tells whether the given property value is important. -
isComputed
public boolean isComputed(int i) Tells whether the given property value is computed. -
isNullCascaded
public boolean isNullCascaded(int i) Tells whether the given cascaded property value is null. -
isInherited
public boolean isInherited(int i) Tells whether the given cascaded property value was inherited from it's parent or set locally. -
getOrigin
public short getOrigin(int i) Returns the origin value. -
isColorRelative
public boolean isColorRelative(int i) Tells whether the given property value is relative to 'color'. -
isParentRelative
public boolean isParentRelative(int i) Tells whether the given property value is relative to the parent's property value. -
isLineHeightRelative
public boolean isLineHeightRelative(int i) Tells whether the given property value is relative to 'line-height'. -
isFontSizeRelative
public boolean isFontSizeRelative(int i) Tells whether the given property value is relative to 'font-size'. -
isBlockWidthRelative
public boolean isBlockWidthRelative(int i) Tells whether the given property value is relative to the width of the containing block. -
isBlockHeightRelative
public boolean isBlockHeightRelative(int i) Tells whether the given property value is relative to the height of the containing block. -
putValue
Puts a property value, given the property index.- Parameters:
i
- The property index.v
- The property value.
-
putMask
public void putMask(int i, short m) Puts a property mask, given the property index.- Parameters:
i
- The property index.m
- The property mask.
-
putImportant
public void putImportant(int i, boolean b) Sets the priority of a property value. -
putOrigin
public void putOrigin(int i, short val) Sets the origin of the given value. -
putComputed
public void putComputed(int i, boolean b) Sets the computed flag of a property value. -
putNullCascaded
public void putNullCascaded(int i, boolean b) Sets the null-cascaded flag of a property value. -
putInherited
public void putInherited(int i, boolean b) Sets the inherited flag of a property value. If true this computed value was inherited from it's parent. -
putColorRelative
public void putColorRelative(int i, boolean b) Sets the color-relative flag of a property value. -
putParentRelative
public void putParentRelative(int i, boolean b) Sets the parent-relative flag of a property value. -
putLineHeightRelative
public void putLineHeightRelative(int i, boolean b) Sets the line-height-relative flag of a property value. -
putFontSizeRelative
public void putFontSizeRelative(int i, boolean b) Sets the font-size-relative flag of a property value. -
putBlockWidthRelative
public void putBlockWidthRelative(int i, boolean b) Sets the block-width-relative flag of a property value. -
putBlockHeightRelative
public void putBlockHeightRelative(int i, boolean b) Sets the block-height-relative flag of a property value. -
toString
Returns a printable representation of this style map.
-