|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.pentaho.reporting.engine.classic.core.Element org.pentaho.reporting.engine.classic.core.Section org.pentaho.reporting.engine.classic.core.Group
public abstract class Group
A report group. Reports can contain any number of (nested) groups. The order of the fields is not important. If the group does not contain any fields, the group spans the whole report from the first to the last row (such a group is called the default group).
The group's field list should not be modified after the group was added to the group list, or the results are undefined. Groups of the same GroupList must have a subgroup relation. The designated child group must contain all fields of the direct parent plus at least one new field. There is no requirement, that the referenced field actually exists, if it doesn't, null is assumed as field value. It is recommended that the name of the group is unique within the report. The name will not be used internally to identify the group, but most functions depend on a recognizable group name to identify the group to be processed.
GroupList
,
Serialized FormField Summary | |
---|---|
static String |
ANONYMOUS_GROUP_PREFIX
The internal constant to mark anonymous group names. |
Fields inherited from class org.pentaho.reporting.engine.classic.core.Element |
---|
ANONYMOUS_ELEMENT_PREFIX |
Method Summary | |
---|---|
Object |
clone()
Clones this Element. |
Element |
derive(boolean preserveElementInstanceIds)
Creates a deep copy of this element and regenerates all instance-ids. |
GroupBody |
getBody()
|
ReportElement |
getElement(int index)
Returns the element stored add the given index. |
int |
getElementCount()
Returns the number of elements in this section. |
GroupFooter |
getFooter()
Returns the group footer. |
GroupHeader |
getHeader()
Returns the group header. |
abstract boolean |
isGroupChange(DataRow dataRow)
|
void |
setBody(GroupBody body)
|
void |
setElementAt(int index,
Element element)
|
void |
setFooter(GroupFooter footer)
Sets the footer for the group. |
void |
setHeader(GroupHeader header)
Sets the header for the group. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String ANONYMOUS_GROUP_PREFIX
Method Detail |
---|
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).
NullPointerException
- if the given header is nullpublic GroupBody getBody()
public void setBody(GroupBody body)
public GroupFooter getFooter()
public void setFooter(GroupFooter footer)
footer
- the footer (null not permitted).
NullPointerException
- if the given footer is null.public Object clone() throws CloneNotSupportedException
clone
in interface DataTarget
clone
in class Element
CloneNotSupportedException
- should never be thrown.public Element derive(boolean preserveElementInstanceIds) throws CloneNotSupportedException
Element
derive
in class Element
preserveElementInstanceIds
- defines whether this call generates new instance-ids for the derived elements.
Instance-IDs are used by the report processor to recognize reoccurring elements
and must not changed within the report run. Outside of the report processors
new instance ids should be generated at all times to separate
instances and to make them uniquely identifiable.
CloneNotSupportedException
public abstract boolean isGroupChange(DataRow dataRow)
public int getElementCount()
Section
getElementCount
in class Section
public ReportElement getElement(int index)
Section
getElement
in class Section
index
- the element position within this section
public void setElementAt(int index, Element element)
setElementAt
in class Section
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |