Class SimpleStyleSheet
- java.lang.Object
-
- org.pentaho.reporting.engine.classic.core.style.AbstractStyleSheet
-
- org.pentaho.reporting.engine.classic.core.layout.style.SimpleStyleSheet
-
- All Implemented Interfaces:
Cloneable
,StyleSheet
public final class SimpleStyleSheet extends AbstractStyleSheet
A simple, read-only stylesheet.- Author:
- Thomas Morgner
-
-
Field Summary
Fields Modifier and Type Field Description static StyleSheet
EMPTY_STYLE
-
Constructor Summary
Constructors Constructor Description SimpleStyleSheet(StyleSheet parent)
SimpleStyleSheet(InstanceID id, StyleSheet parent)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
getChangeTracker()
long
getChangeTrackerHash()
InstanceID
getId()
Returns the ID of the stylesheet.long
getModificationCount()
InstanceID
getParentId()
Object
getStyleProperty(StyleKey key, Object defaultValue)
Returns the value of a style.Object[]
toArray()
-
Methods inherited from class org.pentaho.reporting.engine.classic.core.style.AbstractStyleSheet
clone, derive, getBooleanStyleProperty, getBooleanStyleProperty, getDoubleStyleProperty, getIntStyleProperty, getStyleProperty, isLocalKey, setId
-
-
-
-
Field Detail
-
EMPTY_STYLE
public static final StyleSheet EMPTY_STYLE
-
-
Constructor Detail
-
SimpleStyleSheet
public SimpleStyleSheet(StyleSheet parent)
-
SimpleStyleSheet
public SimpleStyleSheet(InstanceID id, StyleSheet parent)
-
-
Method Detail
-
getStyleProperty
public Object getStyleProperty(StyleKey key, Object defaultValue)
Returns the value of a style. If the style is not found in this style-sheet, the code looks in the parent style-sheets. If the style is not found in any of the parent style-sheets, then the default value (possiblynull
) is returned.- Parameters:
key
- the style key.defaultValue
- the default value (null
permitted).- Returns:
- the value.
-
toArray
public Object[] toArray()
-
getChangeTracker
public long getChangeTracker()
-
getParentId
public InstanceID getParentId()
-
getId
public InstanceID getId()
Description copied from class:AbstractStyleSheet
Returns the ID of the stylesheet. The ID does identify an element stylesheet an all all cloned instances of that stylesheet.- Specified by:
getId
in interfaceStyleSheet
- Overrides:
getId
in classAbstractStyleSheet
- Returns:
- the ID of this stylesheet.
-
getModificationCount
public long getModificationCount()
- Specified by:
getModificationCount
in interfaceStyleSheet
- Overrides:
getModificationCount
in classAbstractStyleSheet
-
getChangeTrackerHash
public long getChangeTrackerHash()
- Specified by:
getChangeTrackerHash
in interfaceStyleSheet
- Overrides:
getChangeTrackerHash
in classAbstractStyleSheet
-
-