jet.api
Class TableGroupInfo

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

public class TableGroupInfo
extends java.lang.Object

TableGroupInfo defines the information of JReport Table Group object. The TableGroupInfo includes the information of groupby, sort, filter, and special group options.


Field Summary
static int ADVANCEDSORT
          Sort type of group.
static int ASCENDING
          sort type of group
static int DESCENDING
          sort type of group
static int NOTSORTED
          sort type of group
static int SPECIFIEDORDER
          Sort type of group.
 
Constructor Summary
TableGroupInfo(java.lang.String groupFieldName, int sortType)
          Creates a GroupInfo object for a table.
TableGroupInfo(java.lang.String blName, java.lang.String groupFieldName, int sortType, int specialFunctionType)
          Creates a GroupInfo.
 
Method Summary
 void addChild(int index, java.lang.Object element)
          Inserts a group or detail at the specified position as a child of the group.
 boolean addChild(java.lang.Object child)
          Appends a group or a detail's information as a child of this group.
 void addFooterInfo(int index, TableHeaderFooterInfo element)
          Inserts FooterInfo of the group at the specified position.
 boolean addFooterInfo(TableHeaderFooterInfo footerInfo)
          Appends a footer's information of this group.
 boolean addGroupFilterInfo(FilterInfo filterInfo)
          Appends a group filter's information into the set of FilterInfo.
 void addGroupFilterInfo(int index, FilterInfo element)
          Inserts FilterInfo of the group at the specified position.
 void addHeaderInfo(int index, TableHeaderFooterInfo element)
          Inserts the HeaderInfo of the group at the specified position.
 boolean addHeaderInfo(TableHeaderFooterInfo headerInfo)
          Appends a header's information of this group.
 void addSortInfo(int index, SortInfo element)
          Inserts the SortInfo of the group at the specified position.
 boolean addSortInfo(SortInfo sortInfo)
          Appends a group sort's information.
 void clearChildren()
          Removes all of the children from the group.
 void clearFooterInfos()
          Removes all of the footers' information from the group.
 void clearGroupFilterInfos()
          Removes all of the filters' information from the group.
 void clearHeaderInfos()
          Removes all of the headers' information from the group.
 void clearSortInfos()
          Removes all of the sorts' information from the group.
 TableAdvanceOption getAdvOption()
          Gets AdvanceOption of the group.
 java.lang.String getBLName()
          Gets groupby with Business Logic node's BLQulifyName.
 java.lang.Object getChild(int index)
          Returns the GroupInfo or DetailInfo at the specified position.
 java.util.Vector getChildren()
          Gets children of this group.
 TableHeaderFooterInfo getFooterInfo(int index)
          Returns the FooterInfo at the specified position.
 java.util.Vector getFooterInfos()
          Gets the footers' information of this group.
 DisplayFieldInfo getGroupFieldInfo()
          Gets the group field information.
 java.lang.String getGroupFieldName()
          Gets the group field name.
 FilterInfo getGroupFilterInfo(int index)
          Returns the FilterInfo at the specified position.
 java.util.Vector getGroupFilterInfos()
          Sets the group filters' information.
 TableHeaderFooterInfo getHeaderInfo(int index)
          Returns the HeaderInfo at the specified position.
 java.util.Vector getHeaderInfos()
          Gets the headers' information of this group.
 double getIndentInterval()
          Gets an indent interval against the previous group.
 SortInfo getSortInfo(int index)
          Returns the SortInfo at the specified position.
 java.util.Vector getSortInfos()
          Sets the group sorts' information.
 int getSortType()
          Gets the sort type of the group.
 int getSpecialFunctionType()
          Gets the special function type of the group.
 TableSpecifieldOption getSpecOption()
          Gets the special option of the group's sort.
 boolean isIndentGroup()
          Checks whether it is an indent group against the previous group or not.
 boolean isParallel()
          Deprecated. since version 10.0.
 java.lang.Object removeChild(int index)
          Removes the element at the specified position.
 boolean removeChild(java.lang.Object o)
          Removes the first occurrence of the specified element.
 TableHeaderFooterInfo removeFooterInfo(int index)
          Removes the FooterInfo at the specified position.
 boolean removeFooterInfo(TableHeaderFooterInfo o)
          Removes the first occurrence of the FooterInfo.
 boolean removeGroupFilterInfo(FilterInfo filterInfo)
          Removes the first occurrence of the specified FilterInfo.
 FilterInfo removeGroupFilterInfo(int index)
          Removes the FilterInfo at the specified position.
 TableHeaderFooterInfo removeHeaderInfo(int index)
          Removes the HeaderInfo at the specified position.
 boolean removeHeaderInfo(TableHeaderFooterInfo headerInfo)
          Removes the first occurrence of the HeaderInfo.
 SortInfo removeSortInfo(int index)
          Removes the SortInfo at the specified position.
 boolean removeSortInfo(SortInfo o)
          Removes the first occurrence of the SortInfo.
 void setAdvOption(TableAdvanceOption advOption)
          Sets AdvanceOption of the group.
 void setBLName(java.lang.String blName)
          Sets groupby with Business Logic node's BLQulifyName.
 void setChildren(java.util.Vector children)
          Sets the nested groups and details' information as the children of this group.
 void setFooterInfos(java.util.Vector footerInfos)
          Sets the footers' information of this group.
 void setGroupFieldName(java.lang.String groupFieldName)
          Sets the group field name.
 void setGroupFilterInfos(java.util.Vector groupFilterInfos)
          Sets the group filters' information.
 void setHeaderInfos(java.util.Vector headerInfos)
          Sets the headers' information of this group.
 void setIndentGroup(boolean isIndentGroup)
          sets whether it is an indent group against the previous group or not.
 void setIndentInterval(double indentInterval)
          Sets an indent interval value against the previous group.
 void setParallel(boolean isParallel)
          Deprecated. since version 10.0.
 void setSortInfos(java.util.Vector sortInfos)
          Sets the group sorts' information.
 void setSortType(int sortType)
          Sets the sort type of the group.
 void setSpecialFunctionType(int specialFunctionType)
          Sets the special function type of the group.
 void setSpecOption(TableSpecifieldOption specOption)
          Sets the special option of the group's sort.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ASCENDING

public static final int ASCENDING
sort type of group

See Also:
Constant Field Values

DESCENDING

public static final int DESCENDING
sort type of group

See Also:
Constant Field Values

NOTSORTED

public static final int NOTSORTED
sort type of group

See Also:
Constant Field Values

SPECIFIEDORDER

public static final int SPECIFIEDORDER
Sort type of group. Specify the User Defined Group.

See Also:
Constant Field Values

ADVANCEDSORT

public static final int ADVANCEDSORT
Sort type of group. Specify to sort the group by SortInfos.

See Also:
Constant Field Values
Constructor Detail

TableGroupInfo

public TableGroupInfo(java.lang.String groupFieldName,
                      int sortType)
Creates a GroupInfo object for a table.

Parameters:
groupFieldName - The groupby field name.
sortType - The sort order type.

TableGroupInfo

public TableGroupInfo(java.lang.String blName,
                      java.lang.String groupFieldName,
                      int sortType,
                      int specialFunctionType)
Creates a GroupInfo.

Parameters:
groupFieldName - The groupby field name.
sortType - The sort order type.
specialFunctionType - The special function type.
Method Detail

getAdvOption

public TableAdvanceOption getAdvOption()
Gets AdvanceOption of the group.

Returns:
Advanced Option of the Group.

setAdvOption

public void setAdvOption(TableAdvanceOption advOption)
Sets AdvanceOption of the group. This option takes effect only when the group's sort type is ASCENDING, DESCENDING, or NOTSORTED.

Parameters:
advOption - Advanced Option of the Group.

getGroupFieldInfo

public DisplayFieldInfo getGroupFieldInfo()
Gets the group field information.

Returns:
DisplayFieldInfo of the group field.

getGroupFieldName

public java.lang.String getGroupFieldName()
Gets the group field name.

Returns:
String group field name.

setGroupFieldName

public void setGroupFieldName(java.lang.String groupFieldName)
Sets the group field name.

Parameters:
groupFieldName - Group field name.

getBLName

public java.lang.String getBLName()
Gets groupby with Business Logic node's BLQulifyName.

Returns:
String value of groupby of Business Logic node's BLQulifyName.

setBLName

public void setBLName(java.lang.String blName)
Sets groupby with Business Logic node's BLQulifyName.

Parameters:
blName - The Business Logic node's BLQulifyName of the groupby field.

getGroupFilterInfos

public java.util.Vector getGroupFilterInfos()
Sets the group filters' information.

Returns:
Vector of FilterInfo.

setGroupFilterInfos

public void setGroupFilterInfos(java.util.Vector groupFilterInfos)
Sets the group filters' information.

Parameters:
groupFilterInfos - Vector of FilterInfo.

addGroupFilterInfo

public void addGroupFilterInfo(int index,
                               FilterInfo element)
Inserts FilterInfo of the group at the specified position.

Parameters:
index - Index at which the FilterInfo is to be inserted. The index starts at 0.
element - FilterInfo to be inserted.
Throws:
java.lang.ArrayIndexOutOfBoundsException - Index is out of range (index < 0 || index > size()).

addGroupFilterInfo

public boolean addGroupFilterInfo(FilterInfo filterInfo)
Appends a group filter's information into the set of FilterInfo.

Parameters:
filterInfo - FilterInfo to be appended.
Returns:
true if inserts object succeed; false otherwise.

clearGroupFilterInfos

public void clearGroupFilterInfos()
Removes all of the filters' information from the group.


getGroupFilterInfo

public FilterInfo getGroupFilterInfo(int index)
Returns the FilterInfo at the specified position.

Parameters:
index - Index of FilterInfo in the set of FilterInfo. The index starts with 0.
Returns:
FilterInfo at the specified index.
Throws:
java.lang.ArrayIndexOutOfBoundsException - Index is out of range (index < 0 || index >= size()).

removeGroupFilterInfo

public FilterInfo removeGroupFilterInfo(int index)
Removes the FilterInfo at the specified position. shifts all subsequent FilterInfos to the left (subtracts one from the indices). Returns the FilterInfo that is removed.

Parameters:
index - The index of the FilterInfo to be removed.
Returns:
FilterInfo that is removed.
Throws:
java.lang.ArrayIndexOutOfBoundsException - Index out of range (index < 0 || index >= size()).

removeGroupFilterInfo

public boolean removeGroupFilterInfo(FilterInfo filterInfo)
Removes the first occurrence of the specified FilterInfo. If the Vector does not contain the FilterInfo, it is unchanged. More formally, removes the FilterInfo with the lowest index.

Parameters:
filterInfo - FilterInfo to be removed, if present.
Returns:
true if the object is removed successfully; false otherwise.

getSortInfos

public java.util.Vector getSortInfos()
Sets the group sorts' information.

Returns:
Vector of SortInfo.

setSortInfos

public void setSortInfos(java.util.Vector sortInfos)
Sets the group sorts' information. This option takes effect only when the group's sort type is ADVANCEDSORT.

Parameters:
sortInfos - The list of SortInfo.
See Also:
setSortType(int)

addSortInfo

public void addSortInfo(int index,
                        SortInfo element)
Inserts the SortInfo of the group at the specified position. This option takes effect only when the group's sort type is ADVANCEDSORT.

Parameters:
index - Index at which the SortInfo is to be inserted.
element - SortInfo to be inserted.
Throws:
java.lang.ArrayIndexOutOfBoundsException - Index is out of range (index < 0 || index > size()).
See Also:
setSortType(int)

addSortInfo

public boolean addSortInfo(SortInfo sortInfo)
Appends a group sort's information. This option takes effect only when the group's sort type is ADVANCEDSORT.

Parameters:
sortInfo - SortInfo to be added.
Returns:
true if the object is inserted successfully; false otherwise.
See Also:
setSortType(int)

clearSortInfos

public void clearSortInfos()
Removes all of the sorts' information from the group.


getSortInfo

public SortInfo getSortInfo(int index)
Returns the SortInfo at the specified position.

Parameters:
index - Index of the SortInfo to return.
Returns:
SortInfo at the specified index
Throws:
java.lang.ArrayIndexOutOfBoundsException - Index is out of range (index < 0 || index >= size()).

removeSortInfo

public SortInfo removeSortInfo(int index)
Removes the SortInfo at the specified position. shifts all subsequent SortInfos to the left (subtracts one from the indices). Returns the SortInfo that is removed.

Parameters:
index - The index of the SortInfo to removed.
Returns:
SortInfo that is removed
Throws:
java.lang.ArrayIndexOutOfBoundsException - Index out of range (index < 0 || index >= size()).

removeSortInfo

public boolean removeSortInfo(SortInfo o)
Removes the first occurrence of the SortInfo. If the Vector does not contain the SortInfo, it is unchanged. More formally, removes the SortInfo with the lowest index.

Parameters:
o - SortInfo to be removed, if present.
Returns:
true if the object is removed successfully; false otherwise.

getSortType

public int getSortType()
Gets the sort type of the group.

Returns:
int type of the sort type.
See Also:
#ASCENDING, {@link #DESCENDING},{@link #NOTSORTED},{@link #SPECIFIEDORDER},{@link #ADVANCEDSORT}

setSortType

public void setSortType(int sortType)
Sets the sort type of the group.

Parameters:
sortType - int type of the sort type.
See Also:
#ASCENDING}, {@link #DESCENDING},{@link #NOTSORTED},{@link #SPECIFIEDORDER},{@link #ADVANCEDSORT}

getSpecialFunctionType

public int getSpecialFunctionType()
Gets the special function type of the group.

Returns:
int type.

setSpecialFunctionType

public void setSpecialFunctionType(int specialFunctionType)
Sets the special function type of the group.

Parameters:
specialFunctionType -

getSpecOption

public TableSpecifieldOption getSpecOption()
Gets the special option of the group's sort.

Returns:
SpecifieldOption defines special option of the group's sort.

setSpecOption

public void setSpecOption(TableSpecifieldOption specOption)
Sets the special option of the group's sort. This option takes effect only when the group's sort type is SPECIFIEDORDER.

Parameters:
specOption - The TableSpecifieldOption of the group.
See Also:
setSortType(int)

getChildren

public java.util.Vector getChildren()
Gets children of this group.

Returns:
Vector of nested TableGroupInfo and TableDetailInfo.

setChildren

public void setChildren(java.util.Vector children)
Sets the nested groups and details' information as the children of this group.


addChild

public void addChild(int index,
                     java.lang.Object element)
Inserts a group or detail at the specified position as a child of the group.

Parameters:
index - Index at which the specified element is to be inserted.
element - Element to be inserted. Element must be TableGroupInfo or TableDetailInfo.
Throws:
java.lang.ArrayIndexOutOfBoundsException - if the index is out of range (index < 0 || index > size()).

addChild

public boolean addChild(java.lang.Object child)
Appends a group or a detail's information as a child of this group.

Parameters:
child - Element to be inserted. Element must be TableGroupInfo or TableDetailInfo.
Returns:
true if inserts object succeed; false otherwise.

clearChildren

public void clearChildren()
Removes all of the children from the group.


getChild

public java.lang.Object getChild(int index)
Returns the GroupInfo or DetailInfo at the specified position.

Parameters:
index - Index of the element to return.
Returns:
GroupInfo or DetailInfo at the specified index.
Throws:
java.lang.ArrayIndexOutOfBoundsException - Index is out of range (index < 0 || index >= size()).

removeChild

public java.lang.Object removeChild(int index)
Removes the element at the specified position. shifts all subsequent elements to the left (subtracts one from the indices). Returns the element that is removed.

Parameters:
index - The index of the element to removed.
Returns:
GroupInfo or DetailInfo that is removed.
Throws:
java.lang.ArrayIndexOutOfBoundsException - if the index is out of range (index < 0 || index >= size()).

removeChild

public boolean removeChild(java.lang.Object o)
Removes the first occurrence of the specified element. If the Vector does not contain the element, it is unchanged. More formally, removes the element with the lowest index.

Parameters:
o - GroupInfo or DetailInfo to be removed, if present.
Returns:
true if the object is removed successfully; false otherwise.

isParallel

public boolean isParallel()
Deprecated. since version 10.0.

Tests if this group is parallel.

Returns:
true if the group is a parallel section.

setParallel

public void setParallel(boolean isParallel)
Deprecated. since version 10.0.

Sets the group to be parallel or not.

Parameters:
isParallel - Specifies if the group is a parallel section.

getFooterInfos

public java.util.Vector getFooterInfos()
Gets the footers' information of this group.

Returns:
Vector of FooterInfo.

setFooterInfos

public void setFooterInfos(java.util.Vector footerInfos)
Sets the footers' information of this group.


addFooterInfo

public void addFooterInfo(int index,
                          TableHeaderFooterInfo element)
Inserts FooterInfo of the group at the specified position.

Parameters:
index - Index at which the FooterInfo is to be inserted.
element - FooterInfo to be inserted.
Throws:
java.lang.ArrayIndexOutOfBoundsException - if the index is out of range (index < 0 || index > size()).

addFooterInfo

public boolean addFooterInfo(TableHeaderFooterInfo footerInfo)
Appends a footer's information of this group.

Parameters:
footerInfo - FooterInfo to be appended.
Returns:
true if the object is inserted successfully; false otherwise.

clearFooterInfos

public void clearFooterInfos()
Removes all of the footers' information from the group.


getFooterInfo

public TableHeaderFooterInfo getFooterInfo(int index)
Returns the FooterInfo at the specified position.

Parameters:
index - Index of the FooterInfo to return.
Returns:
FooterInfo at the specified index
Throws:
java.lang.ArrayIndexOutOfBoundsException - if the index is out of range (index < 0 || index >= size()).

removeFooterInfo

public TableHeaderFooterInfo removeFooterInfo(int index)
Removes the FooterInfo at the specified position. shifts all subsequent FooterInfos to the left (subtracts one from the indices). Returns the FooterInfo that is removed.

Parameters:
index - The index of the FooterInfo to be removed.
Returns:
FooterInfo that is removed
Throws:
java.lang.ArrayIndexOutOfBoundsException - if the index out of range (index < 0 || index >= size()).

removeFooterInfo

public boolean removeFooterInfo(TableHeaderFooterInfo o)
Removes the first occurrence of the FooterInfo. If the Vector does not contain the FooterInfo, it is unchanged. More formally, removes the FooterInfo with the lowest index.

Parameters:
o - FooterInfo to be removed, if present.
Returns:
true if the object is removed successfully; false otherwise.

getHeaderInfos

public java.util.Vector getHeaderInfos()
Gets the headers' information of this group.

Returns:
Vector of the HeaderInfo.

setHeaderInfos

public void setHeaderInfos(java.util.Vector headerInfos)
Sets the headers' information of this group.


addHeaderInfo

public void addHeaderInfo(int index,
                          TableHeaderFooterInfo element)
Inserts the HeaderInfo of the group at the specified position.

Parameters:
index - Index at which the HeaderInfo is to be inserted.
element - HeaderInfo to be inserted.
Throws:
java.lang.ArrayIndexOutOfBoundsException - if the index is out of range (index < 0 || index > size()).

addHeaderInfo

public boolean addHeaderInfo(TableHeaderFooterInfo headerInfo)
Appends a header's information of this group.

Parameters:
headerInfo - HeaderInfo to be appended.
Returns:
true if inserts object succeed; false otherwise.

clearHeaderInfos

public void clearHeaderInfos()
Removes all of the headers' information from the group.


getHeaderInfo

public TableHeaderFooterInfo getHeaderInfo(int index)
Returns the HeaderInfo at the specified position.

Parameters:
index - Index of the HeaderInfo to return.
Returns:
HeaderInfo at the specified index
Throws:
java.lang.ArrayIndexOutOfBoundsException - if the index is out of range (index < 0 || index >= size()).

removeHeaderInfo

public TableHeaderFooterInfo removeHeaderInfo(int index)
Removes the HeaderInfo at the specified position. shifts all subsequent HeaderInfos to the left (subtracts one from the indices). Returns the HeaderInfo that is removed.

Parameters:
index - The index of the HeaderInfo to be removed.
Returns:
HeaderInfo that is removed
Throws:
java.lang.ArrayIndexOutOfBoundsException - if the index out of range (index < 0 || index >= size()).

removeHeaderInfo

public boolean removeHeaderInfo(TableHeaderFooterInfo headerInfo)
Removes the first occurrence of the HeaderInfo. If the Vector does not contain the HeaderInfo, it is unchanged. More formally, removes the HeaderInfo with the lowest index

Parameters:
headerInfo - HeaderInfo to be removed, if present.
Returns:
true if the object is removed successfully; false otherwise.

isIndentGroup

public boolean isIndentGroup()
Checks whether it is an indent group against the previous group or not.

Returns:
true if it is an indent group against the previous group; false otherwise;

setIndentGroup

public void setIndentGroup(boolean isIndentGroup)
sets whether it is an indent group against the previous group or not.

Parameters:
isIndentGroup - Sets true if it is an indent group against the previous group; false otherwise;

getIndentInterval

public double getIndentInterval()
Gets an indent interval against the previous group.

Returns:
indent interval value against the previous group. The unit of the value can be set by #API.setUnit(int), and the default unit is inch.

setIndentInterval

public void setIndentInterval(double indentInterval)
Sets an indent interval value against the previous group.

Parameters:
indentInterval - Indent interval value against the previous group. The unit of the value can be set by #API.setUnit(int), and the default unit is inch.