|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jfree.report.Group
A report group. Reports can contain any number of (nested) groups. The order of the fields is important. If the group does not contain any fields, the group spans the whole report from the first to the last row.
The group's field list should not be modified after the group was added to the group list, or the results are undefined.
GroupList
,
Serialized FormField Summary | |
static java.lang.String |
ANONYMOUS_GROUP_PREFIX
The internal constant to mark anonymous group names. |
Constructor Summary | |
Group()
Constructs a group with no fields, and an empty header and footer. |
Method Summary | |
void |
addField(java.lang.String name)
Adds a field to the group. |
java.lang.Object |
clone()
Clones this Element. |
int |
compareTo(java.lang.Object o)
Compares two objects (required to be instances of the Group class). |
java.util.List |
getFields()
Returns the list of fields for this group. |
java.lang.String[] |
getFieldsArray()
Returns the group fields as array. |
GroupFooter |
getFooter()
Returns the group footer. |
GroupHeader |
getHeader()
Returns the group header. |
java.lang.String |
getName()
Returns the name of the group. |
StyleSheetCollection |
getStyleSheetCollection()
Returns the stylesheet collection which is assigned with this group and all stylesheets of this group. |
void |
registerStyleSheetCollection(StyleSheetCollection styleSheetCollection)
Registers the given StyleSheet collection with this group. |
void |
setFields(java.util.List c)
Sets the fields for this group. |
void |
setFooter(GroupFooter footer)
Sets the footer for the group. |
void |
setHeader(GroupHeader header)
Sets the header for the group. |
void |
setName(java.lang.String name)
Defines the name for this group. |
java.lang.String |
toString()
Returns a string representation of the group (useful for debugging). |
void |
unregisterStyleSheetCollection(StyleSheetCollection styleSheetCollection)
Unregisters the given stylesheet collection from this group. |
void |
updateStyleSheetCollection(StyleSheetCollection sc)
Updates the stylesheet collection for this group and all bands of the group. |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final java.lang.String ANONYMOUS_GROUP_PREFIX
Constructor Detail |
public Group()
Method Detail |
public void setName(java.lang.String name)
name
- the group name (null not permitted).public java.lang.String getName()
public GroupHeader getHeader()
The group header is a report band that contains elements that should be printed at the start of a group.
public void setHeader(GroupHeader header)
header
- the header (null not permitted).
java.lang.NullPointerException
- if the given header is nullpublic GroupFooter getFooter()
public void setFooter(GroupFooter footer)
footer
- the footer (null not permitted).
java.lang.NullPointerException
- if the given footer is null.public void setFields(java.util.List c)
c
- the list containing strings.
java.lang.NullPointerException
- if the given list is null or the list contains null-values.public void addField(java.lang.String name)
name
- the field name (null not permitted).
java.lang.NullPointerException
- if the name is nullpublic java.util.List getFields()
public java.lang.String[] getFieldsArray()
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
java.lang.CloneNotSupportedException
- should never be thrown.public int compareTo(java.lang.Object o)
compareTo
in interface java.lang.Comparable
o
- the to be compared object.
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 an other stylesheet collection already registered with that element.
java.lang.NullPointerException
- if the given stylesheet collection is null.public void updateStyleSheetCollection(StyleSheetCollection sc) 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.
sc
- 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.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |