|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jfree.report.GroupList
The group list is used to store groups in a ordered way. The less specific groups are guaranteed to be listed before any more specific subgroup.
Groups are ordered by comparing the declared fieldnames for the groups. A subgroup of an group must contain all fields from its parent plus at least one new field.
This implementation is not synchronized.
Constructor Summary | |
GroupList()
Constructs a new empty group list. |
|
GroupList(GroupList list)
Creates a new group list and copies the contents of the given grouplist. |
Method Summary | |
void |
add(Group o)
Adds a group to the list. |
void |
addAll(java.util.Collection c)
Adds all groups of the collection to this group list. |
void |
clear()
Clears the list. |
java.lang.Object |
clone()
Clones the group list and all contained groups. |
Group |
get(int i)
Returns the group at a position in the list. |
Group |
getGroupByName(java.lang.String name)
Searches a group by its defined name. |
protected Group[] |
getGroupCache()
Returns a direct reference to the group cache. |
StyleSheetCollection |
getStyleSheetCollection()
Returns the stylesheet collection which is assigned with this group and all stylesheets of this group. |
java.util.Iterator |
iterator()
Returns an iterator for the groups of the list. |
void |
registerStyleSheetCollection(StyleSheetCollection styleSheetCollection)
Registers the given StyleSheet collection with this group list. |
boolean |
remove(Group o)
Removes an group from the list. |
int |
size()
Returns the number of groups in the list. |
java.lang.String |
toString()
Returns a string representation of the list (useful for debugging). |
void |
unregisterStyleSheetCollection(StyleSheetCollection styleSheetCollection)
Unregisters the given stylesheet collection from this group list. |
void |
updateStyleSheetCollection(StyleSheetCollection styleSheetCollection)
Updates the stylesheet collection for this group list and all group in this list. |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public GroupList()
public GroupList(GroupList list)
list
- groups to add to the list.Method Detail |
public Group get(int i)
i
- the position index (zero-based).
public boolean remove(Group o)
o
- the group that should be removed.
java.lang.NullPointerException
- if the given group object is null.public void clear()
public void add(Group o)
o
- the group object.public void addAll(java.util.Collection c)
c
- the collection that contains the groups.
java.lang.NullPointerException
- if the given collection is null.
java.lang.ClassCastException
- if the collection does not contain groups.public java.lang.Object clone()
public java.util.Iterator iterator()
public int size()
public java.lang.String toString()
public StyleSheetCollection getStyleSheetCollection()
public void registerStyleSheetCollection(StyleSheetCollection styleSheetCollection) throws InvalidStyleSheetCollectionException
InvalidStyleSheetCollectionException
.
styleSheetCollection
- the stylesheet collection that should be registered.
InvalidStyleSheetCollectionException
- if there is already an other stylesheet registered.
java.lang.NullPointerException
- if the given stylesheet collection is null.public void unregisterStyleSheetCollection(StyleSheetCollection styleSheetCollection) throws InvalidStyleSheetCollectionException
InvalidStyleSheetCollectionException
styleSheetCollection
- the stylesheet collection that should be unregistered.
InvalidStyleSheetCollectionException
- if there is no stylesheet registered.
java.lang.NullPointerException
- if the given stylesheet collection is null.public void updateStyleSheetCollection(StyleSheetCollection styleSheetCollection) throws InvalidStyleSheetCollectionException
If you don't call this function after cloning prepare to be doomed. This method will replace all inherited stylesheets with clones from the stylesheet collection.
styleSheetCollection
- the stylesheet collection that contains the updated
information and that should be assigned with that element.
java.lang.NullPointerException
- if the given stylesheet collection is null.
InvalidStyleSheetCollectionException
- if
there is an other stylesheet collection already registered with that element.protected Group[] getGroupCache()
public Group getGroupByName(java.lang.String name)
name
- the name of the group.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |