net.sf.dynamicreports.report.builder.column
Class ColumnBuilder<T extends ColumnBuilder<T,U>,U extends DRColumn<?>>

java.lang.Object
  extended by net.sf.dynamicreports.report.builder.AbstractBuilder<T,U>
      extended by net.sf.dynamicreports.report.builder.column.ColumnBuilder<T,U>
All Implemented Interfaces:
Serializable, ColumnGridComponentBuilder
Direct Known Subclasses:
BooleanColumnBuilder, ComponentColumnBuilder, ValueColumnBuilder

public abstract class ColumnBuilder<T extends ColumnBuilder<T,U>,U extends DRColumn<?>>
extends AbstractBuilder<T,U>
implements ColumnGridComponentBuilder

Author:
Ricardo Mariaca (r.mariaca@dynamicreports.org)
See Also:
Serialized Form

Field Summary
 
Fields inherited from class net.sf.dynamicreports.report.builder.AbstractBuilder
builded
 
Constructor Summary
protected ColumnBuilder(U column)
           
 
Method Summary
 T addTitleProperty(DRIPropertyExpression propertyExpression)
          Adds a jasper property to the column title.
 T addTitleProperty(String name, DRIExpression<String> valueExpression)
          Adds a jasper property to the column title.
 T addTitleProperty(String name, String value)
          Adds a jasper property to the column title.
 U getColumn()
           
protected  DRComponent getComponent()
           
 T setPrintWhenExpression(DRIExpression<Boolean> printWhenExpression)
          Sets the print when expression.
 T setStyle(ReportStyleBuilder style)
          Sets the column value style.
 T setTitle(DRIExpression<?> titleExpression)
          Sets the column title.
 T setTitle(String title)
          Sets the column title.
 T setTitleFixedHeight(Integer height)
          Sets the fixed height of a column title.
 T setTitleFixedRows(Integer rows)
          This method is used to define the fixed height of a column title.
 T setTitleHeight(Integer height)
          Sets the preferred height of a column title.
 T setTitleMinHeight(Integer height)
          Sets the minimum height of a column title.
 T setTitleMinRows(Integer rows)
          This method is used to define the minimum height of a column title.
 T setTitleRows(Integer rows)
          This method is used to define the preferred height of a column title.
 T setTitleStretchWithOverflow(Boolean stretchWithOverflow)
           
 T setTitleStyle(ReportStyleBuilder titleStyle)
          Sets the column title style.
 
Methods inherited from class net.sf.dynamicreports.report.builder.AbstractBuilder
build, configure, getObject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface net.sf.dynamicreports.report.builder.grid.ColumnGridComponentBuilder
build
 

Constructor Detail

ColumnBuilder

protected ColumnBuilder(U column)
Method Detail

setTitle

public T setTitle(DRIExpression<?> titleExpression)
Sets the column title.

Parameters:
titleExpression - the title expression
Returns:
a column builder

setTitle

public T setTitle(String title)
Sets the column title.

Parameters:
title - the title
Returns:
a column builder

setTitleStyle

public T setTitleStyle(ReportStyleBuilder titleStyle)
Sets the column title style.

Parameters:
titleStyle - the title style
Returns:
a column builder

setStyle

public T setStyle(ReportStyleBuilder style)
Sets the column value style.

Parameters:
style - the value style
Returns:
a column builder

setPrintWhenExpression

public T setPrintWhenExpression(DRIExpression<Boolean> printWhenExpression)
Sets the print when expression. The expression must be a type of Boolean and it decides whether or not a column value will be printed.

Parameters:
printWhenExpression - the print expression
Returns:
a column builder

setTitleRows

public T setTitleRows(Integer rows)
This method is used to define the preferred height of a column title. The height is set to the rows multiplied by height of the font

Parameters:
rows - the number of preferred rows >= 0
Returns:
a column builder
Throws:
IllegalArgumentException - if rows is < 0

setTitleFixedRows

public T setTitleFixedRows(Integer rows)
This method is used to define the fixed height of a column title. The height is set to the rows multiplied by height of the font

Parameters:
rows - the number of fixed rows >= 0
Returns:
a column builder
Throws:
IllegalArgumentException - if rows is < 0

setTitleMinRows

public T setTitleMinRows(Integer rows)
This method is used to define the minimum height of a column title. The height is set to the rows multiplied by height of the font

Parameters:
rows - the number of minimum rows >= 0
Returns:
a column builder
Throws:
IllegalArgumentException - if rows is < 0

setTitleHeight

public T setTitleHeight(Integer height)
Sets the preferred height of a column title.

Parameters:
height - the column title preferred height >= 0
Returns:
a column builder
Throws:
IllegalArgumentException - if height is < 0
See Also:
Units

setTitleFixedHeight

public T setTitleFixedHeight(Integer height)
Sets the fixed height of a column title.

Parameters:
height - the column title fixed height >= 0
Returns:
a column builder
Throws:
IllegalArgumentException - if height is < 0
See Also:
Units

setTitleMinHeight

public T setTitleMinHeight(Integer height)
Sets the minimum height of a column title.

Parameters:
height - the column title minimum height >= 0
Returns:
a column builder
Throws:
IllegalArgumentException - if height is < 0
See Also:
Units

setTitleStretchWithOverflow

public T setTitleStretchWithOverflow(Boolean stretchWithOverflow)

addTitleProperty

public T addTitleProperty(DRIPropertyExpression propertyExpression)
Adds a jasper property to the column title.

Parameters:
propertyExpression - the property expression
Returns:
a column builder

addTitleProperty

public T addTitleProperty(String name,
                          DRIExpression<String> valueExpression)
Adds a jasper property to the column title.

Parameters:
name - the property name
valueExpression - the property value expression
Returns:
a column builder

addTitleProperty

public T addTitleProperty(String name,
                          String value)
Adds a jasper property to the column title.

Parameters:
name - the property name
value - the property value
Returns:
a column builder

getComponent

protected DRComponent getComponent()

getColumn

public U getColumn()


Copyright © 2010-2014. All Rights Reserved.