org.pentaho.reporting.engine.classic.core.layout.style
Class SimpleStyleSheet

java.lang.Object
  extended by org.pentaho.reporting.engine.classic.core.style.AbstractStyleSheet
      extended by 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

Field Summary
static StyleSheet EMPTY_STYLE
           
 
Constructor Summary
SimpleStyleSheet(InstanceID id, StyleSheet parent)
           
SimpleStyleSheet(StyleSheet parent)
           
 
Method Summary
 long getChangeTracker()
           
 InstanceID getId()
          Returns the ID of the stylesheet.
 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
derive, getBooleanStyleProperty, getBooleanStyleProperty, getDoubleStyleProperty, getFontDefinitionProperty, getIntStyleProperty, getStyleProperty
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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 (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.