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

java.lang.Object
  extended by org.pentaho.reporting.engine.classic.core.style.AbstractStyleSheet
      extended by org.pentaho.reporting.engine.classic.core.style.ElementStyleSheet
          extended by org.pentaho.reporting.engine.classic.core.style.ElementDefaultStyleSheet
All Implemented Interfaces:
Serializable, Cloneable, StyleChangeListener, StyleSheet
Direct Known Subclasses:
BandDefaultStyleSheet, 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
static Color DEFAULT_PAINT
          The default paint.
static Stroke DEFAULT_STROKE
           
 
Fields inherited from class org.pentaho.reporting.engine.classic.core.style.ElementStyleSheet
ALIGNMENT, BOLD, DYNAMIC_HEIGHT, EMBEDDED_FONT, EXCEL_DATA_FORMAT_STRING, EXCEL_WRAP_TEXT, FONT, FONTENCODING, FONTSIZE, HREF_TARGET, HREF_WINDOW, ITALIC, KEEP_ASPECT_RATIO, LINEHEIGHT, MAXIMUMSIZE, MINIMUMSIZE, PAINT, PREFERREDSIZE, RESERVED_LITERAL, SCALE, STRIKETHROUGH, STROKE, TRIM_TEXT_CONTENT, UNDERLINED, VALIGNMENT, VISIBLE
 
Method Summary
 ElementStyleSheet getCopy()
          Clones the style-sheet.
static ElementDefaultStyleSheet getDefaultStyle()
          Returns the default element style sheet.
 boolean isGlobalDefault()
          Returns true, if this stylesheet is one of the global default stylesheets.
 void setStyleProperty(StyleKey key, Object value)
          Sets a style property (or removes the style if the value is null).
 
Methods inherited from class org.pentaho.reporting.engine.classic.core.style.ElementStyleSheet
addListener, addParent, addParent, clone, derive, getCascadeStyleSheet, getChangeTracker, getDefinedPropertyNames, getDefinedPropertyNamesArray, getFontDefinitionProperty, getGlobalDefaultStyleSheet, getName, getParents, getPropertyKeys, getStyleProperty, isAllowCaching, isLocalKey, removeListener, removeParent, setAllowCaching, setBooleanStyleProperty, setCascadeStyleSheet, setFontDefinitionProperty, setGlobalDefaultStyleSheet, styleChanged, styleRemoved, toArray
 
Methods inherited from class org.pentaho.reporting.engine.classic.core.style.AbstractStyleSheet
getBooleanStyleProperty, getBooleanStyleProperty, getDoubleStyleProperty, getId, getIntStyleProperty, getStyleProperty
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_PAINT

public static final Color DEFAULT_PAINT
The default paint.


DEFAULT_STROKE

public static final Stroke DEFAULT_STROKE
Method Detail

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 is null).

Overrides:
setStyleProperty in class ElementStyleSheet
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 ...

Overrides:
getCopy in class ElementStyleSheet
Returns:
the clone.

isGlobalDefault

public boolean isGlobalDefault()
Returns true, if this stylesheet is one of the global default stylesheets. Global default stylesheets are unmodifiable and shared among all element stylesheets.

Overrides:
isGlobalDefault in class ElementStyleSheet
Returns:
always true.