|
Style Intelligence v12.0 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectinetsoft.report.lens.AbstractTableLens
inetsoft.report.filter.AbstractGroupedTable
inetsoft.report.filter.TopNFilter
public class TopNFilter
This filter sorts the summaried sections of a grouped table, and extracts the topN sections. If the N value set to ALL, all sections are displayed in sorted order.
Every group level of the grouped table is topN filterable. If set topN info of a group level more than twice, the latter will override the former.
If a group level has more than one group columns, when design topN in designer, any one of them chosen to be the group level's group column is ok, and if design topN for more than one group columns in a group level, the latter will override the former when topN filtering.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class inetsoft.report.filter.AbstractGroupedTable |
|---|
AbstractGroupedTable.BooleanObject |
| Field Summary | |
|---|---|
static int |
ALL
This can be used as the N value to include all data. |
| Fields inherited from class inetsoft.report.lens.AbstractTableLens |
|---|
descriptor, isLeftAlign |
| Fields inherited from interface inetsoft.report.filter.GroupedTable |
|---|
GROUP_HEADER_FULL, GROUP_HEADER_IN_PLACE, GROUP_HEADER_ROWS |
| Fields inherited from interface inetsoft.report.TableLens |
|---|
BREAK_BORDER, NULL |
| Fields inherited from interface inetsoft.uql.XTable |
|---|
EOT |
| Constructor Summary | |
|---|---|
TopNFilter(GroupedTable table)
Create a TopNFilter instance. |
|
TopNFilter(GroupedTable table,
int n,
int sortcol)
Deprecated. call setTopNInfo(int, int) method to set topN info |
|
TopNFilter(GroupedTable table,
int n,
int[] sortcols,
boolean asc)
Deprecated. call setTopNInfo(int, int[], boolean) method to set
topN info |
|
TopNFilter(GroupedTable table,
int n,
int level,
int[] sortcols,
boolean asc)
Deprecated. call setTopNInfo(int, int, int[], boolean, boolean)
method to set topN info. |
|
| Method Summary | |
|---|---|
void |
clearPageBreaks()
Clear page breaks. |
void |
dispose()
Dispose the table to clear up temporary resources. |
int |
firstSummaryColumn()
Return the first summary column number. |
int |
getAlignment(int r,
int c)
Return the per cell alignment. |
Color |
getBackground(int r,
int c)
Return the per cell background color. |
int |
getBaseColIndex(int col)
Get the base table column index corresponding to the filtered table. |
int |
getBaseRowIndex(int row)
Get the base table row index corresponding to the filtered table. |
int |
getColBorder(int r,
int c)
Return the style for right border of the specified row. |
Color |
getColBorderColor(int r,
int c)
Return the color for drawing the column border lines. |
int |
getColCount()
Return the number of columns in the table. |
Class |
getColType(int col)
Get the column data type. |
int |
getColWidth(int col)
Get the current column width setting. |
Comparer |
getComparer(int col)
Get the comparer for the specified column. |
TableDataDescriptor |
getDescriptor()
Get internal table data descriptor which contains table structural infos. |
Font |
getFont(int r,
int c)
Return the per cell font. |
Color |
getForeground(int r,
int c)
Return the per cell foreground color. |
Formula |
getGrandFormula(int col)
Get the grand total formula of the column. |
int |
getGroupColCount()
Return the number of grouping columns. |
int |
getGroupColLevel(int col)
Get a group col's group level. |
int |
getGroupColumns(int level)
Get the number of columns used in the specified grouping level. |
Formula |
getGroupFormula(int col)
Get the group formula of the column. |
int |
getGroupHeaderStyle()
Get the group header style. |
int |
getGroupLevel(int r)
Get the grouping level of this group header. |
int |
getGroupLevel0(int r)
Get the internal keep row level for the first row of a group. |
int |
getHeaderColCount()
Return the number of columns on the left of the table to be treated as header columns. |
int |
getHeaderRowCount()
Return the number of rows on the top of the table to be treated as header rows. |
Insets |
getInsets(int r,
int c)
Return the cell gap space. |
Object |
getObject(int r,
int c)
Return the value at the specified cell. |
BitSet |
getPageBreakLevels()
Get page break levels. |
int |
getRowBorder(int r,
int c)
Return the style for bottom border of the specified cell. |
Color |
getRowBorderColor(int r,
int c)
Return the color for drawing the row border lines. |
int |
getRowCount()
Return the number of rows in the table. |
int |
getRowHeight(int row)
Get the current row heights setting. |
int |
getSummaryLevel(int row)
Get the grouping level of a summary row. |
TableLens |
getTable()
Get the original table of this filter. |
boolean |
hasGrandSummary()
Check if this table contains grand total row. |
void |
invalidate()
Invalidate the table filter forcely, and the table filter will perform filtering calculation to validate itself. |
boolean |
isAddGroupHeader()
Check if group header is to be added to the grouped data. |
boolean |
isAggregateTopN()
Check if only aggregate topN rows. |
boolean |
isDetailRow(int row)
Check if a row is detail row. |
boolean |
isGrandTotalRow(int row)
Check if a row is grand total row. |
boolean |
isGroupHeaderCell(int r,
int c)
Check if a cell is displaying group header. |
boolean |
isGroupHeaderRow(int r)
Check if a row is displaying group header. |
boolean |
isHeaderDetailRow(int row)
Check if a row is header detail row. |
boolean |
isKeepLastEq()
Check whether the user want to display other group with the the same value as the Nth group. |
boolean |
isLineWrap(int r,
int c)
Return the per cell line wrap mode. |
boolean |
isShowGroupColumns()
Check if the group column contents are shown. |
boolean |
isSubTotalHidden()
Check if should hide subtotal for a single row option of this filter. |
boolean |
isSummaryCol(int col)
Check if a column is a summary column. |
boolean |
isSummaryRow(int row)
Check if a row is a summary row. |
boolean |
moreRows(int row)
Check if there are more rows. |
void |
refresh()
Refresh the table. |
void |
setAddGroupHeader(boolean h)
Set whether group headers are added to the table. |
void |
setAggregateTopN(boolean aggTopN)
Set the option if only aggregate topN rows. |
void |
setComparer(int col,
Comparer comp)
Set the comparer for a sorting column. |
void |
setGroupHeaderStyle(int headerS)
Set the group header style. |
void |
setKeepLastEq(boolean flag)
Set to true, if user want to display other group with the the same value as the Nth group. |
void |
setObject(int r,
int c,
Object v)
Set the cell value. |
void |
setPageBreakLevels(BitSet lvlset)
Set page break levels. |
void |
setShowGroupColumns(boolean grp)
Set the show group column contents option. |
void |
setSortByValInfo(int level,
int[] sortcols,
boolean rev)
Set a sort by value info to the TopNFilter instance. |
void |
setSubTotalHidden(boolean subTotalHidden)
Set the hide subtotal for a single row option of this filter. |
void |
setTable(TableLens table)
Set the base table of this filter. |
void |
setTopNInfo(int n,
int sortcol)
Set a topN info to the TopNFilter instance with default group
level 0 and default ascending order. |
void |
setTopNInfo(int n,
int[] sortcols,
boolean asc)
Set a topN info to the TopNFilter instance with default group
level 0. |
void |
setTopNInfo(int level,
int n,
int[] sortcols,
boolean asc,
boolean others)
Set a topN info to the TopNFilter instance. |
| Methods inherited from class inetsoft.report.filter.AbstractGroupedTable |
|---|
clearCache, getAvailableLevels, getColumnIdentifier, getGroupFirstRow, getGroupFirstRow, getGroupFirstRow0, getGroupLastRow, getGroupLastRow, getGroupLastRow0, getHeader2, getMergedGroup, getOriginalPath, getRealGroupColCount, getSpan, isMergedGroup, isMergeGroupCells, setMergedGroup, setMergeGroupCells |
| Methods inherited from class inetsoft.report.lens.AbstractTableLens |
|---|
addChangeListener, clone, containsDrill, containsFormat, findColumnByIdentifier, fireChangeEvent, getBoolean, getByte, getDefaultFormat, getDouble, getFloat, getInt, getLong, getShort, getTrailerColCount, getTrailerRowCount, getXDrillInfo, isNull, isPrimitive, removeChangeListener, setColumnIdentifier, setLeftAlign, setLocal |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface inetsoft.report.TableLens |
|---|
addChangeListener, containsDrill, containsFormat, getDefaultFormat, getXDrillInfo, removeChangeListener |
| Methods inherited from interface inetsoft.uql.XTable |
|---|
getBoolean, getByte, getDouble, getFloat, getInt, getLong, getShort, getTrailerColCount, getTrailerRowCount, isNull, isPrimitive, setColumnIdentifier |
| Field Detail |
|---|
public static final int ALL
| Constructor Detail |
|---|
public TopNFilter(GroupedTable table)
TopNFilter instance.
table - the base table
public TopNFilter(GroupedTable table,
int n,
int sortcol)
setTopNInfo(int, int) method to set topN info
TopNFilter instance.
table - the base tablen - the topNsortcol - the summary cols used to sort the group
public TopNFilter(GroupedTable table,
int n,
int[] sortcols,
boolean asc)
setTopNInfo(int, int[], boolean) method to set
topN info
table - the base tablen - the topNsortcols - the summary cols used to sort the group
public TopNFilter(GroupedTable table,
int n,
int level,
int[] sortcols,
boolean asc)
setTopNInfo(int, int, int[], boolean, boolean)
method to set topN info.
TopNFilter instance.
table - base tablen - the topNlevel - the group levelsortcols - the summary cols used to sort the groupasc - the sort order, true means ascending, and
false means descending| Method Detail |
|---|
public final boolean moreRows(int row)
moreRows in interface XTablemoreRows in class AbstractTableLensrow - row number.
public void setAggregateTopN(boolean aggTopN)
aggTopN - true to aggregate only topN rows.public boolean isAggregateTopN()
public void setSubTotalHidden(boolean subTotalHidden)
subTotalHidden - whether hide subtotal for a single row.public boolean isSubTotalHidden()
public void setTopNInfo(int n,
int sortcol)
TopNFilter instance with default group
level 0 and default ascending order.
n - the topNsortcol - the summary col used to sort the group
public void setTopNInfo(int n,
int[] sortcols,
boolean asc)
TopNFilter instance with default group
level 0.
n - the topNsortcols - the summary cols used to sort the groupasc - the sort order, true means ascending, and
false means descending
public void setTopNInfo(int level,
int n,
int[] sortcols,
boolean asc,
boolean others)
TopNFilter instance.
level - the group leveln - the topNsortcols - the summary cols used to sort the groupasc - the sort order, true means ascending, and
false means descending
public void setSortByValInfo(int level,
int[] sortcols,
boolean rev)
TopNFilter instance.
level - the group levelsortcols - the summary cols used to sort the grouprev - the sort order, true means descending, and
false means ascending
public void setComparer(int col,
Comparer comp)
col - the colcomp - the comparerpublic Comparer getComparer(int col)
col - the col
null if out of rangepublic void setPageBreakLevels(BitSet lvlset)
lvlset - the page break levelspublic BitSet getPageBreakLevels()
getPageBreakLevels in class AbstractGroupedTablepublic int getGroupColCount()
getGroupColCount in interface GroupedTablegetGroupColCount in class AbstractGroupedTablepublic int getGroupColumns(int level)
1 unless multiple columns are combined into
one group.
getGroupColumns in interface GroupedTablegetGroupColumns in class AbstractGroupedTablelevel - the group level
public int getGroupLevel(int r)
getGroupLevel in interface GroupedTablegetGroupLevel in interface RegionTablegetGroupLevel in class AbstractGroupedTabler - the row
0.
Returns -1 if the row is not a header rowpublic int getGroupColLevel(int col)
getGroupColLevel in interface GroupedTablegetGroupColLevel in class AbstractGroupedTablecol - the group col
-1 means not a group colpublic boolean isGroupHeaderRow(int r)
isGroupHeaderRow in interface GroupedTableisGroupHeaderRow in class AbstractGroupedTabler - the row number
true if is displaying group header,
false otherwise
public boolean isGroupHeaderCell(int r,
int c)
isGroupHeaderCell in interface GroupedTableisGroupHeaderCell in interface RegionTableisGroupHeaderCell in class AbstractGroupedTabler - row numberc - column number
true if the cell is a displaying group headerpublic final boolean isGrandTotalRow(int row)
row - the specified row
public boolean isDetailRow(int row)
row - the specified row
public boolean isHeaderDetailRow(int row)
row - the specified row
public boolean isShowGroupColumns()
isShowGroupColumns in interface GroupedTableisShowGroupColumns in class AbstractGroupedTablepublic void setShowGroupColumns(boolean grp)
setShowGroupColumns in interface GroupedTablesetShowGroupColumns in class AbstractGroupedTablegrp - show group column contents.public boolean isAddGroupHeader()
isAddGroupHeader in interface GroupedTableisAddGroupHeader in class AbstractGroupedTablepublic void setAddGroupHeader(boolean h)
setAddGroupHeader in interface GroupedTablesetAddGroupHeader in class AbstractGroupedTablepublic int getGroupHeaderStyle()
getGroupHeaderStyle in interface GroupedTablegetGroupHeaderStyle in class AbstractGroupedTablepublic void setGroupHeaderStyle(int headerS)
setGroupHeaderStyle in interface GroupedTablesetGroupHeaderStyle in class AbstractGroupedTableheaderS - one of GROUP_HEADER_IN_PLACE, GROUP_HEADER_ROWS (default).public boolean isSummaryRow(int row)
isSummaryRow in interface GroupedTableisSummaryRow in interface RegionTableisSummaryRow in class AbstractGroupedTablerow - the row number
true if the row is a summary rowpublic boolean isSummaryCol(int col)
isSummaryCol in interface GroupedTableisSummaryCol in class AbstractGroupedTablecol - the column number
true if the column is a summary columnpublic int getSummaryLevel(int row)
getSummaryLevel in interface GroupedTablegetSummaryLevel in interface RegionTablegetSummaryLevel in class AbstractGroupedTable0. Returns -1 if the row is not a summary rowpublic final boolean hasGrandSummary()
hasGrandSummary in interface GroupedTablehasGrandSummary in class AbstractGroupedTabletrue if grand total row existspublic void invalidate()
invalidate in interface TableFilterpublic Formula getGroupFormula(int col)
getGroupFormula in interface GroupedTablegetGroupFormula in class AbstractGroupedTablecol - column index in the grouped table.
public Formula getGrandFormula(int col)
getGrandFormula in interface GroupedTablegetGrandFormula in class AbstractGroupedTablecol - column index in the grouped table.
public void setKeepLastEq(boolean flag)
flag - booleanpublic boolean isKeepLastEq()
public TableLens getTable()
getTable in interface TableFilterpublic void setTable(TableLens table)
setTable in interface TableFiltertable - the base tablepublic TableDataDescriptor getDescriptor()
getDescriptor in interface TableLensgetDescriptor in interface XTablegetDescriptor in class AbstractTableLenspublic int getBaseRowIndex(int row)
getBaseRowIndex in interface GroupedTablegetBaseRowIndex in interface TableFiltergetBaseRowIndex in class AbstractGroupedTablerow - row index in the filtered table
public int getBaseColIndex(int col)
getBaseColIndex in interface TableFiltercol - column index in the filtered table
public void refresh()
public int getRowCount()
getRowCount in interface XTablepublic int getColCount()
getColCount in interface XTablepublic int getHeaderRowCount()
getHeaderRowCount in interface XTablegetHeaderRowCount in class AbstractTableLenspublic int getHeaderColCount()
getHeaderColCount in interface XTablegetHeaderColCount in class AbstractTableLenspublic int getRowHeight(int row)
getRowHeight in interface TableLensgetRowHeight in class AbstractTableLensrow - the row
public int getColWidth(int col)
getColWidth in interface TableLensgetColWidth in class AbstractTableLenscol - the column
public Color getRowBorderColor(int r,
int c)
getRowBorderColor in interface TableLensgetRowBorderColor in class AbstractTableLensr - row numberc - column number
public Color getColBorderColor(int r,
int c)
getColBorderColor in interface TableLensgetColBorderColor in class AbstractTableLensr - row numberc - column number
public int getRowBorder(int r,
int c)
getRowBorder in interface TableLensgetRowBorder in class AbstractTableLensr - row numberc - column number
public int getColBorder(int r,
int c)
getColBorder in interface TableLensgetColBorder in class AbstractTableLensr - row numberc - column number
public Insets getInsets(int r,
int c)
getInsets in interface TableLensgetInsets in class AbstractTableLensr - row numberc - column number
public int getAlignment(int r,
int c)
getAlignment in interface TableLensgetAlignment in class AbstractTableLensr - row numberc - column number
public Font getFont(int r,
int c)
getFont in interface TableLensgetFont in class AbstractTableLensr - row numberc - column number
public boolean isLineWrap(int r,
int c)
isLineWrap in interface TableLensisLineWrap in class AbstractTableLensr - row numberc - column number
public Color getForeground(int r,
int c)
getForeground in interface TableLensgetForeground in class AbstractTableLensr - row numberc - column number
public Color getBackground(int r,
int c)
getBackground in interface TableLensgetBackground in class AbstractTableLensr - row numberc - column number
public Class getColType(int col)
getColType in interface XTablegetColType in class AbstractTableLenscol - column number.
public Object getObject(int r,
int c)
getObject in interface XTabler - row numberc - column number
public void setObject(int r,
int c,
Object v)
setObject in interface XTablesetObject in class AbstractTableLensr - row number.c - column number.v - cell value.public void dispose()
dispose in interface XTabledispose in class AbstractTableLenspublic void clearPageBreaks()
clearPageBreaks in class AbstractGroupedTablepublic int firstSummaryColumn()
firstSummaryColumn in class AbstractGroupedTablepublic int getGroupLevel0(int r)
getGroupLevel0 in class AbstractGroupedTable
|
Copyright © 1996-2014 InetSoft Technology Corp. All Rights Reserved. | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||