Class AbstractStyleSheet
- java.lang.Object
-
- org.pentaho.reporting.engine.classic.core.style.AbstractStyleSheet
-
- All Implemented Interfaces:
Cloneable
,StyleSheet
- Direct Known Subclasses:
AnchorStyleSheet
,CrosstabBoxStyleSheet
,CrosstabCellStyleSheet
,CrosstabHeaderStyleSheet
,DynamicHeightWrapperStyleSheet
,DynamicReplacedContentStyleSheet
,ElementStyleSheet
,ManualBreakIndicatorStyleSheet
,NonDynamicHeightWrapperStyleSheet
,NonDynamicReplacedContentStyleSheet
,NonPaddingWrapperStyleSheet
,ParagraphPoolboxStyleSheet
,SectionKeepTogetherStyleSheet
,SimpleStyleSheet
,SubReportStyleSheet
,UseMinChunkWidthStyleSheet
public abstract class AbstractStyleSheet extends Object implements StyleSheet, Cloneable
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractStyleSheet()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StyleSheet
clone()
StyleSheet
derive(boolean preserveId)
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
getChangeTrackerHash()
double
getDoubleStyleProperty(StyleKey key, double def)
Returns an double style.InstanceID
getId()
Returns the ID of the stylesheet.int
getIntStyleProperty(StyleKey key, int def)
Returns an integer style.long
getModificationCount()
Object
getStyleProperty(StyleKey key)
Returns the value of a style.boolean
isLocalKey(StyleKey key)
protected void
setId(InstanceID id)
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.pentaho.reporting.engine.classic.core.style.StyleSheet
getChangeTracker, 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, thennull
is returned.- Specified by:
getStyleProperty
in interfaceStyleSheet
- 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 interfaceStyleSheet
- Parameters:
key
- the style key.- Returns:
true
orfalse
.
-
getBooleanStyleProperty
public boolean getBooleanStyleProperty(StyleKey key, boolean defaultValue)
Returns a boolean style.- Specified by:
getBooleanStyleProperty
in interfaceStyleSheet
- 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 interfaceStyleSheet
- 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 interfaceStyleSheet
- Parameters:
key
- the style key.def
- the default value.- Returns:
- the style value.
-
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 interfaceStyleSheet
- Returns:
- the ID of this stylesheet.
-
isLocalKey
public boolean isLocalKey(StyleKey key)
- Specified by:
isLocalKey
in interfaceStyleSheet
-
derive
public StyleSheet derive(boolean preserveId)
-
clone
public StyleSheet clone()
-
setId
protected void setId(InstanceID id)
-
getModificationCount
public long getModificationCount()
- Specified by:
getModificationCount
in interfaceStyleSheet
-
getChangeTrackerHash
public long getChangeTrackerHash()
- Specified by:
getChangeTrackerHash
in interfaceStyleSheet
-
-