org.pentaho.reporting.engine.classic.core.layout.style
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:
- StyleSheet
public final class SimpleStyleSheet
- extends AbstractStyleSheet
A simple, read-only stylesheet.
- Author:
- Thomas Morgner
EMPTY_STYLE
public static final StyleSheet EMPTY_STYLE
SimpleStyleSheet
public SimpleStyleSheet(StyleSheet parent)
SimpleStyleSheet
public SimpleStyleSheet(InstanceID id,
StyleSheet parent)
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 (possibly
null
) is returned.
- Parameters:
key
- the style key.defaultValue
- the default value (null
permitted).
- Returns:
- the value.
toArray
public Object[] toArray()
getChangeTracker
public long getChangeTracker()
- Specified by:
getChangeTracker
in interface StyleSheet
- Overrides:
getChangeTracker
in class AbstractStyleSheet
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 interface StyleSheet
- Overrides:
getId
in class AbstractStyleSheet
- Returns:
- the ID of this stylesheet.