|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjet.api.TableTemplateInfo
public class TableTemplateInfo
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 |
|---|
public static final int GROUP_ABOVE
public static final int GROUP_LEFT
public static final int GROUP_LEFT_ABOVE
public static final int SUMMARY_TABLE
| Constructor Detail |
|---|
public TableTemplateInfo(java.lang.String dataSetName,
TableHeaderFooterInfo headerInfo,
TableHeaderFooterInfo footerInfo,
java.util.Vector children,
boolean isHorizontal)
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 |
|---|
public java.lang.String getDataSet()
public void setDataSet(java.lang.String dataSet)
dataSet - The name of the dataset.public java.util.Vector getChildren()
public void setChildren(java.util.Vector children)
children - A set of table contents' definitions.public double getWidth()
#API.setUnit(int),
and the default unit is inch.public void setWidth(double width)
width - table's width. The unit of the value can be set by #API.setUnit(int),
and the default unit is inch.public double getHeight()
#API.setUnit(int),
and the default unit is inch.public void setHeight(double height)
height - table's height. The unit of the value can be set by #API.setUnit(int),
and the default unit is inch.public TableHeaderFooterInfo getFooterInfo()
public void setFooterInfo(TableHeaderFooterInfo footerInfo)
footerInfo - The TableHeaderFooterInfo defines the table footer.public TableHeaderFooterInfo getHeaderInfo()
public void setHeaderInfo(TableHeaderFooterInfo headerInfo)
headerInfo - TableHeaderFooterInfo of the table header.public boolean isHorizontal()
public void setHorizontal(boolean isHorizontal)
isHorizontal - Indicates if the table layout is horizontal.public boolean isStyleInherit()
true if the table inherits its parent's style; false otherwise.public void setStyleInherit(boolean styleInherit)
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.public boolean isClearCurStyle()
public void setClearCurStyle(boolean clearCurStyle)
clearCurStyle - Indicates if the table clears current style.setStyleInherit(boolean)public boolean isAlignSummaryVertically()
DisplayFieldInfo#setShowSummaryColumnIn(DisplayFieldInfo.DETAIL_COLUMN)}.public void setAlignSummaryVertically(boolean alignSummaryVertically)
alignSummaryVertically - Specifies whether to align Summaries vertically.DisplayFieldInfo#setShowSummaryColumnIn(DisplayFieldInfo.DETAIL_COLUMN)}.public boolean isInheritDataSet()
true if the table uses its parent's data; false otherwise.public void setInheritDataSet(boolean isInheritDataSet)
Specifies - whether the table uses its parent's data.public void setTableType(int tableType)
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.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||