org.jfree.layouting.input.style

Class CSSDeclarationRule

Implemented Interfaces:
Cloneable, Serializable
Known Direct Subclasses:
CSSCounterRule, CSSFontFaceRule, CSSMediaRule, CSSPageAreaRule, CSSPageRule, CSSStringRule, CSSStyleRule

public abstract class CSSDeclarationRule
extends StyleRule

This class is a merger between the CSSStyleDeclaration and the other stylerule classes holding property name pairs. Actually, this is what once was called a stylesheet in JFreeReport.

StyleProperties are key as Strings and have CSSValues as mapped values..

Author:
Thomas Morgner

Constructor Summary

CSSDeclarationRule(StyleSheet parentStyle, StyleRule parentRule)

Method Summary

void
clear()
Object
clone()
boolean[]
getImportantValues()
CSSValue
getPropertyCSSValue(StyleKey propertyName)
StyleKey[]
getPropertyKeysAsArray()
CSSValue[]
getStyleValues()
boolean
isEmpty()
boolean
isImportant(StyleKey propertyName)
void
removeProperty(StyleKey name)
void
setImportant(StyleKey propertyName, boolean important)
void
setPropertyValue(StyleKey propertyName, CSSValue value)
void
setPropertyValue(StyleKey propertyName, CSSValue value, boolean important)
void
setPropertyValueAsString(String styleKey, String value)
void
setPropertyValueAsString(StyleKey styleKey, String value)
Parses the given value for the stylekey.

Methods inherited from class org.jfree.layouting.input.style.StyleRule

clone, getParentRule, getParentStyle, getStyleKeyRegistry, isReadOnly, makeReadOnly, setParentRule, setParentStyle

Constructor Details

CSSDeclarationRule

protected CSSDeclarationRule(StyleSheet parentStyle,
                             StyleRule parentRule)

Method Details

clear

public void clear()

clone

public Object clone()
            throws CloneNotSupportedException
Overrides:
clone in interface StyleRule

getImportantValues

public boolean[] getImportantValues()

getPropertyCSSValue

public CSSValue getPropertyCSSValue(StyleKey propertyName)

getPropertyKeysAsArray

public StyleKey[] getPropertyKeysAsArray()

getStyleValues

public CSSValue[] getStyleValues()

isEmpty

public boolean isEmpty()

isImportant

public boolean isImportant(StyleKey propertyName)

removeProperty

public void removeProperty(StyleKey name)

setImportant

public void setImportant(StyleKey propertyName,
                         boolean important)

setPropertyValue

public void setPropertyValue(StyleKey propertyName,
                             CSSValue value)

setPropertyValue

public void setPropertyValue(StyleKey propertyName,
                             CSSValue value,
                             boolean important)

setPropertyValueAsString

public void setPropertyValueAsString(String styleKey,
                                     String value)

setPropertyValueAsString

public void setPropertyValueAsString(StyleKey styleKey,
                                     String value)
Parses the given value for the stylekey. As stylekeys are only defined for atomic style declarations, this method will only affect a single name-value pair.
Parameters:
styleKey -
value -