public abstract class JRBaseCrosstabGroup extends Object implements JRCrosstabGroup, Serializable, CrosstabBaseCloneable
| Modifier and Type | Field and Description |
|---|---|
protected JRCrosstabBucket |
bucket |
protected JRCellContents |
header |
protected Boolean |
mergeHeaderCells |
protected String |
name |
protected JRCellContents |
totalHeader |
protected CrosstabTotalPositionEnum |
totalPositionValue |
protected JRVariable |
variable |
| Modifier | Constructor and Description |
|---|---|
protected |
JRBaseCrosstabGroup() |
|
JRBaseCrosstabGroup(JRCrosstabGroup group,
JRBaseObjectFactory factory) |
| Modifier and Type | Method and Description |
|---|---|
Object |
clone() |
JRCrosstabGroup |
clone(CrosstabBaseCloneFactory cloneFactory) |
JRCrosstabBucket |
getBucket()
Returns the bucketing information for this group.
|
JRCellContents |
getHeader()
Returns the group header cell.
|
Boolean |
getMergeHeaderCells()
Determines whether the header cell of this group spans across all entries in the group,
or whether the header cell repeats for each sub group entry.
|
String |
getName()
Returns the name of the group.
|
JRCellContents |
getTotalHeader()
Returns the group total header cell.
|
CrosstabTotalPositionEnum |
getTotalPositionValue()
Returns the position of the total row/column for this group.
|
JRVariable |
getVariable()
Returns the variable associated to this group.
|
boolean |
hasTotal()
Returns whether the group has a total row/column.
|
protected String name
protected CrosstabTotalPositionEnum totalPositionValue
protected JRCrosstabBucket bucket
protected JRCellContents header
protected JRCellContents totalHeader
protected Boolean mergeHeaderCells
protected JRVariable variable
protected JRBaseCrosstabGroup()
public JRBaseCrosstabGroup(JRCrosstabGroup group, JRBaseObjectFactory factory)
public String getName()
JRCrosstabGroupgetName in interface JRCrosstabGroupJRCrosstabGroup.getVariable()public JRCrosstabBucket getBucket()
JRCrosstabGroupThe bucketing information consists of grouping expression and group ordering.
getBucket in interface JRCrosstabGrouppublic CrosstabTotalPositionEnum getTotalPositionValue()
JRCrosstabGroupA group can have a total row/column summing the values for all the entries in the group. E.g. if there is a Year group having Month as a subgroup, the total row/column for the Year group would sum the values for all the years and the total row/column for the Month group would sum the values for all the months of an year.
Possible values for this attribute are:
CrosstabTotalPositionEnum.NONE
- the group will not display a total row/columnCrosstabTotalPositionEnum.START
- the group will display the total row/column before the group rows/columnsCrosstabTotalPositionEnum.END
- the group will display the total row/column at the end of the group rows/columnsgetTotalPositionValue in interface JRCrosstabGrouppublic boolean hasTotal()
JRCrosstabGroup
This method is currently equivalent to
getTotalPosition() != Bucket.TOTAL_POSITION_NONE and is therefore
redundant.
hasTotal in interface JRCrosstabGrouppublic JRCellContents getHeader()
JRCrosstabGroupThe size of the header cell is computed based on the following rules (only the row header rules are listed, the ones for columns can be deducted by symmetrical duality):
JRCrosstabRowGroup.getWidth()Should never return null, but empty cell contents instead.
getHeader in interface JRCrosstabGrouppublic JRCellContents getTotalHeader()
JRCrosstabGroupThe size of a row group total header is computed based on the following rules:
Should never return null, but empty cell contents instead.
getTotalHeader in interface JRCrosstabGrouppublic JRVariable getVariable()
JRCrosstabGroupEach group in the crosstab has a variable that can be used inside the group header as the current group value. The variable has the same name as the group and the same type as the bucket expression of the group.
getVariable in interface JRCrosstabGrouppublic Boolean getMergeHeaderCells()
JRCrosstabGroupIf the header cell is set to repeat, the sub group should not have a total row/column.
By default the header cell spans across all entries that are part of the group.
getMergeHeaderCells in interface JRCrosstabGroupnull
the default will applypublic Object clone()
clone in interface JRCloneableclone in class Objectpublic JRCrosstabGroup clone(CrosstabBaseCloneFactory cloneFactory)
clone in interface CrosstabBaseCloneableCopyright © 2017. All rights reserved.