Class CrosstabGroup
- java.lang.Object
-
- org.pentaho.reporting.engine.classic.core.Element
-
- org.pentaho.reporting.engine.classic.core.Section
-
- org.pentaho.reporting.engine.classic.core.Group
-
- org.pentaho.reporting.engine.classic.core.CrosstabGroup
-
- All Implemented Interfaces:
Serializable
,Cloneable
,Iterable<Element>
,DataTarget
,ReportElement
public class CrosstabGroup extends Group
A crosstab group represents the page, row, column and detail sections of a cube. The other axises are handled as regular relational groups. The group's header and footer can be used to print page-axis header and footer sections for the crosstab, but they will not be used as bands for the tab-header and -footers. The crosstabs column and row headers are autogenerated and part of the group-body.- Author:
- Thomas Morgner
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.pentaho.reporting.engine.classic.core.Element
ANONYMOUS_ELEMENT_PREFIX
-
-
Constructor Summary
Constructors Constructor Description CrosstabGroup()
CrosstabGroup(CrosstabOtherGroupBody body)
CrosstabGroup(CrosstabRowGroupBody body)
CrosstabGroup(GroupBody body)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addPaddingField(String name)
Adds a field to the group.void
clearPaddingFields()
CrosstabGroup
clone()
Clones this Element.protected GroupBody
createDefaultBody()
CrosstabGroup
derive(boolean preserveElementInstanceIds)
Creates a deep copy of this element and regenerates all instance-ids.CrosstabDetailMode
getDetailsMode()
Element
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.NoDataBand
getNoDataBand()
List<String>
getPaddingFields()
Returns the list of fields for this group.String[]
getPaddingFieldsArray()
Returns the group fields as array.Boolean
getPrintColumnTitleHeader()
Boolean
getPrintDetailsHeader()
List<SortConstraint>
getSortingConstraint()
boolean
isGroupChange(DataRow dataRow)
protected void
removeElement(Element element)
Removes an element from the section.void
setBody(GroupBody body)
void
setDetailsMode(CrosstabDetailMode mode)
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.void
setNoDataBand(NoDataBand noDataBand)
void
setPaddingFields(List<String> c)
Sets the fields for this group.void
setPaddingFieldsArray(String[] fields)
void
setPrintColumnTitleHeader(Boolean printColumnTitleHeader)
void
setPrintDetailsHeader(Boolean printDetailsHeader)
-
Methods inherited from class org.pentaho.reporting.engine.classic.core.Group
getBody, getGeneratedName, getName, isAscendingSortOrder, mapFields, matches, notifyElement, setAscendingSortOrder
-
Methods inherited from class org.pentaho.reporting.engine.classic.core.Section
getDefaultStyleSheet, iterator, registerAsChild, unregisterAsChild, unregisterParent, validateLooping
-
Methods inherited from class org.pentaho.reporting.engine.classic.core.Element
copyAttributes, copyInto, derive, getAttribute, getAttributeExpression, getAttributeExpressionNames, getAttributeExpressionNamespaces, getAttributeExpressions, getAttributeNames, getAttributeNamespaces, getAttributes, getAttributeTyped, getChangeTracker, getChildElementByType, getChildElementsByName, getChildElementsByType, getComputedStyle, getContentBase, getDataSource, getDefinitionSource, getElementContext, getElementType, getElementTypeName, getFirstAttribute, getHRefTarget, getId, getMasterReport, getMetaData, getObjectID, getParent, getParentSection, getReportDefinition, getStyle, getStyleExpression, getStyleExpressions, getTreeLock, isDynamicContent, isVisible, notifyNodeChildAdded, notifyNodeChildRemoved, notifyNodePropertiesChanged, notifyNodePropertiesChanged, notifyNodeStructureChanged, setAttribute, setAttribute, setAttributeExpression, setChangeTracker, setComputedStyle, setDataSource, setDynamicContent, setElementType, setHRefTarget, setId, setName, setParent, setStyleExpression, setVisible, toString, updateChangedFlagInternal, updateInternalChangeFlag
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Constructor Detail
-
CrosstabGroup
public CrosstabGroup()
-
CrosstabGroup
public CrosstabGroup(GroupBody body)
-
CrosstabGroup
public CrosstabGroup(CrosstabRowGroupBody body)
-
CrosstabGroup
public CrosstabGroup(CrosstabOtherGroupBody body)
-
-
Method Detail
-
getHeader
public GroupHeader getHeader()
Returns the group header.The group header is a report band that contains elements that should be printed at the start of a group.
- Returns:
- the group header.
-
setHeader
public void setHeader(GroupHeader header)
Sets the header for the group.- Parameters:
header
- the header (null not permitted).- Throws:
NullPointerException
- if the given header is null
-
getFooter
public GroupFooter getFooter()
Returns the group footer.- Returns:
- the footer.
-
setFooter
public void setFooter(GroupFooter footer)
Sets the footer for the group.- Parameters:
footer
- the footer (null not permitted).- Throws:
NullPointerException
- if the given footer is null.
-
getNoDataBand
public NoDataBand getNoDataBand()
-
setNoDataBand
public void setNoDataBand(NoDataBand noDataBand)
-
createDefaultBody
protected GroupBody createDefaultBody()
- Specified by:
createDefaultBody
in classGroup
-
isGroupChange
public boolean isGroupChange(DataRow dataRow)
- Specified by:
isGroupChange
in classGroup
-
clone
public CrosstabGroup clone()
Clones this Element.- Specified by:
clone
in interfaceDataTarget
- Overrides:
clone
in classGroup
- Returns:
- a clone of this element.
-
derive
public CrosstabGroup derive(boolean preserveElementInstanceIds)
Description copied from class:Element
Creates a deep copy of this element and regenerates all instance-ids.- Overrides:
derive
in classGroup
- Parameters:
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.- Returns:
- the copy of the element.
-
removeElement
protected void removeElement(Element element)
Description copied from class:Section
Removes an element from the section.- Overrides:
removeElement
in classGroup
- Parameters:
element
- the element to be section.
-
getElementCount
public int getElementCount()
Description copied from class:Section
Returns the number of elements in this section.- Specified by:
getElementCount
in classSection
- Returns:
- the number of elements of this section.
-
getElement
public Element getElement(int index)
Description copied from class:Section
Returns the element stored add the given index.- Specified by:
getElement
in classSection
- Parameters:
index
- the element position within this section- Returns:
- the element
-
setElementAt
public void setElementAt(int index, Element element)
- Specified by:
setElementAt
in classSection
-
setDetailsMode
public void setDetailsMode(CrosstabDetailMode mode)
-
getDetailsMode
public CrosstabDetailMode getDetailsMode()
-
getPrintDetailsHeader
public Boolean getPrintDetailsHeader()
-
setPrintDetailsHeader
public void setPrintDetailsHeader(Boolean printDetailsHeader)
-
getPrintColumnTitleHeader
public Boolean getPrintColumnTitleHeader()
-
setPrintColumnTitleHeader
public void setPrintColumnTitleHeader(Boolean printColumnTitleHeader)
-
setPaddingFields
public void setPaddingFields(List<String> c)
Sets the fields for this group. The given list must contain Strings defining the needed fields from the DataRow. Don't reference Function-Fields here, functions are not supported in th groupfield definition.- Parameters:
c
- the list containing strings.- Throws:
NullPointerException
- if the given list is null or the list contains null-values.
-
clearPaddingFields
public void clearPaddingFields()
-
addPaddingField
public void addPaddingField(String name)
Adds a field to the group. The field names must correspond to the column names in the report's TableModel.- Parameters:
name
- the field name (null not permitted).- Throws:
NullPointerException
- if the name is null
-
getPaddingFields
public List<String> getPaddingFields()
Returns the list of fields for this group.- Returns:
- a list (unmodifiable) of fields for the group.
-
setPaddingFieldsArray
public void setPaddingFieldsArray(String[] fields)
-
getPaddingFieldsArray
public String[] getPaddingFieldsArray()
Returns the group fields as array.- Returns:
- the fields as string array.
-
getSortingConstraint
public List<SortConstraint> getSortingConstraint()
- Specified by:
getSortingConstraint
in classGroup
-
-