ar.com.fdvs.dj.domain.builders
Class GroupBuilder

java.lang.Object
  extended by ar.com.fdvs.dj.domain.builders.GroupBuilder

public class GroupBuilder
extends java.lang.Object

Builder created to give users a friendly way of adding groups to a report.

Usage example:
GroupBuilder gb1 = new GroupBuilder(); ColumnsGroup g1 = gb1.addCriteriaColumn((PropertyColumn) columnState)
.addFooterVariable(columnAmount,ColumnsGroupVariableOperation.SUM)
.addFooterVariable(columnaQuantity,ColumnsGroupVariableOperation.SUM)
.addGroupLayout(GroupLayout.VALUE_IN_HEADER_WITH_HEADERS)
.build();

Like with all DJ's builders, it's usage must end with a call to build() mehtod.


Constructor Summary
GroupBuilder()
           
GroupBuilder(java.lang.String name)
           
 
Method Summary
 GroupBuilder addColumnHeaderStyle(AbstractColumn column, Style style)
           
 GroupBuilder addFooterCrosstab(DJCrosstab cross)
           
 GroupBuilder addFooterSubreport(Subreport subreport)
           
 GroupBuilder addFooterVariable(AbstractColumn column, CustomExpression valueExpression)
           
 GroupBuilder addFooterVariable(AbstractColumn column, CustomExpression valueExpression, Style style)
           
 GroupBuilder addFooterVariable(AbstractColumn column3, DJCalculation operation)
           
 GroupBuilder addFooterVariable(AbstractColumn column3, DJCalculation operation, Style style)
           
 GroupBuilder addFooterVariable(AbstractColumn column3, DJCalculation operation, Style style, DJValueFormatter valueFormatter)
           
 GroupBuilder addFooterVariable(AbstractColumn column3, DJCalculation operation, Style style, DJValueFormatter valueFormatter, DJGroupLabel label)
           
 GroupBuilder addFooterVariable(DJGroupVariable variable)
           
 GroupBuilder addHeaderCrosstab(DJCrosstab cross)
           
 GroupBuilder addHeaderSubreport(Subreport subreport)
           
 GroupBuilder addHeaderVariable(AbstractColumn column, CustomExpression valueExpression)
           
 GroupBuilder addHeaderVariable(AbstractColumn column, CustomExpression valueExpression, Style style)
           
 GroupBuilder addHeaderVariable(AbstractColumn column, DJCalculation operation)
           
 GroupBuilder addHeaderVariable(AbstractColumn column, DJCalculation operation, Style style)
           
 GroupBuilder addHeaderVariable(AbstractColumn column, DJCalculation operation, Style style, DJValueFormatter formatter)
           
 GroupBuilder addHeaderVariable(AbstractColumn column, DJCalculation operation, Style style, DJValueFormatter formatter, DJGroupLabel glabel1)
           
 GroupBuilder addHeaderVariable(DJGroupVariable variable)
           
 GroupBuilder addVariable(java.lang.String name, AbstractColumn column, DJCalculation operation)
           
 GroupBuilder addVariable(java.lang.String name, ColumnProperty prop, DJCalculation operation)
           
 GroupBuilder addVariable(java.lang.String name, java.lang.String property, java.lang.String className, DJCalculation operation)
          Registers a variable for later reference inside custom expressions.
 DJGroup build()
           
 GroupBuilder setAllowFooterSplit(boolean footerSplit)
          pass-through property to setup group footer band "allowSplit" property.
 GroupBuilder setAllowHeaderSplit(boolean headerSplit)
          pass-through property to setup group header band "allowSplit" property.
 GroupBuilder setAllowSplitting(boolean headerSplit, boolean footerSplit)
          pass-through property to setup group header and footer bands "allowSplit" property.
 GroupBuilder setCriteriaColumn(PropertyColumn column)
           
 GroupBuilder setDefaultColumnHeaderStyle(Style style)
           
 GroupBuilder setDefaultFooterVariableStyle(Style defaultFooterVariableStyle)
           
 GroupBuilder setDefaultHeaderVariableStyle(Style defaultHeaderVariableStyle)
           
 GroupBuilder setFooterHeight(java.lang.Integer height)
          Height for footer band.
 GroupBuilder setFooterHeight(java.lang.Integer height, boolean fitHeightToConent)
           
 GroupBuilder setFooterLabel(DJGroupLabel label)
          Footer labels are placed at the right of of the footer variables.
 GroupBuilder setFooterVariablesHeight(java.lang.Integer height)
          height for values shown in group footer such as calculations, current value, etc.
 GroupBuilder setGroupLayout(GroupLayout layout)
           
 GroupBuilder setHeaderHeight(java.lang.Integer height)
          Height for headers (column titles)
 GroupBuilder setHeaderHeight(java.lang.Integer height, boolean fitHeightToContent)
           
 GroupBuilder setHeaderVariablesHeight(java.lang.Integer height)
          height for values shown in group header such as calculations, current value, etc.
 GroupBuilder setReprintHeaderOnEachPage(boolean bool)
          If the group is configured to print column names, they will be printed on every page (even if a group is splitted in two pages) NOTE: this may cause unexpected results if header variables are present.
 GroupBuilder setStartInNewColumn(boolean bool)
           
 GroupBuilder setStartInNewColumn(java.lang.Boolean bool)
           
 GroupBuilder setStartInNewPage(boolean bool)
           
 GroupBuilder setStartInNewPage(java.lang.Boolean bool)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GroupBuilder

public GroupBuilder()

GroupBuilder

public GroupBuilder(java.lang.String name)
Method Detail

build

public DJGroup build()

setCriteriaColumn

public GroupBuilder setCriteriaColumn(PropertyColumn column)

addHeaderVariable

public GroupBuilder addHeaderVariable(DJGroupVariable variable)

addHeaderVariable

public GroupBuilder addHeaderVariable(AbstractColumn column,
                                      DJCalculation operation)

addHeaderVariable

public GroupBuilder addHeaderVariable(AbstractColumn column,
                                      DJCalculation operation,
                                      Style style)

addHeaderVariable

public GroupBuilder addHeaderVariable(AbstractColumn column,
                                      DJCalculation operation,
                                      Style style,
                                      DJValueFormatter formatter)

addHeaderVariable

public GroupBuilder addHeaderVariable(AbstractColumn column,
                                      DJCalculation operation,
                                      Style style,
                                      DJValueFormatter formatter,
                                      DJGroupLabel glabel1)

addHeaderVariable

public GroupBuilder addHeaderVariable(AbstractColumn column,
                                      CustomExpression valueExpression)

addHeaderVariable

public GroupBuilder addHeaderVariable(AbstractColumn column,
                                      CustomExpression valueExpression,
                                      Style style)

addFooterVariable

public GroupBuilder addFooterVariable(DJGroupVariable variable)

addFooterVariable

public GroupBuilder addFooterVariable(AbstractColumn column3,
                                      DJCalculation operation)

addFooterVariable

public GroupBuilder addFooterVariable(AbstractColumn column3,
                                      DJCalculation operation,
                                      Style style)

addFooterVariable

public GroupBuilder addFooterVariable(AbstractColumn column3,
                                      DJCalculation operation,
                                      Style style,
                                      DJValueFormatter valueFormatter)

addFooterVariable

public GroupBuilder addFooterVariable(AbstractColumn column3,
                                      DJCalculation operation,
                                      Style style,
                                      DJValueFormatter valueFormatter,
                                      DJGroupLabel label)

addFooterVariable

public GroupBuilder addFooterVariable(AbstractColumn column,
                                      CustomExpression valueExpression)

addFooterVariable

public GroupBuilder addFooterVariable(AbstractColumn column,
                                      CustomExpression valueExpression,
                                      Style style)

addVariable

public GroupBuilder addVariable(java.lang.String name,
                                java.lang.String property,
                                java.lang.String className,
                                DJCalculation operation)
Registers a variable for later reference inside custom expressions. The new variable will perform the calculation using the field information passed in the ColumnProperty parameter. Such ColumnProperty will be properly registered in the report design as a field ($F{...})

Parameters:
name -
col -
op -
Returns:

addVariable

public GroupBuilder addVariable(java.lang.String name,
                                ColumnProperty prop,
                                DJCalculation operation)

addVariable

public GroupBuilder addVariable(java.lang.String name,
                                AbstractColumn column,
                                DJCalculation operation)

setHeaderHeight

public GroupBuilder setHeaderHeight(java.lang.Integer height)
Height for headers (column titles)

Parameters:
height -
Returns:

setHeaderHeight

public GroupBuilder setHeaderHeight(java.lang.Integer height,
                                    boolean fitHeightToContent)
Parameters:
height -
fitHeightToContent - is false, an empty space will be left
Returns:

setFooterHeight

public GroupBuilder setFooterHeight(java.lang.Integer height)
Height for footer band. NOT USED AT ALL

Parameters:
height -
Returns:

setFooterHeight

public GroupBuilder setFooterHeight(java.lang.Integer height,
                                    boolean fitHeightToConent)
Parameters:
height -
fitHeightToConent - if false, an empty space will be left
Returns:

setHeaderVariablesHeight

public GroupBuilder setHeaderVariablesHeight(java.lang.Integer height)
height for values shown in group header such as calculations, current value, etc.

Parameters:
height -
Returns:

setFooterVariablesHeight

public GroupBuilder setFooterVariablesHeight(java.lang.Integer height)
height for values shown in group footer such as calculations, current value, etc.

Parameters:
height -
Returns:

setGroupLayout

public GroupBuilder setGroupLayout(GroupLayout layout)

setDefaultFooterVariableStyle

public GroupBuilder setDefaultFooterVariableStyle(Style defaultFooterVariableStyle)

setDefaultHeaderVariableStyle

public GroupBuilder setDefaultHeaderVariableStyle(Style defaultHeaderVariableStyle)

addHeaderSubreport

public GroupBuilder addHeaderSubreport(Subreport subreport)

addFooterSubreport

public GroupBuilder addFooterSubreport(Subreport subreport)

setStartInNewPage

public GroupBuilder setStartInNewPage(java.lang.Boolean bool)

setStartInNewPage

public GroupBuilder setStartInNewPage(boolean bool)

setStartInNewColumn

public GroupBuilder setStartInNewColumn(java.lang.Boolean bool)

setStartInNewColumn

public GroupBuilder setStartInNewColumn(boolean bool)

addColumnHeaderStyle

public GroupBuilder addColumnHeaderStyle(AbstractColumn column,
                                         Style style)

setDefaultColumnHeaderStyle

public GroupBuilder setDefaultColumnHeaderStyle(Style style)

setAllowHeaderSplit

public GroupBuilder setAllowHeaderSplit(boolean headerSplit)
pass-through property to setup group header band "allowSplit" property. When FALSE, if the content reaches end of the page, the whole band gets pushed to the next page.

Parameters:
headerSplit -
Returns:

setAllowFooterSplit

public GroupBuilder setAllowFooterSplit(boolean footerSplit)
pass-through property to setup group footer band "allowSplit" property. When FALSE, if the content reaches end of the page, the whole band gets pushed to the next page.

Parameters:
footerSplit -
Returns:

setAllowSplitting

public GroupBuilder setAllowSplitting(boolean headerSplit,
                                      boolean footerSplit)
pass-through property to setup group header and footer bands "allowSplit" property. When FALSE, if the content reaches end of the page, the whole band gets pushed to the next page.

Parameters:
headerSplit -
footerSplit -
Returns:

setFooterLabel

public GroupBuilder setFooterLabel(DJGroupLabel label)
Footer labels are placed at the right of of the footer variables. It should be used as a general footer to describe variables

Parameters:
label -
Returns:

setReprintHeaderOnEachPage

public GroupBuilder setReprintHeaderOnEachPage(boolean bool)
If the group is configured to print column names, they will be printed on every page (even if a group is splitted in two pages) NOTE: this may cause unexpected results if header variables are present.

Parameters:
bool -
Returns:

addHeaderCrosstab

public GroupBuilder addHeaderCrosstab(DJCrosstab cross)

addFooterCrosstab

public GroupBuilder addFooterCrosstab(DJCrosstab cross)


Copyright © 2006-2011 FDV Solutions. All Rights Reserved.