|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jfree.report.style.StyleSheetCollection
The StyleSheet collection is assigned to all Elements, all StyleSheets and to the JFreeReport and the ReportDefinition objects. This collection is used to coordinate the deep cloning of the stylesheets of an report. As bonus functionality it allows simplified access to the stylesheets.
Constructor Summary | |
StyleSheetCollection()
DefaultConstructor. |
Method Summary | |
protected void |
addParents(ElementStyleSheet es)
Adds all parents of the given stylesheet recursivly to this collection. |
void |
addStyleSheet(ElementStyleSheet es)
Adds the given stylesheet to this collection. |
protected void |
addStyleSheet(ElementStyleSheet es,
boolean updateRefs)
Adds the given stylesheet to this collection. |
java.lang.Object |
clone()
Clones this stylesheet collection and all stylesheets contained in that collection. |
ElementStyleSheet[] |
getAll(java.lang.String name)
Returns all stylesheets for a given name or null, if there is no such stylesheet registered. |
ElementStyleSheet |
getFirst(java.lang.String name)
Returns the first element stylesheet with that name. |
java.util.Iterator |
keys()
Returns the names of all registered stylesheets as iterator. |
boolean |
remove(ElementStyleSheet es)
Returns true, if removing the stylesheet was successfull, false if the stylesheet is still referenced and will not be removed. |
protected boolean |
remove(ElementStyleSheet es,
boolean update)
Returns true, if the stylesheet if removing was successfull, false if the stylesheet is still referenced and won't be removed. |
protected void |
updateReferences()
Updates the reference count of all stylesheets. |
void |
updateStyleSheet(ElementStyleSheet es)
Updates a stylesheet reference from this collection. |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public StyleSheetCollection()
Method Detail |
public void addStyleSheet(ElementStyleSheet es)
es
- the element stylesheet
java.lang.NullPointerException
- if the given stylesheet is null.protected void addStyleSheet(ElementStyleSheet es, boolean updateRefs)
es
- the element stylesheet that should be added.updateRefs
- true, if the reference counts should be recomputed,
false otherwise.
java.lang.IllegalStateException
- if the stylesheet is already added, but has
a different stylesheet collection assigned.
java.lang.NullPointerException
- if the given element stylesheet is null.public ElementStyleSheet[] getAll(java.lang.String name)
name
- the name of the stylesheet.
public ElementStyleSheet getFirst(java.lang.String name)
name
- the name of the searched stylesheet.
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
java.lang.CloneNotSupportedException
- if cloning failed.public void updateStyleSheet(ElementStyleSheet es)
This operation will remove all parents of the stylesheet and repace them with stylesheets from this collection with the same name and Id.
es
- the elements stylesheet that should be replaced.protected void addParents(ElementStyleSheet es)
es
- the element style sheet whose parents should be added.protected void updateReferences()
public boolean remove(ElementStyleSheet es)
es
- the element stylesheet that should be removed.
protected boolean remove(ElementStyleSheet es, boolean update)
update
- true, if the reference counts should be updated, false otherwise.es
- the element stylesheet that should be removed.
public java.util.Iterator keys()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |