Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## jet.api
Class TableTemplateInfo

    java.lang.Object
      jet.api.TableTemplateInfo

    public class TableTemplateInfo

extends java.lang.Object

The TableTemplateInfo defines the constructor and information of a JReport table object. Tables give you great control over how to present data, including placing fields, grouping them, and sorting them. A table is composed of rows and columns, and each contains several cells. With such a structure a table is a good way to show any two-dimensional dataset.

In JReport, tables are data containers, which means that a table displays the results of a query and you can apply some filters to narrow down the records displayed in it. Also, when a table is inserted into another data container, you can set up data container link between the table and its parent.

Field Summary
`static int` | `GROUP_ABOVE` Table style type.
`static int` | `GROUP_LEFT` Table style type.
`static int` | `GROUP_LEFT_ABOVE` Table style type.
`static int` | `SUMMARY_TABLE` Table style type.

Constructor Summary
`TableTemplateInfo(java.lang.String dataSetName, TableHeaderFooterInfo headerInfo, TableHeaderFooterInfo footerInfo, java.util.Vector children, boolean isHorizontal)` Constructor.

Method Summary
`java.util.Vector` | `getChildren()` Gets definitions of the table contents, such as TableGrouoInfo and TableDetailInfo.
`java.lang.String` | `getDataSet()` Gets the name of the dataset that is bound to the table.
`TableHeaderFooterInfo` | `getFooterInfo()` Gets the definition of the table footer.
`TableHeaderFooterInfo` | `getHeaderInfo()` Gets the definition of the table header.
`double` | `getHeight()` Gets the height of the table.
`double` | `getWidth()` Gets the width of the table.
`boolean` | `isAlignSummaryVertically()` Gets whether the table aligns Summaries vertically or not.
`boolean` | `isClearCurStyle()` Gets if the table clears current style.
`boolean` | `isHorizontal()` Gets if the table layout is horizontal.
`boolean` | `isInheritDataSet()` Gets if the table shares its parent's dataset.
`boolean` | `isStyleInherit()` Gets if the table inherits its parent object's style.
`void` | `setAlignSummaryVertically(boolean alignSummaryVertically)` Sets whether to align Summaries vertically.
`void` | `setChildren(java.util.Vector children)` Gets definitions of the table contents, such as TableGrouoInfo and TableDetailInfo.
`void` | `setClearCurStyle(boolean clearCurStyle)` Sets whether the table clears current style or not.
`void` | `setDataSet(java.lang.String dataSet)` Sets the name of the dataset that is bound to the table.
`void` | `setFooterInfo(TableHeaderFooterInfo footerInfo)` Sets the definition of the table footer.
`void` | `setHeaderInfo(TableHeaderFooterInfo headerInfo)` Sets the definition of the table header.
`void` | `setHeight(double height)` Sets the height of the table.
`void` | `setHorizontal(boolean isHorizontal)` Sets whether the table layout is horizontal or not.
`void` | `setInheritDataSet(boolean isInheritDataSet)` Sets if the table uses parent's dataset.
`void` | `setStyleInherit(boolean styleInherit)` Sets whether the table inherits style or not.
`void` | `setTableType(int tableType)` Sets the table's style type.
`void` | `setWidth(double width)` Sets the width of the table.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### GROUP_ABOVE

    public static final int GROUP_ABOVE

  Table style type. Creates a table with group information above the detail panel.

  See Also:
    Constant Field Values

### GROUP_LEFT

    public static final int GROUP_LEFT

  Table style type. Creates a table with group information left to the detail panel.

  See Also:
    Constant Field Values

### GROUP_LEFT_ABOVE

    public static final int GROUP_LEFT_ABOVE

  Table style type. Creates a table with group information left above the detail panel.

  See Also:
    Constant Field Values

### SUMMARY_TABLE

    public static final int SUMMARY_TABLE

  Table style type. Creates a table with only group and summary information.

  See Also:
    Constant Field Values

Constructor Detail

### TableTemplateInfo

    public TableTemplateInfo(java.lang.String dataSetName,
                             TableHeaderFooterInfo headerInfo,
                             TableHeaderFooterInfo footerInfo,
                             java.util.Vector children,
                             boolean isHorizontal)

  Constructor. Defines a Table template's information.

  Parameters:
    `dataSetName` - The name of the dataset that is bound to the table.
    `headerInfo` - The Information of the table's header.
    `footerInfo` - The Information of the table's footer.
    `children` - Defines the information of the table contents, such as TableGrouoInfo and TableDetailInfo.
    `isHorizontal` - Indicates if the table layout is horizontal.

Method Detail

### getDataSet

    public java.lang.String getDataSet()

  Gets the name of the dataset that is bound to the table.

  Returns:
    the String value of the dataset's name.

### setDataSet

    public void setDataSet(java.lang.String dataSet)

  Sets the name of the dataset that is bound to the table.

  Parameters:
    `dataSet` - The name of the dataset.

### getChildren

    public java.util.Vector getChildren()

  Gets definitions of the table contents, such as TableGrouoInfo and TableDetailInfo.

  Returns:
    a set of table contents' definitions.

### setChildren

    public void setChildren(java.util.Vector children)

  Gets definitions of the table contents, such as TableGrouoInfo and TableDetailInfo.

  Parameters:
    `children` - A set of table contents' definitions.

### getWidth

    public double getWidth()

  Gets the width of the table.

  Returns:
    table's width. The unit of the value can be set by `#API.setUnit(int)`, and the default unit is inch.

### setWidth

    public void setWidth(double width)

  Sets the width of the table.

  Parameters:
    `width` - table's width. The unit of the value can be set by `#API.setUnit(int)`, and the default unit is inch.

### getHeight

    public double getHeight()

  Gets the height of the table.

  Returns:
    table's height. The unit of the value can be set by `#API.setUnit(int)`, and the default unit is inch.

### setHeight

    public void setHeight(double height)

  Sets the height of the table.

  Parameters:
    `height` - table's height. The unit of the value can be set by `#API.setUnit(int)`, and the default unit is inch.

### getFooterInfo

    public TableHeaderFooterInfo getFooterInfo()

  Gets the definition of the table footer.

  Returns:
    the TableHeaderFooterInfo of the table footer.

### setFooterInfo

    public void setFooterInfo(TableHeaderFooterInfo footerInfo)

  Sets the definition of the table footer.

  Parameters:
    `footerInfo` - The TableHeaderFooterInfo defines the table footer.

### getHeaderInfo

    public TableHeaderFooterInfo getHeaderInfo()

  Gets the definition of the table header.

  Returns:
    the TableHeaderFooterInfo definition of the table header.

### setHeaderInfo

    public void setHeaderInfo(TableHeaderFooterInfo headerInfo)

  Sets the definition of the table header.

  Parameters:
    `headerInfo` - TableHeaderFooterInfo of the table header.

### isHorizontal

    public boolean isHorizontal()

  Gets if the table layout is horizontal.

  Returns:
    true if the table layout is horizontal; otherwise returns false.

### setHorizontal

    public void setHorizontal(boolean isHorizontal)

  Sets whether the table layout is horizontal or not.

  Parameters:
    `isHorizontal` - Indicates if the table layout is horizontal.

### isStyleInherit

    public boolean isStyleInherit()

  Gets if the table inherits its parent object's style.

  Returns:
    `true` if the table inherits its parent's style; `false` otherwise.

### setStyleInherit

    public void setStyleInherit(boolean styleInherit)

  Sets whether the table inherits style or not.

  Parameters:
    `styleInherit` - Indicates if the table inherits its parent's style. Set `true` to make the table inherit its parent's style; Set `false` if you want to apply another style to the table.

### isClearCurStyle

    public boolean isClearCurStyle()

  Gets if the table clears current style.

  Returns:
    true if the table clears current style; otherwise returns false.

### setClearCurStyle

    public void setClearCurStyle(boolean clearCurStyle)

  Sets whether the table clears current style or not.

  Parameters:
    `clearCurStyle` - Indicates if the table clears current style.
  See Also:
    `setStyleInherit(boolean)`

### isAlignSummaryVertically

    public boolean isAlignSummaryVertically()

  Gets whether the table aligns Summaries vertically or not. This option is used to define how to display the summaries which locate in the detail column. This option takes effect only when the summary field of the table is located in the detail column.

  Returns:
    true if the table aligns Summaries vertically; otherwise returns false.
  See Also:
    `DisplayFieldInfo#setShowSummaryColumnIn(DisplayFieldInfo.DETAIL_COLUMN)}.`

### setAlignSummaryVertically

    public void setAlignSummaryVertically(boolean alignSummaryVertically)

  Sets whether to align Summaries vertically. This option used to define how to display the summaries which locate in the detail column. This option takes effect only when the summary field of the table is located in the detail column.

  Parameters:
    `alignSummaryVertically` - Specifies whether to align Summaries vertically.
  See Also:
    `DisplayFieldInfo#setShowSummaryColumnIn(DisplayFieldInfo.DETAIL_COLUMN)}.`

### isInheritDataSet

    public boolean isInheritDataSet()

  Gets if the table shares its parent's dataset.

  Returns:
    `true` if the table uses its parent's data; `false` otherwise.

### setInheritDataSet

    public void setInheritDataSet(boolean isInheritDataSet)

  Sets if the table uses parent's dataset.

  Parameters:
    `Specifies` - whether the table uses its parent's data.

### setTableType

    public void setTableType(int tableType)

  Sets the table's style type.

  Parameters:
    `tableType` - Specify the table's style type. The useful constants for the style type:
    - `GROUP_ABOVE` - Creates a table with group information above the detail panel.
    - `GROUP_LEFT_ABOVE` - Creates a table with group information left to the detail panel.
    - `GROUP_LEFT` - Creates a table with group information left above the detail panel.
    - `SUMMARY_TABLE` - Creates a table with only group and summary information.
  Since:
    JReport version 10.0

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD