|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--org.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 the more specific subgroups.
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. The group list cannot be empty. JFreeReport needs at least one group instance to work as expected. By default, this default instance does not define any fields (and therefore contains the complete report) and has no Bands defined (rendering it invisible). You cannot remove that group. Every attempt to remove the last group will recreates a new default group.
| Field Summary | |
static java.lang.String |
DEFAULT_GROUP_NAME
The name of the automaticly created default group. |
| Constructor Summary | |
|
GroupList()
Constructs a new group list, with only a default group inside. |
protected |
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 given 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. |
ReportDefinition |
getReportDefinition()
Returns the assigned report definition of the group. |
java.util.Iterator |
iterator()
Returns an iterator for the groups of the list. |
boolean |
remove(Group o)
Removes an group from the list. |
void |
setReportDefinition(ReportDefinition reportDefinition)
Assigns the report definition to all groups in 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). |
| Methods inherited from class java.lang.Object |
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
| Field Detail |
public static final java.lang.String DEFAULT_GROUP_NAME
| Constructor Detail |
public GroupList()
protected 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.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.
public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
Cloneablepublic java.util.Iterator iterator()
public int size()
public java.lang.String toString()
protected Group[] getGroupCache()
public Group getGroupByName(java.lang.String name)
name - the name of the group.public void setReportDefinition(ReportDefinition reportDefinition)
reportDefinition - the report definition (maybe null).public ReportDefinition getReportDefinition()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||