org.apache.batik.css.engine

Class StyleMap

public class StyleMap extends Object

This class represents objects which contains property/value mappings.
Field Summary
static shortAUTHOR_ORIGIN
static shortBLOCK_HEIGHT_RELATIVE_MASK
static shortBLOCK_WIDTH_RELATIVE_MASK
static shortBOX_RELATIVE_MASK
static shortCOLOR_RELATIVE_MASK
static shortCOMPUTED_MASK
protected booleanfixedCascadedValues
Whether the values of this map cannot be re-cascaded.
static shortFONT_SIZE_RELATIVE_MASK
static shortIMPORTANT_MASK
static shortINHERITED_MASK
static shortINLINE_AUTHOR_ORIGIN
static shortLINE_HEIGHT_RELATIVE_MASK
protected short[]masks
To store the value masks.
static shortNON_CSS_ORIGIN
static shortNULL_CASCADED_MASK
static shortORIGIN_MASK
static shortOVERRIDE_ORIGIN
static shortPARENT_RELATIVE_MASK
static shortUSER_AGENT_ORIGIN
static shortUSER_ORIGIN
protected Value[]values
The values.
Constructor Summary
StyleMap(int size)
Creates a new StyleMap.
Method Summary
shortgetMask(int i)
Returns the mask of the given property value.
shortgetOrigin(int i)
Returns the origin value.
ValuegetValue(int i)
Returns the value at the given index, null if unspecified.
booleanhasFixedCascadedValues()
Whether this map has fixed cascaded value.
booleanisBlockHeightRelative(int i)
Tells whether the given property value is relative to the height of the containing block.
booleanisBlockWidthRelative(int i)
Tells whether the given property value is relative to the width of the containing block.
booleanisColorRelative(int i)
Tells whether the given property value is relative to 'color'.
booleanisComputed(int i)
Tells whether the given property value is computed.
booleanisFontSizeRelative(int i)
Tells whether the given property value is relative to 'font-size'.
booleanisImportant(int i)
Tells whether the given property value is important.
booleanisInherited(int i)
Tells whether the given cascaded property value was inherited from it's parent or set locally.
booleanisLineHeightRelative(int i)
Tells whether the given property value is relative to 'line-height'.
booleanisNullCascaded(int i)
Tells whether the given cascaded property value is null.
booleanisParentRelative(int i)
Tells whether the given property value is relative to the parent's property value.
voidputBlockHeightRelative(int i, boolean b)
Sets the block-height-relative flag of a property value.
voidputBlockWidthRelative(int i, boolean b)
Sets the block-width-relative flag of a property value.
voidputColorRelative(int i, boolean b)
Sets the color-relative flag of a property value.
voidputComputed(int i, boolean b)
Sets the computed flag of a property value.
voidputFontSizeRelative(int i, boolean b)
Sets the font-size-relative flag of a property value.
voidputImportant(int i, boolean b)
Sets the priority of a property value.
voidputInherited(int i, boolean b)
Sets the inherited flag of a property value.
voidputLineHeightRelative(int i, boolean b)
Sets the line-height-relative flag of a property value.
voidputMask(int i, short m)
Puts a property mask, given the property index.
voidputNullCascaded(int i, boolean b)
Sets the null-cascaded flag of a property value.
voidputOrigin(int i, short val)
Sets the origin of the given value.
voidputParentRelative(int i, boolean b)
Sets the parent-relative flag of a property value.
voidputValue(int i, Value v)
Puts a property value, given the property index.
voidsetFixedCascadedStyle(boolean b)
Sets the fixedCascadedValues property.
StringtoString(CSSEngine eng)
Returns a printable representation of this style map.

Field Detail

AUTHOR_ORIGIN

public static final short AUTHOR_ORIGIN

BLOCK_HEIGHT_RELATIVE_MASK

public static final short BLOCK_HEIGHT_RELATIVE_MASK

BLOCK_WIDTH_RELATIVE_MASK

public static final short BLOCK_WIDTH_RELATIVE_MASK

BOX_RELATIVE_MASK

public static final short BOX_RELATIVE_MASK

COLOR_RELATIVE_MASK

public static final short COLOR_RELATIVE_MASK

COMPUTED_MASK

public static final short COMPUTED_MASK

fixedCascadedValues

protected boolean fixedCascadedValues
Whether the values of this map cannot be re-cascaded.

FONT_SIZE_RELATIVE_MASK

public static final short FONT_SIZE_RELATIVE_MASK

IMPORTANT_MASK

public static final short IMPORTANT_MASK

INHERITED_MASK

public static final short INHERITED_MASK

INLINE_AUTHOR_ORIGIN

public static final short INLINE_AUTHOR_ORIGIN

LINE_HEIGHT_RELATIVE_MASK

public static final short LINE_HEIGHT_RELATIVE_MASK

masks

protected short[] masks
To store the value masks.

NON_CSS_ORIGIN

public static final short NON_CSS_ORIGIN

NULL_CASCADED_MASK

public static final short NULL_CASCADED_MASK

ORIGIN_MASK

public static final short ORIGIN_MASK

OVERRIDE_ORIGIN

public static final short OVERRIDE_ORIGIN

PARENT_RELATIVE_MASK

public static final short PARENT_RELATIVE_MASK

USER_AGENT_ORIGIN

public static final short USER_AGENT_ORIGIN

USER_ORIGIN

public static final short USER_ORIGIN

values

protected Value[] values
The values.

Constructor Detail

StyleMap

public StyleMap(int size)
Creates a new StyleMap.

Method Detail

getMask

public short getMask(int i)
Returns the mask of the given property value.

getOrigin

public short getOrigin(int i)
Returns the origin value.

getValue

public Value getValue(int i)
Returns the value at the given index, null if unspecified.

hasFixedCascadedValues

public boolean hasFixedCascadedValues()
Whether this map has fixed cascaded value.

isBlockHeightRelative

public boolean isBlockHeightRelative(int i)
Tells whether the given property value is relative to the height of the containing block.

isBlockWidthRelative

public boolean isBlockWidthRelative(int i)
Tells whether the given property value is relative to the width of the containing block.

isColorRelative

public boolean isColorRelative(int i)
Tells whether the given property value is relative to 'color'.

isComputed

public boolean isComputed(int i)
Tells whether the given property value is computed.

isFontSizeRelative

public boolean isFontSizeRelative(int i)
Tells whether the given property value is relative to 'font-size'.

isImportant

public boolean isImportant(int i)
Tells whether the given property value is important.

isInherited

public boolean isInherited(int i)
Tells whether the given cascaded property value was inherited from it's parent or set locally.

isLineHeightRelative

public boolean isLineHeightRelative(int i)
Tells whether the given property value is relative to 'line-height'.

isNullCascaded

public boolean isNullCascaded(int i)
Tells whether the given cascaded property value is null.

isParentRelative

public boolean isParentRelative(int i)
Tells whether the given property value is relative to the parent's property value.

putBlockHeightRelative

public void putBlockHeightRelative(int i, boolean b)
Sets the block-height-relative flag of a property value.

putBlockWidthRelative

public void putBlockWidthRelative(int i, boolean b)
Sets the block-width-relative flag of a property value.

putColorRelative

public void putColorRelative(int i, boolean b)
Sets the color-relative flag of a property value.

putComputed

public void putComputed(int i, boolean b)
Sets the computed flag of a property value.

putFontSizeRelative

public void putFontSizeRelative(int i, boolean b)
Sets the font-size-relative flag of a property value.

putImportant

public void putImportant(int i, boolean b)
Sets the priority 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.

putLineHeightRelative

public void putLineHeightRelative(int i, boolean b)
Sets the line-height-relative flag of a 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.

putNullCascaded

public void putNullCascaded(int i, boolean b)
Sets the null-cascaded flag of a property value.

putOrigin

public void putOrigin(int i, short val)
Sets the origin of the given value.

putParentRelative

public void putParentRelative(int i, boolean b)
Sets the parent-relative flag of a property value.

putValue

public void putValue(int i, Value v)
Puts a property value, given the property index.

Parameters: i The property index. v The property value.

setFixedCascadedStyle

public void setFixedCascadedStyle(boolean b)
Sets the fixedCascadedValues property.

toString

public String toString(CSSEngine eng)
Returns a printable representation of this style map.
Copyright B) 2007 Apache Software Foundation. All Rights Reserved.