org.pentaho.reporting.engine.classic.core.style
Class AbstractStyleSheet

java.lang.Object
  extended by org.pentaho.reporting.engine.classic.core.style.AbstractStyleSheet
All Implemented Interfaces:
StyleSheet
Direct Known Subclasses:
AnchorStyleSheet, CanvasMinWidthStyleSheet, CrosstabBoxStyleSheet, CrosstabCellStyleSheet, CrosstabHeaderStyleSheet, DynamicHeightWrapperStyleSheet, DynamicReplacedContentStyleSheet, ElementStyleSheet, ImmutableStyleSheet, ManualBreakIndicatorStyleSheet, NonDynamicHeightWrapperStyleSheet, NonDynamicReplacedContentStyleSheet, NonPaddingWrapperStyleSheet, ParagraphPoolboxStyleSheet, SectionKeepTogetherStyleSheet, SimpleStyleSheet, SubReportStyleSheet

public abstract class AbstractStyleSheet
extends Object
implements StyleSheet

Creation-Date: 22.04.2007, 16:48:33

Author:
Thomas Morgner

Method Summary
 StyleSheet derive()
           
 boolean getBooleanStyleProperty(StyleKey key)
          Returns a boolean style (defaults to false if the style is not found).
 boolean getBooleanStyleProperty(StyleKey key, boolean defaultValue)
          Returns a boolean style.
 long getChangeTracker()
           
 double getDoubleStyleProperty(StyleKey key, double def)
          Returns an double style.
 FontDefinition getFontDefinitionProperty()
          Deprecated. Do not use this method, access the font properties directly. This method will be removed in 0.8.11.
 InstanceID getId()
          Returns the ID of the stylesheet.
 int getIntStyleProperty(StyleKey key, int def)
          Returns an integer style.
 Object getStyleProperty(StyleKey key)
          Returns the value of a style.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.pentaho.reporting.engine.classic.core.style.StyleSheet
getStyleProperty, toArray
 

Method Detail

getStyleProperty

public Object getStyleProperty(StyleKey key)
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 null is returned.

Specified by:
getStyleProperty in interface StyleSheet
Parameters:
key - the style key.
Returns:
the value.

getBooleanStyleProperty

public boolean getBooleanStyleProperty(StyleKey key)
Returns a boolean style (defaults to false if the style is not found).

Specified by:
getBooleanStyleProperty in interface StyleSheet
Parameters:
key - the style key.
Returns:
true or false.

getBooleanStyleProperty

public boolean getBooleanStyleProperty(StyleKey key,
                                       boolean defaultValue)
Returns a boolean style.

Specified by:
getBooleanStyleProperty in interface StyleSheet
Parameters:
key - the style key.
defaultValue - the default value.
Returns:
true or false.

getIntStyleProperty

public int getIntStyleProperty(StyleKey key,
                               int def)
Returns an integer style.

Specified by:
getIntStyleProperty in interface StyleSheet
Parameters:
key - the style key.
def - the default value.
Returns:
the style value.

getDoubleStyleProperty

public double getDoubleStyleProperty(StyleKey key,
                                     double def)
Returns an double style.

Specified by:
getDoubleStyleProperty in interface StyleSheet
Parameters:
key - the style key.
def - the default value.
Returns:
the style value.

getFontDefinitionProperty

public FontDefinition getFontDefinitionProperty()
Deprecated. Do not use this method, access the font properties directly. This method will be removed in 0.8.11.

Returns the font for this style-sheet.

Returns:
the font.

getId

public InstanceID getId()
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
Returns:
the ID of this stylesheet.

getChangeTracker

public long getChangeTracker()
Specified by:
getChangeTracker in interface StyleSheet

derive

public StyleSheet derive()
                  throws CloneNotSupportedException
Throws:
CloneNotSupportedException