Style Intelligence v12.0

inetsoft.report.lens
Class DefaultTableLens

java.lang.Object
  extended by inetsoft.report.lens.AbstractTableLens
      extended by inetsoft.report.lens.AttributeTableLens
          extended by inetsoft.report.lens.DefaultTableLens
All Implemented Interfaces:
StyleConstants, TableFilter, TableLens, XConstants, XTable, Serializable, Cloneable
Direct Known Subclasses:
CalcTableLens

public class DefaultTableLens
extends AttributeTableLens

The DefaultTableLens class provides a default implementation of the TableLens interface. It allows users to store the values of the table as well as the attributes in the object. Since table data is normally retrieved from other sources, it is usually more appropriate to use one of the built-in table lens or creating an application specific table lens to map a data result to a table. Using a DefaultTableLens to created a table will create a copy of the original data.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class inetsoft.report.lens.AttributeTableLens
alignmap, attritable, backgroundmap, cache, check, colborderCmap, colbordermap, fontmap, foregroundmap, insetsmap, linkmap, presentermap, rowborderCmap, rowbordermap, table, wrapmap
 
Fields inherited from class inetsoft.report.lens.AbstractTableLens
descriptor, isLeftAlign
 
Fields inherited from interface inetsoft.report.TableLens
BREAK_BORDER, NULL
 
Fields inherited from interface inetsoft.uql.XTable
EOT
 
Fields inherited from interface inetsoft.report.StyleConstants
ARROW_LINE_1, ARROW_LINE_2, ARROW_LINE_3, BACKGROUND_CENTER, BACKGROUND_TILED, BOX_RECTANGLE, BOX_ROUNDED_RECTANGLE, CENTER, CHART_3D_BAR, CHART_3D_BAR_3D, CHART_3D_PIE, CHART_3D_STACK_BAR, CHART_AREA, CHART_BAR, CHART_BUBBLE, CHART_CANDLE, CHART_CURVE, CHART_FILL_RADAR, CHART_GANTT, CHART_INV_BAR, CHART_INV_CURVE, CHART_INV_LINE, CHART_INV_POINT, CHART_INV_STACK_BAR, CHART_LINE, CHART_MAX_USER, CHART_PARETO, CHART_PIE, CHART_PIE_EXPLODED_ALL, CHART_PIE_EXPLODED_FIRST, CHART_PIE_EXPLODED_NONE, CHART_POINT, CHART_RADAR, CHART_RIBBON, CHART_SCATTER, CHART_SPEEDOMETER, CHART_STACK_AREA, CHART_STACK_BAR, CHART_STICK, CHART_STOCK, CHART_SURFACE, CHART_USER, CHART_VOLUME, CHART_WATERFALL, CHART_XY_LINE, CIRCLE, CROSS, CURRENCY, DASH_LINE, DASH_MASK, DEFAULT_PAGE_SIZE, DIAMOND, DOT_LINE, DOUBLE_3D_LOWERED, DOUBLE_3D_RAISED, DOUBLE_LINE, DOUBLE_MASK, FILL, FILLED_CIRCLE, FILLED_DIAMOND, FILLED_SQUARE, FILLED_TRIANGLE, FRACTION_WIDTH_MASK, H_ALIGN_MASK, H_CENTER, H_CURRENCY, H_LEFT, H_LINE, H_RIGHT, LANDSCAPE, LARGE_DASH, LEFT, LINECAP_BUTT, LINECAP_ROUND, LINECAP_SQUARE, LINEJOIN_BEVEL, LINEJOIN_MITER, LINEJOIN_ROUND, LOWERED_3D, LOWERED_MASK, LT_ANGLE, MEDIUM_DASH, MEDIUM_LINE, NIL, NO_BORDER, NONE, PAPER_10X11, PAPER_10X14, PAPER_11X17, PAPER_15X11, PAPER_9X11, PAPER_A_PLUS, PAPER_A2, PAPER_A3, PAPER_A3_EXTRA, PAPER_A3_EXTRA_TRANSVERSE, PAPER_A3_TRANSVERSE, PAPER_A4, PAPER_A4_EXTRA, PAPER_A4_PLUS, PAPER_A4_TRANSVERSE, PAPER_A4SMALL, PAPER_A5, PAPER_A5_EXTRA, PAPER_A5_TRANSVERSE, PAPER_B_PLUS, PAPER_B4, PAPER_B5, PAPER_B5_EXTRA, PAPER_B5_TRANSVERSE, PAPER_CSHEET, PAPER_DSHEET, PAPER_ENV_10, PAPER_ENV_11, PAPER_ENV_12, PAPER_ENV_14, PAPER_ENV_9, PAPER_ENV_B4, PAPER_ENV_B5, PAPER_ENV_B6, PAPER_ENV_C3, PAPER_ENV_C4, PAPER_ENV_C5, PAPER_ENV_C6, PAPER_ENV_C65, PAPER_ENV_DL, PAPER_ENV_INVITE, PAPER_ENV_ITALY, PAPER_ENV_MONARCH, PAPER_ENV_PERSONAL, PAPER_ESHEET, PAPER_EXECUTIVE, PAPER_FANFOLD_LGL_GERMAN, PAPER_FANFOLD_STD_GERMAN, PAPER_FANFOLD_US, PAPER_FOLIO, PAPER_ISO_B4, PAPER_JAPANESE_POSTCARD, PAPER_LEDGER, PAPER_LEGAL, PAPER_LEGAL_EXTRA, PAPER_LETTER, PAPER_LETTER_EXTRA, PAPER_LETTER_EXTRA_TRANSVERSE, PAPER_LETTER_PLUS, PAPER_LETTER_TRANSVERSE, PAPER_LETTERSMALL, PAPER_NOTE, PAPER_QUARTO, PAPER_STATEMENT, PAPER_TABLOID, PAPER_TABLOID_EXTRA, PATTERN_0, PATTERN_1, PATTERN_10, PATTERN_11, PATTERN_12, PATTERN_13, PATTERN_14, PATTERN_15, PATTERN_16, PATTERN_17, PATTERN_18, PATTERN_19, PATTERN_2, PATTERN_3, PATTERN_4, PATTERN_5, PATTERN_6, PATTERN_7, PATTERN_8, PATTERN_9, PATTERN_NONE, PORTRAIT, RAISED_3D, RAISED_MASK, REMAINDER, RIGHT, RIGHT_ANGLE, SOLID_MASK, SQUARE, STAR, THICK_LINE, THIN_LINE, THIN_THIN_LINE, TRAY_AUTO, TRAY_CASSETTE, TRAY_ENVELOPE, TRAY_ENVMANUAL, TRAY_FORMSOURCE, TRAY_LARGECAPACITY, TRAY_LARGEFMT, TRAY_LOWER, TRAY_MANUAL, TRAY_MIDDLE, TRAY_ONLYONE, TRAY_SMALLFMT, TRAY_TRACTOR, TRAY_UPPER, TRIANGLE, ULTRA_THIN_LINE, V_ALIGN_MASK, V_ANGLE, V_BASELINE, V_BOTTOM, V_CENTER, V_LINE, V_TOP, WIDTH_MASK, X
 
Fields inherited from interface inetsoft.uql.XConstants
AM_PM_DATE_GROUP, AM_PM_OF_DAY_DATE_GROUP, AVERAGE_FORMULA, CALC_FORMULA, COLUMN, CONCAT_FORMULA, CONDITION_EMPTY_STRING, CONDITION_NULL_STRING, CONDITION_NULL_VALUE, CONDITION_REAL_NULL, CORRELATION_FORMULA, COUNT_FORMULA, COVARIANCE_FORMULA, CURRENCY_FORMAT, CURRENT_REP_CHANGED, CURRENT_REP_WILL_CHANGE, DATE_FORMAT, DAY_DATE_GROUP, DAY_OF_MONTH_DATE_GROUP, DAY_OF_WEEK_DATE_GROUP, DAY_OF_YEAR_DATE_GROUP, DECIMAL_FORMAT, DISTINCTCOUNT_FORMULA, FIRST_FORMULA, FULL_JOIN, GREATER_EQUAL_JOIN, GREATER_JOIN, GROUP_OTHERS, HOUR_DATE_GROUP, HOUR_OF_DAY_DATE_GROUP, INNER_JOIN, JOIN, LAST_FORMULA, LEAVE_OTHERS, LEFT_JOIN, LESS_EQUAL_JOIN, LESS_JOIN, MAX_FORMULA, MEDIAN_FORMULA, MESSAGE_FORMAT, MILLISECOND_DATE_GROUP, MIN_FORMULA, MINUTE_DATE_GROUP, MODE_FORMULA, MONTH_DATE_GROUP, MONTH_OF_YEAR_DATE_GROUP, NONE_DATE_GROUP, NONE_FORMULA, NOT_EQUAL_JOIN, NTHLARGEST_FORMULA, NTHMOSTFREQUENT_FORMULA, NTHSMALLEST_FORMULA, PARAM_PREFIX, PART_DATE_GROUP, PERCENT_FORMAT, PERCENTAGE_BY_COL, PERCENTAGE_BY_ROW, PERCENTAGE_NONE, PERCENTAGE_OF_COL_GRANDTOTAL, PERCENTAGE_OF_COL_GROUP, PERCENTAGE_OF_GRANDTOTAL, PERCENTAGE_OF_GROUP, PERCENTAGE_OF_ROW_GRANDTOTAL, PERCENTAGE_OF_ROW_GROUP, POPULATIONSTANDARDDEVIATION_FORMULA, POPULATIONVARIANCE_FORMULA, PRODUCT_FORMULA, PTHPERCENTILE_FORMULA, QUARTER_DATE_GROUP, QUARTER_OF_YEAR_DATE_GROUP, RIGHT_JOIN, SECOND_DATE_GROUP, SET_FORMULA, SORT_ASC, SORT_DESC, SORT_NONE, SORT_ORIGINAL, SORT_SPECIFIC, SORT_VALUE_ASC, SORT_VALUE_DESC, STANDARDDEVIATION_FORMULA, SUB_QUERY_PARAM, SUM_FORMULA, SUMSQ_FORMULA, SUMWT_FORMULA, VARIANCE_FORMULA, WEEK_DATE_GROUP, WEEK_OF_MONTH_DATE_GROUP, WEEK_OF_YEAR_DATE_GROUP, WEIGHTEDAVERAGE_FORMULA, YEAR_DATE_GROUP
 
Constructor Summary
DefaultTableLens()
          Create an empty table.
DefaultTableLens(int rows, int cols)
          Create a table width specified number of rows and columns.
DefaultTableLens(Object[][] data)
          Create a table with initial data.
DefaultTableLens(TableLens lens)
          Create a copy of a table lens.
DefaultTableLens(TableLens lens, boolean dataonly)
          Create a copy of a table lens.
 
Method Summary
 void addColumn()
          Add a column to the end of the table.
 void addRow()
          Add a row to the end of the table.
 Object clone()
          Make a copy of this table.
protected  Object cloneObject(Object obj)
          Perform object level post clone operation.
 TableDataDescriptor getDescriptor()
          Get internal table data descriptor which contains table structural infos.
 Dimension getSpan(int r, int c)
          Return the spanning setting for the cell.
 void insertColumn(int col)
          Insert a new column to the left of the specified column.
 void insertColumn(int col, int n)
          Insert a new column to the left of the specified column.
 void insertRow(int row)
          Insert a new row above the specified row.
 void insertRow(int row, int n)
          Insert a new row above the specified row.
 void invalidate()
          Invalidate the table filter forcely, and the table filter will perform filtering calculation to validate itself.
 void removeColumn(int col)
          Remove a column at the specified location.
 void removeColumn(int col, int n)
          Remove a column at the specified location.
 void removeRow(int row)
          Remove the specified row.
 void removeRow(int row, int n)
          Remove the specified row.
 void setColCount(int cols)
          Set the number of columns.
 void setData(Object[][] data)
          Set the data in this table.
 void setDimension(int rows, int cols)
          Set the number of rows and columns.
 void setHeaderColCount(int ncol)
          Set the number of header columns.
 void setHeaderRowCount(int nrow)
          Set the number of header rows.
 void setObject(int r, int c, Object v)
          Set the cell value.
 void setRowCount(int rows)
          Set the number of rows.
 void setTable(TableLens table)
          Set the base table to be used with the attribute table table.
 void setTrailerColCount(int ncol)
          Set the number of tail columns.
 void setTrailerRowCount(int nrow)
          Set the number of tail rows.
 void setXMetaInfo(int row, int col, XMetaInfo minfo)
          Set table meta info.
 
Methods inherited from class inetsoft.report.lens.AttributeTableLens
cloneAttributes, containsLink, dispose, findColumn, format, getAlignment, getBackground, getBaseColIndex, getBaseRowIndex, getCellFormat, getCellFormat, getColBorder, getColBorderColor, getColCount, getColHeader, getColType, getColumnIdentifier, getColWidth, getData, getFont, getForeground, getFormat, getFormat, getFormat, getHeaderColCount, getHeaderRowCount, getHyperlink, getInsets, getObject, getObject0, getPresenter, getPresenter, getPresenter, getRowBorder, getRowBorderColor, getRowCount, getRowFormat, getRowHeight, getTable, getTrailerColCount, getTrailerRowCount, isColSuppressIfDuplicate, isColSuppressIfZero, isLineWrap, isSuppressIfDuplicate, isSuppressIfZero, moreRows, removeAllSpans, setAlignment, setAlignment, setBackground, setColAlignment, setColAutoSize, setColBackground, setColBorder, setColBorder, setColBorder, setColBorderColor, setColBorderColor, setColBorderColor, setColFont, setColForeground, setColHeader, setColInsets, setColLineWrap, setColSuppressIfDuplicate, setColSuppressIfZero, setColWidth, setData, setFont, setFont, setForeground, setFormat, setFormat, setFormat, setHyperlink, setInsets, setInsets, setLineWrap, setLineWrap, setPresenter, setPresenter, setPresenter, setRowAlignment, setRowAutoSize, setRowBackground, setRowBorder, setRowBorder, setRowBorder, setRowBorderColor, setRowBorderColor, setRowBorderColor, setRowFont, setRowForeground, setRowFormat, setRowHeight, setRowHeight, setRowInsets, setRowLineWrap, setRowPresenter, setSpan
 
Methods inherited from class inetsoft.report.lens.AbstractTableLens
addChangeListener, containsDrill, containsFormat, findColumnByIdentifier, fireChangeEvent, getBoolean, getByte, getDefaultFormat, getDouble, getFloat, getInt, getLong, getShort, 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, isNull, isPrimitive, setColumnIdentifier
 

Constructor Detail

DefaultTableLens

public DefaultTableLens()
Create an empty table.


DefaultTableLens

public DefaultTableLens(int rows,
                        int cols)
Create a table width specified number of rows and columns.

Parameters:
rows - number of rows.
cols - number of columns.

DefaultTableLens

public DefaultTableLens(TableLens lens)
Create a copy of a table lens.


DefaultTableLens

public DefaultTableLens(TableLens lens,
                        boolean dataonly)
Create a copy of a table lens.

Parameters:
dataonly - true if only copy the data from table lens.

DefaultTableLens

public DefaultTableLens(Object[][] data)
Create a table with initial data. The dimension of the table is derived from the data array dimensions.

Parameters:
data - table data.
Method Detail

setTable

public void setTable(TableLens table)
Set the base table to be used with the attribute table table.

Specified by:
setTable in interface TableFilter
Overrides:
setTable in class AttributeTableLens
Parameters:
table - base table.

setDimension

public void setDimension(int rows,
                         int cols)
Set the number of rows and columns.

Parameters:
rows - number of rows.
cols - number of columns.

setRowCount

public void setRowCount(int rows)
Set the number of rows.

Overrides:
setRowCount in class AttributeTableLens
Parameters:
rows - number of rows.

setColCount

public void setColCount(int cols)
Set the number of columns.

Overrides:
setColCount in class AttributeTableLens
Parameters:
cols - number of columns.

setHeaderRowCount

public void setHeaderRowCount(int nrow)
Set the number of header rows.

Overrides:
setHeaderRowCount in class AttributeTableLens
Parameters:
nrow - number of header.

setHeaderColCount

public void setHeaderColCount(int ncol)
Set the number of header columns.

Overrides:
setHeaderColCount in class AttributeTableLens
Parameters:
ncol - number of header.

setTrailerRowCount

public void setTrailerRowCount(int nrow)
Set the number of tail rows.

Overrides:
setTrailerRowCount in class AttributeTableLens
Parameters:
nrow - number of tail.

setTrailerColCount

public void setTrailerColCount(int ncol)
Set the number of tail columns.

Overrides:
setTrailerColCount in class AttributeTableLens
Parameters:
ncol - number of tail.

setObject

public void setObject(int r,
                      int c,
                      Object v)
Set the cell value.

Specified by:
setObject in interface XTable
Overrides:
setObject in class AttributeTableLens
Parameters:
r - row number.
c - column number.
v - cell value.

setData

public void setData(Object[][] data)
Set the data in this table. The number of rows and columns are derived from the data matrix.

Parameters:
data - table data.

addRow

public void addRow()
Add a row to the end of the table.


insertRow

public void insertRow(int row)
Insert a new row above the specified row.


insertRow

public void insertRow(int row,
                      int n)
Insert a new row above the specified row.

Parameters:
row - row index to insert to.
n - number of rows to insert.

removeRow

public void removeRow(int row)
Remove the specified row.


removeRow

public void removeRow(int row,
                      int n)
Remove the specified row.


addColumn

public void addColumn()
Add a column to the end of the table.


insertColumn

public void insertColumn(int col)
Insert a new column to the left of the specified column.


insertColumn

public void insertColumn(int col,
                         int n)
Insert a new column to the left of the specified column.

Parameters:
col - column index to insert to.
n - number of columns to insert.

removeColumn

public void removeColumn(int col)
Remove a column at the specified location.


removeColumn

public void removeColumn(int col,
                         int n)
Remove a column at the specified location.


getSpan

public Dimension getSpan(int r,
                         int c)
Return the spanning setting for the cell. If the specified cell is not a spanning cell, it returns null. Otherwise it returns a Dimension object with Dimension.width equals to the number of columns and Dimension.height equals to the number of rows of the spanning cell.

Specified by:
getSpan in interface TableLens
Overrides:
getSpan in class AttributeTableLens
Parameters:
r - row number.
c - column number.
Returns:
span cell dimension.

clone

public Object clone()
Description copied from class: AttributeTableLens
Make a copy of this table. The table data is shared and the attributes are not copied. This only works to make a copy of the data and share the data to avoid keeping data in two places. If any attributes are changed, they are lost and need to be applied on the new copy.

Overrides:
clone in class AttributeTableLens
Returns:
the cloned AbstractTableLens if successful, null otherwise

setXMetaInfo

public void setXMetaInfo(int row,
                         int col,
                         XMetaInfo minfo)
Set table meta info.

Parameters:
row - row number.
col - column number.

invalidate

public void invalidate()
Invalidate the table filter forcely, and the table filter will perform filtering calculation to validate itself.

Specified by:
invalidate in interface TableFilter
Overrides:
invalidate in class AttributeTableLens

getDescriptor

public TableDataDescriptor getDescriptor()
Get internal table data descriptor which contains table structural infos.

Specified by:
getDescriptor in interface TableLens
Specified by:
getDescriptor in interface XTable
Overrides:
getDescriptor in class AttributeTableLens
Returns:
table data descriptor.

cloneObject

protected Object cloneObject(Object obj)
Perform object level post clone operation.


Copyright © 1996-2014 InetSoft Technology Corp. All Rights Reserved.