net.sf.jasperreports.crosstabs.fill
Class JRFillCrosstabGroup

java.lang.Object
  extended by net.sf.jasperreports.crosstabs.fill.JRFillCrosstabGroup
All Implemented Interfaces:
java.lang.Cloneable, JRCrosstabGroup, JRCloneable
Direct Known Subclasses:
JRFillCrosstabColumnGroup, JRFillCrosstabRowGroup

public abstract class JRFillCrosstabGroup
extends java.lang.Object
implements JRCrosstabGroup

Base crosstab row/column group implementation used at fill time.

Version:
$Id: JRFillCrosstabGroup.java 5180 2012-03-29 13:23:12Z teodord $
Author:
Lucian Chirita (lucianc@users.sourceforge.net)

Field Summary
protected  JRFillCellContents header
           
protected  JRCrosstabGroup parentGroup
           
protected  JRFillCellContents totalHeader
           
protected  JRFillVariable variable
           
 
Constructor Summary
JRFillCrosstabGroup(JRCrosstabGroup group, java.lang.String cellType, JRFillCrosstabObjectFactory factory)
           
 
Method Summary
 java.lang.Object clone()
           
 JRCrosstabBucket getBucket()
          Returns the bucketing information for this group.
 JRFillCellContents getFillHeader()
           
 JRFillCellContents getFillTotalHeader()
           
 JRFillVariable getFillVariable()
           
 JRCellContents getHeader()
          Returns the group header cell.
 java.lang.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.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

parentGroup

protected JRCrosstabGroup parentGroup

header

protected JRFillCellContents header

totalHeader

protected JRFillCellContents totalHeader

variable

protected JRFillVariable variable
Constructor Detail

JRFillCrosstabGroup

public JRFillCrosstabGroup(JRCrosstabGroup group,
                           java.lang.String cellType,
                           JRFillCrosstabObjectFactory factory)
Method Detail

getName

public java.lang.String getName()
Description copied from interface: JRCrosstabGroup
Returns the name of the group.

Specified by:
getName in interface JRCrosstabGroup
Returns:
the name of the group
See Also:
JRCrosstabGroup.getVariable()

getTotalPositionValue

public CrosstabTotalPositionEnum getTotalPositionValue()
Description copied from interface: JRCrosstabGroup
Returns the position of the total row/column for this group.

A 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:


hasTotal

public boolean hasTotal()
Description copied from interface: JRCrosstabGroup
Returns whether the group has a total row/column.

This method is currently equivalent to getTotalPosition() != Bucket.TOTAL_POSITION_NONE and is therefore redundant.

Specified by:
hasTotal in interface JRCrosstabGroup
Returns:
whether the group has a total row/column

getBucket

public JRCrosstabBucket getBucket()
Description copied from interface: JRCrosstabGroup
Returns the bucketing information for this group.

The bucketing information consists of grouping expression and group ordering.

Specified by:
getBucket in interface JRCrosstabGroup
Returns:
the bucketing information for this group

getHeader

public JRCellContents getHeader()
Description copied from interface: JRCrosstabGroup
Returns the group header cell.

The 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 simmetrical duality):

Should never return null, but empty cell contents instead.

Specified by:
getHeader in interface JRCrosstabGroup
Returns:
the group header cell

getTotalHeader

public JRCellContents getTotalHeader()
Description copied from interface: JRCrosstabGroup
Returns the group total header cell.

The size of a row group total header is computed based on the following rules:

Should never return null, but empty cell contents instead.

Specified by:
getTotalHeader in interface JRCrosstabGroup
Returns:
the group total header cell

getFillHeader

public JRFillCellContents getFillHeader()

getFillTotalHeader

public JRFillCellContents getFillTotalHeader()

getVariable

public JRVariable getVariable()
Description copied from interface: JRCrosstabGroup
Returns the variable associated to this group.

Each 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.

Specified by:
getVariable in interface JRCrosstabGroup
Returns:
the variable associated to this group

getFillVariable

public JRFillVariable getFillVariable()

clone

public java.lang.Object clone()
Specified by:
clone in interface JRCloneable
Overrides:
clone in class java.lang.Object


© 2001-2010 Jaspersoft Corporation www.jaspersoft.com