org.jfree.report.style
Class BandDefaultStyleSheet

java.lang.Object
  extended byorg.jfree.report.style.ElementStyleSheet
      extended byorg.jfree.report.style.BandStyleSheet
          extended byorg.jfree.report.style.BandDefaultStyleSheet
All Implemented Interfaces:
java.lang.Cloneable, java.io.Serializable, StyleChangeListener

public class BandDefaultStyleSheet
extends BandStyleSheet

A default band style sheet. This StyleSheet defines the default attribute values for all Bands.

Author:
Thomas Morgner
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.jfree.report.style.BandStyleSheet
DISPLAY_ON_FIRSTPAGE, DISPLAY_ON_LASTPAGE, FIXED_POSITION, PAGEBREAK_AFTER, PAGEBREAK_BEFORE, REPEAT_HEADER
 
Fields inherited from class org.jfree.report.style.ElementStyleSheet
ALIGNMENT, BOLD, BOUNDS, DYNAMIC_HEIGHT, ELEMENT_LAYOUT_CACHEABLE, EMBEDDED_FONT, FONT, FONTENCODING, FONTSIZE, ITALIC, KEEP_ASPECT_RATIO, LINEHEIGHT, MAXIMUMSIZE, MINIMUMSIZE, PAINT, PREFERREDSIZE, RESERVED_LITERAL, SCALE, STRIKETHROUGH, STROKE, TRIM_TEXT_CONTENT, UNDERLINED, VALIGNMENT, VISIBLE
 
Constructor Summary
protected BandDefaultStyleSheet()
          Creates a new default style sheet.
 
Method Summary
static BandDefaultStyleSheet getBandDefaultStyle()
          Returns the default band style sheet.
 ElementStyleSheet getCopy()
          Clones the style-sheet.
 boolean isGlobalDefault()
          Returns true, if this stylesheet is one of the global default stylesheets.
protected  boolean isLocked()
          Gets the locked state of this stylesheet.
 void registerStyleSheetCollection(StyleSheetCollection styleSheetCollection)
          This method does nothing.
protected  void setLocked(boolean locked)
          Defines the locked-state for this stylesheet.
 void setStyleProperty(StyleKey key, java.lang.Object value)
          Sets a style property (or removes the style if the value is null).
 void unregisterStyleSheetCollection(StyleSheetCollection styleSheetCollection)
          This method does nothing.
 
Methods inherited from class org.jfree.report.style.ElementStyleSheet
addDefaultParent, addDefaultParent, addListener, addParent, addParent, clone, getBooleanStyleProperty, getBooleanStyleProperty, getDefaultParents, getDefinedPropertyNames, getFontDefinitionProperty, getId, getIntStyleProperty, getName, getParents, getStyleProperty, getStyleProperty, getStyleSheetCollection, isAllowCaching, isLocalKey, isSubStyleSheet, removeDefaultParent, removeListener, removeParent, setAllowCaching, setBooleanStyleProperty, setFontDefinitionProperty, styleChanged, styleRemoved
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BandDefaultStyleSheet

protected BandDefaultStyleSheet()
Creates a new default style sheet.

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.

getBandDefaultStyle

public static final BandDefaultStyleSheet getBandDefaultStyle()
Returns the default band style sheet.

Returns:
the style-sheet.

setStyleProperty

public void setStyleProperty(StyleKey key,
                             java.lang.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:
java.lang.NullPointerException - if the given key is null.
java.lang.ClassCastException - if the value cannot be assigned with the given key.
java.lang.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.

registerStyleSheetCollection

public final void registerStyleSheetCollection(StyleSheetCollection styleSheetCollection)
This method does nothing.

Overrides:
registerStyleSheetCollection in class ElementStyleSheet
Parameters:
styleSheetCollection - the stylesheet collection that should be registered.

unregisterStyleSheetCollection

public final void unregisterStyleSheetCollection(StyleSheetCollection styleSheetCollection)
This method does nothing.

Overrides:
unregisterStyleSheetCollection in class ElementStyleSheet
Parameters:
styleSheetCollection - the stylesheet collection that should be registered.

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.