Class ElementDefaultStyleSheet
- java.lang.Object
-
- org.pentaho.reporting.engine.classic.core.style.AbstractStyleSheet
-
- org.pentaho.reporting.engine.classic.core.style.ElementStyleSheet
-
- org.pentaho.reporting.engine.classic.core.style.ElementDefaultStyleSheet
-
- All Implemented Interfaces:
Serializable
,Cloneable
,StyleSheet
- Direct Known Subclasses:
BandDefaultStyleSheet
,ReportDefaultStyleSheet
,ReportSectionDefaultStyleSheet
public class ElementDefaultStyleSheet extends ElementStyleSheet
The default element style sheet. This style sheet defines default attribute values for all elements. The default valignment was modified to top.- Author:
- Thomas Morgner
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static Color
DEFAULT_PAINT
The default paint.static Stroke
DEFAULT_STROKE
-
Constructor Summary
Constructors Modifier Constructor Description protected
ElementDefaultStyleSheet()
Creates a new style sheet.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ElementStyleSheet
getCopy()
Clones the style-sheet.static ElementDefaultStyleSheet
getDefaultStyle()
Returns the default element style sheet.protected boolean
isLocked()
Gets the locked state of this stylesheet.protected void
setLocked(boolean locked)
Defines the locked-state for this stylesheet.void
setStyleProperty(StyleKey key, Object value)
Sets a style property (or removes the style if the value isnull
).-
Methods inherited from class org.pentaho.reporting.engine.classic.core.style.ElementStyleSheet
addAll, addDefault, addInherited, addInherited, addListener, clear, clone, copyFrom, derive, getChangeTracker, getChangeTrackerHash, getDefinedPropertyNamesArray, getModificationCount, getPropertyKeyList, getPropertyKeys, getStyleProperty, isLocalKey, removeListener, setBooleanStyleProperty, setChangeTrackerHash, setModificationCount, toArray
-
Methods inherited from class org.pentaho.reporting.engine.classic.core.style.AbstractStyleSheet
getBooleanStyleProperty, getBooleanStyleProperty, getDoubleStyleProperty, getId, getIntStyleProperty, getStyleProperty, setId
-
-
-
-
Method Detail
-
isLocked
protected boolean isLocked()
Gets the locked state of this stylesheet. After the first initialization the stylesheet gets locked, so that it could not be changed anymore.- Returns:
- true, if this stylesheet is readonly.
-
setLocked
protected void setLocked(boolean locked)
Defines the locked-state for this stylesheet.- Parameters:
locked
- true, if the stylesheet is locked and read-only, false otherwise.
-
getDefaultStyle
public static ElementDefaultStyleSheet getDefaultStyle()
Returns the default element style sheet.- Returns:
- the style-sheet.
-
setStyleProperty
public void setStyleProperty(StyleKey key, Object value)
Sets a style property (or removes the style if the value isnull
).- Overrides:
setStyleProperty
in classElementStyleSheet
- Parameters:
key
- the style key (null
not permitted).value
- the value.- Throws:
NullPointerException
- if the given key is null.ClassCastException
- if the value cannot be assigned with the given key.UnsupportedOperationException
- as this style sheet is read only.
-
getCopy
public ElementStyleSheet getCopy()
Clones the style-sheet. The assigned parent style sheets are not cloned. The stylesheets are not assigned to the contained stylesheet collection, you have to reassign them manually ...- Returns:
- the clone.
-
-