Class ColumnBuilder<T extends ColumnBuilder<T,U>,U extends DRColumn<?>>

java.lang.Object
net.sf.dynamicreports.report.builder.AbstractBuilder<T,U>
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

Abstract ColumnBuilder class.

Author:
Ricardo Mariaca, Jan Moxter
See Also:
  • Constructor Details

    • ColumnBuilder

      protected ColumnBuilder(U column)

      Constructor for ColumnBuilder.

      Parameters:
      column - a U object.
  • Method Details

    • 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:
    • 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:
    • 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:
    • setTitleStretchWithOverflow

      @Deprecated public T setTitleStretchWithOverflow(Boolean stretchWithOverflow)
      Deprecated.

      setTitleStretchWithOverflow.

      Parameters:
      stretchWithOverflow - a Boolean object.
      Returns:
      a T object.
    • setTitleTextAdjust

      public T setTitleTextAdjust(TextAdjust textAdjust)

      setTitleTextAdjust.

      Parameters:
      textAdjust - a TextAdjust object.
      Returns:
      a T object.
    • 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()

      getComponent.

      Returns:
      a DRComponent object.
    • getColumn

      public U getColumn()

      getColumn.

      Returns:
      a U object.