jet.api
Class CrossTabInfo

java.lang.Object
  extended by jet.api.CrossTabInfo

public class CrossTabInfo
extends java.lang.Object

The class CrossTabInfo defines the information of crosstab. It includes the definitions of rows, columns and aggregations in the crosstab.


Constructor Summary
CrossTabInfo(java.lang.String dataSetName, java.util.Vector<CTRowColFieldInfo> clmFldInfos, java.util.Vector<CTRowColFieldInfo> rowFldInfos, java.util.Vector<CTAggFieldInfo> smrFldInfos, int boundary, boolean isHorizontal)
          Constructor.
 
Method Summary
 boolean addColumnFldInfo(CTRowColFieldInfo elementInfo)
          Inserts the column's information at the end of columns in the crosstab.
 void addColumnFldInfo(int index, CTRowColFieldInfo elementInfo)
          Inserts column field's information at specified index in the crosstab.
 boolean addRowFldInfo(CTRowColFieldInfo info)
          Inserts row's information at the end of rows in the crosstab.
 void addRowFldInfo(int index, CTRowColFieldInfo elementInfo)
          Inserts row's information into the crosstab.
 boolean addSummaryFldInfo(CTAggFieldInfo info)
          Adds aggregate field's information at the end of aggregate fields list in the crosstab.
 void addSummaryFldInfo(int index, CTAggFieldInfo[] infos)
          Inserts aggregate field's informations in the crosstab at the specified position.
 void clearColumnFldInfos()
          Removes all column's informations in the crosstab.
 void clearRowFldInfos()
          Remove all row's informations in the crosstab.
 void clearsmrFldInfos()
          Removes all aggregate field's informations in the crosstab.
 int getBoundary()
          Gets the number of rows/columns with which the aggregate fields to be displayed in the crosstab.
 CTRowColFieldInfo getColumnFldInfo(int index)
          Gets the specified column's information in the crosstab.
 java.util.Vector<CTRowColFieldInfo> getColumnFldInfos()
          Gets column's informations in the crosstab.
 java.lang.String getDataSet()
          Gets dataset name that crosstab referred to.
 double getHeight()
          Gets the predefined height of the crosstab.
 CTRowColFieldInfo getRowFldInfo(int index)
          Gets the specified row's information in the crosstab.
 java.util.Vector<CTRowColFieldInfo> getRowFldInfos()
          Gets row's informations in the crosstab.
 CTAggFieldInfo getSummaryFldInfo(int index)
          Gets the aggregate field's information in the crosstab.
 java.util.Vector<CTAggFieldInfo> getSummaryFldInfos()
          Gets aggregate field's informations in the crosstab.
 double getWidth()
          Gets the predefined width of the crosstab.
 boolean isHorizontal()
          Whether the aggregate fields will be layout horizontally or not.
 boolean isInheritDataSet()
          Specifies whether or not to inherit the parent's dataSet.
 boolean isStyleInherit()
          Checks whether the crosstab use its parent's style.
 boolean removeColumnFldInfo(CTRowColFieldInfo info)
          Removes specified column field's information in the crosstab.
 CTRowColFieldInfo removeColumnFldInfo(int index)
          Removes the specified column's information in the crosstab.
 boolean removeRowFldInfo(CTRowColFieldInfo elementInfo)
          Removes the specified row's information in the crosstab.
 CTRowColFieldInfo removeRowFldInfo(int index)
          Removes the specified row's information in the crosstab.
 boolean removeSummaryFldInfo(CTAggFieldInfo info)
          Removes the specified aggregate field's information from the crosstab.
 CTAggFieldInfo removeSummaryFldInfo(int index)
          Removes the specified aggregate field's information in the crosstab
 void setBoundary(int boundary)
          Sets the number of rows/columns with which the aggregate fields to be displayed in the crosstab.
 void setColumnFldInfos(java.util.Vector<CTRowColFieldInfo> clmFldInfos)
          Sets column's informations in the crosstab.
 void setDataSet(java.lang.String dataSet)
          Sets dataset name that crosstab referred to.
 void setHeight(double height)
          Sets the predefined height of the crosstab.
 void setHorizontal(boolean isHorizontal)
          Sets whether the aggregate fields will be layout horizontally or not.
 void setInheritDataSet(boolean isInheritDataSet)
          Sets whether to inherit parent's dataSet or not.
 void setRowFldInfos(java.util.Vector<CTRowColFieldInfo> rowFldInfos)
          Sets row's informations in the crosstab.
 void setsmrFldInfos(java.util.Vector<CTAggFieldInfo> smrFldInfos)
          Sets the new aggregate field's informations in the crosstab.
 void setStyleInherit(boolean styleInherit)
          Sets whether to make the crosstab to take the style of its parent.
 void setWidth(double width)
          Sets predefined the width of the crosstab.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CrossTabInfo

public CrossTabInfo(java.lang.String dataSetName,
                    java.util.Vector<CTRowColFieldInfo> clmFldInfos,
                    java.util.Vector<CTRowColFieldInfo> rowFldInfos,
                    java.util.Vector<CTAggFieldInfo> smrFldInfos,
                    int boundary,
                    boolean isHorizontal)
Constructor. Creates Crosstab informations.

Parameters:
dataSetName - The dataset's name that will be used to build the crosstab.
clmFldInfos - The column's informations in the crosstab.
rowFldInfos - The row's informations in the crosstab.
smrFldInfos - The aggregate field's informations in the crosstab.
isHorizontal - Specifies whether the aggregate fields will be layout in the crosstab horizontally or not.
boundary - Specifies the number of rows/columns of the aggregate fields in the crosstab according to the isHorizontal. I.e, if the isHorizontal is true, by default, the boundary is -1, which means that there is only one row with which to arrange the aggregate fields horizontally; if it is set to 1, that means there will be only one column to arrange the aggregate fields vertically; if it is set to a number larger than 1, that means there will be this number of aggregate columns; if this number is larger than the number of aggregate fields in the crosstab, it will be treated as -1.
Method Detail

getDataSet

public java.lang.String getDataSet()
Gets dataset name that crosstab referred to.

Returns:
dataset name that crosstab referred to.

setDataSet

public void setDataSet(java.lang.String dataSet)
Sets dataset name that crosstab referred to.

Parameters:
dataSet - dataset name that crosstab referred to.

getColumnFldInfos

public java.util.Vector<CTRowColFieldInfo> getColumnFldInfos()
Gets column's informations in the crosstab.

Returns:
a list of column's informations in the crosstab.

setColumnFldInfos

public void setColumnFldInfos(java.util.Vector<CTRowColFieldInfo> clmFldInfos)
Sets column's informations in the crosstab.

Parameters:
clmFldInfos - The column's informations in the crosstab.

addColumnFldInfo

public void addColumnFldInfo(int index,
                             CTRowColFieldInfo elementInfo)
Inserts column field's information at specified index in the crosstab.

Parameters:
index - The index of the new CTRowColFieldInfo in the crosstab columns. The index starts from 0.
elementInfo - The new column field's information.

addColumnFldInfo

public boolean addColumnFldInfo(CTRowColFieldInfo elementInfo)
Inserts the column's information at the end of columns in the crosstab.

Parameters:
elementInfo - The new column field's information.
Returns:
true if it adds successfully; false otherwise.

clearColumnFldInfos

public void clearColumnFldInfos()
Removes all column's informations in the crosstab.


getColumnFldInfo

public CTRowColFieldInfo getColumnFldInfo(int index)
Gets the specified column's information in the crosstab.

Parameters:
index - The index of the specified column in the crosstab. The index starts from 0.
Returns:
the CTRowColFieldInfo presents the column's information.

removeColumnFldInfo

public CTRowColFieldInfo removeColumnFldInfo(int index)
Removes the specified column's information in the crosstab.

Parameters:
index - The index of the CTRowColFieldInfo to be removed. The index starts from 0.
Returns:
the CTRowColFieldInfo if removes successfully; null otherwise.

removeColumnFldInfo

public boolean removeColumnFldInfo(CTRowColFieldInfo info)
Removes specified column field's information in the crosstab.

Parameters:
info - column field's information to be removed.
Returns:
true if it removes successfully; false otherwise.

getSummaryFldInfos

public java.util.Vector<CTAggFieldInfo> getSummaryFldInfos()
Gets aggregate field's informations in the crosstab.

Returns:
a list of aggregate field's informations in the crosstab.

setsmrFldInfos

public void setsmrFldInfos(java.util.Vector<CTAggFieldInfo> smrFldInfos)
Sets the new aggregate field's informations in the crosstab.

Parameters:
smrFldInfos - The new aggregate field's informations in the crosstab.

addSummaryFldInfo

public void addSummaryFldInfo(int index,
                              CTAggFieldInfo[] infos)
Inserts aggregate field's informations in the crosstab at the specified position.

Parameters:
index - The index of the new CTAggFieldInfos in the crosstab columns. The index starts from 0.
infos - The new aggregate field's informations to be inserted.

addSummaryFldInfo

public boolean addSummaryFldInfo(CTAggFieldInfo info)
Adds aggregate field's information at the end of aggregate fields list in the crosstab.

Parameters:
info - The new aggregate field's information to be inserted.
Returns:
true if it adds successfully; false otherwise.

clearsmrFldInfos

public void clearsmrFldInfos()
Removes all aggregate field's informations in the crosstab.


getSummaryFldInfo

public CTAggFieldInfo getSummaryFldInfo(int index)
Gets the aggregate field's information in the crosstab.

Parameters:
index - The index specifies the CTAggFieldInfos in the crosstab. The index starts from 0.
Returns:
the CTAggFieldInfo presents the aggregate field's information

removeSummaryFldInfo

public CTAggFieldInfo removeSummaryFldInfo(int index)
Removes the specified aggregate field's information in the crosstab

Parameters:
index - The index specifies the CTAggFieldInfos in the crosstab. The index starts from 0.
Returns:
the CTAggFieldInfo if removes successfully; null otherwise.

removeSummaryFldInfo

public boolean removeSummaryFldInfo(CTAggFieldInfo info)
Removes the specified aggregate field's information from the crosstab.

Parameters:
info - The aggregate field's information to be removed from the crosstab.
Returns:
true if it removes successfully; false otherwise.

getRowFldInfos

public java.util.Vector<CTRowColFieldInfo> getRowFldInfos()
Gets row's informations in the crosstab.

Returns:
a list of row's informations.

setRowFldInfos

public void setRowFldInfos(java.util.Vector<CTRowColFieldInfo> rowFldInfos)
Sets row's informations in the crosstab.

Parameters:
rowFldInfos - The new row's informations in the crosstab.

addRowFldInfo

public void addRowFldInfo(int index,
                          CTRowColFieldInfo elementInfo)
Inserts row's information into the crosstab.

Parameters:
index - The index of the new CTRowColFieldInfo in the crosstab rows. The index starts from 0.
elementInfo - The new row's information.

addRowFldInfo

public boolean addRowFldInfo(CTRowColFieldInfo info)
Inserts row's information at the end of rows in the crosstab.

Parameters:
info - The new row's CTRowColFieldInfo information.
Returns:
true if it adds successfully; false otherwise.

clearRowFldInfos

public void clearRowFldInfos()
Remove all row's informations in the crosstab.


getRowFldInfo

public CTRowColFieldInfo getRowFldInfo(int index)
Gets the specified row's information in the crosstab.

Parameters:
index - The index of the specified row in the crosstab. The index starts from 0.
Returns:
the CTRowColFieldInfo presents the row's information.

removeRowFldInfo

public CTRowColFieldInfo removeRowFldInfo(int index)
Removes the specified row's information in the crosstab.

Parameters:
index - The index of row to be removed. The index starts from 0.
Returns:
the CTRowColFieldInfo if removes successfully; null otherwise.

removeRowFldInfo

public boolean removeRowFldInfo(CTRowColFieldInfo elementInfo)
Removes the specified row's information in the crosstab.

Parameters:
elementInfo - The row's information to be removed.
Returns:
true if it removes successfully; false otherwise.

getBoundary

public int getBoundary()
Gets the number of rows/columns with which the aggregate fields to be displayed in the crosstab.

Returns:
the number of rows/columns to be displayed in the crosstab.

setBoundary

public void setBoundary(int boundary)
Sets the number of rows/columns with which the aggregate fields to be displayed in the crosstab. The boundary works according to the isHorizontal. I.e, if the isHorizontal is true, by default, the boundary is -1, which means that there is only one row with which to arrange the aggregate fields horizontally; if it is set to 1, that means there will be only one column to arrange the aggregate fields vertically; if it is set to a number larger than 1, that means there will be this number of aggregate columns; if this number is larger than the number of aggregate fields in the crosstab, it will be treated as -1.

Parameters:
boundary - The number of rows/columns with which the aggregate fields to be displayed in the crosstab.

isHorizontal

public boolean isHorizontal()
Whether the aggregate fields will be layout horizontally or not.

Returns:
true if aggregate fields will be layout horizontally; false, aggregate fields will be layout vertically.

setHorizontal

public void setHorizontal(boolean isHorizontal)
Sets whether the aggregate fields will be layout horizontally or not.

Parameters:
isHorizontal - true if aggregate fields will be layout horizontally; false, aggregate fields will be layout vertically.

getHeight

public double getHeight()
Gets the predefined height of the crosstab.

Returns:
the predefined height of crosstab.

setHeight

public void setHeight(double height)
Sets the predefined height of the crosstab.

Parameters:
height - The predefined height of the crosstab.

getWidth

public double getWidth()
Gets the predefined width of the crosstab.

Returns:
The predefined width of the crosstab.

setWidth

public void setWidth(double width)
Sets predefined the width of the crosstab.

Parameters:
width - The predefined width of the crosstab.

isInheritDataSet

public boolean isInheritDataSet()
Specifies whether or not to inherit the parent's dataSet.

Returns:
true if the parent's dataSet used; false otherwise.

setInheritDataSet

public void setInheritDataSet(boolean isInheritDataSet)
Sets whether to inherit parent's dataSet or not.

Parameters:
isInheritDataSet - if true it will use parent's dataSet; otherwise if false.

isStyleInherit

public boolean isStyleInherit()
Checks whether the crosstab use its parent's style.

Returns:
true if the crosstab uses its parent's the style; true otherwise.

setStyleInherit

public void setStyleInherit(boolean styleInherit)
Sets whether to make the crosstab to take the style of its parent. Available only when the crosstab is inserted into a banded object.

Parameters:
styleInherit - Specifies whether the crosstab uses the style of its parent or not.