Style Intelligence v12.0

inetsoft.report
Interface TableElement

All Superinterfaces:
Cloneable, ReportElement, Serializable
All Known Subinterfaces:
FormElement

public interface TableElement
extends ReportElement

Table is the most common element on a report. It can be used to present a dataset in a tabular grid. Tables can span across pages, and can be wrapped horizontally if the table is wider than a page. Table presentation attributes are retrieved from table lenses, or through a table style. Built-in table styles are in inetsoft.report.style package.


Field Summary
 
Fields inherited from interface inetsoft.report.ReportElement
AGGREGATE, AUTOSIZE, GROW, LOCAL_QUERY, QUERY, XNODEPATH
 
Method Summary
 void addFormat(Class type, Format format)
          Add a format to a data type.
 void addPresenter(Class type, Presenter presenter)
          Add a presenter to a data type.
 Enumeration getAllHyperlinks()
          Deprecated.  
 ColumnMatching getColumnMatching()
          Get the column matching definition, which contains the target element ID and the column mappings.
 float getColWidth(int col)
          Get the column width in pixels.
 int[] getFixedWidths()
          Get the fixed column widths in pixels.
 Format getFormat(Class type)
          Get the format object registered for this class or one of it's super classes.
 Hyperlink.Ref getHyperlink(int row, int col)
          Get the hyperlink assigned to a cell.
 Hyperlink getHyperlink(String colname)
          Deprecated.  
 int getLayout()
          Get the table layout policy.
 float getMaxColWidth()
          Get the maximum column width.
 int getMultiColumn()
          Check if the table is to be printed as multiple columns.
 Point[] getOnClickRange()
          Get the range of cells the onClick handler is interested in.
 Insets getPadding()
          Get cell padding space.
 Presenter getPresenter(Class type)
          Get the presenter object registered for this class or one of it's super classes.
 inetsoft.report.style.TableStyle getStyle()
          Get the table style.
 TableLens getTable()
          Get the table lens.
 int getTableAdvance()
          Get the advance amount after a table element.
 TableLayout getTableLayout()
          Get the table layout of the table.
 TableLayout getTableLayout(boolean createIfEmpty)
          Get the table layout of the table.
 double getTableWidth()
          Get the table width in inches.
 String getTextID(String colname)
          Get the textID, which is used for i18n support, for each column.
 String[] getTextIDs()
          Get the textIDs, which is used for i18n support.
 boolean isAdhocEnabled()
          Check if adhoc query is enabled on this element.
 boolean isFillPage()
          Check whether to stretch the table to fill the page height.
 boolean isKeepGroupTogether()
          Check if group rows/columns should be kept together.
 boolean isKeepSpanTogether()
          Check if span rows/columns should be kept together for horizontal wrapping.
 boolean isOrphanControl()
          Check the current widow/orphan control setting.
 void removeAllHyperlinks()
          Deprecated.  
 void setAdhocEnabled(boolean enabled)
          Set whether adhoc query is enabled on this element.
 void setColumnMatching(ColumnMatching mapping)
          Set the column matching definition, which contains the target element ID and the column mappings.
 void setFillPage(boolean fill)
          Set the option to stretch the table to fill the page height.
 void setFixedWidths(int[] ws)
          Set the fixed column widths in pixels.
 void setHyperlink(int row, int col, Hyperlink.Ref link)
          Set a hyperlink on a cell.
 void setHyperlink(String colname, Hyperlink link)
          Deprecated.  
 void setKeepGroupTogether(boolean keep)
          Set if group rows/columns should be kept together.
 void setKeepSpanTogether(boolean keep)
          Set if span rows/columns should be kept together for horizontal wrapping.
 void setLayout(int layout)
          Set the table layout policy.
 void setMaxColWidth(float w)
          Set the maximum column width.
 void setMultiColumn(int multiColumn)
          Set whether to print the table as multiple columns.
 void setOnClickRange(Point[] range)
          Set the range of cells the onClick handler is interested in.
 void setOrphanControl(boolean orphan)
          Set the table widow/orphan control option.
 void setPadding(Insets padding)
          Set cell padding space.
 void setStyle(inetsoft.report.style.TableStyle style)
          Set the table style.
 void setTable(TableLens table)
          Set the table lens.
 void setTableAdvance(int tableadv)
          Set the advance amount after a table element.
 void setTableLayout(TableLayout tlayout)
          Set table layout.
 void setTableWidth(double w)
          Set the table width in inches.
 void setTextID(String colname, String textID)
          Set the textID, which is used for i18n support, for each column.
 void setTextIDs(String[] textIDs)
          Set the textIDs, which is used for i18n support.
 
Methods inherited from interface inetsoft.report.ReportElement
clone, getAlignment, getBackground, getCSSClass, getFont, getForeground, getFullName, getID, getIndent, getOnClick, getPreferredSize, getProperty, getPropertyNames, getScript, getSpacing, getTarget, getType, getUserObject, isHideOnPrint, isKeepWithNext, isVisible, setAlignment, setBackground, setContext, setCSSClass, setFont, setForeground, setFullName, setHideOnPrint, setID, setIndent, setKeepWithNext, setOnClick, setProperty, setScript, setSpacing, setTarget, setUserObject, setVisible
 

Method Detail

getPresenter

Presenter getPresenter(Class type)
Get the presenter object registered for this class or one of it's super classes.

Parameters:
type - class to search for.
Returns:
the presenter for this object.

addPresenter

void addPresenter(Class type,
                  Presenter presenter)
Add a presenter to a data type.

Parameters:
type - data type the presenter is for.
presenter - presenter for the data type.

getFormat

Format getFormat(Class type)
Get the format object registered for this class or one of it's super classes.

Parameters:
type - class to search for.
Returns:
the format for this object.

addFormat

void addFormat(Class type,
               Format format)
Add a format to a data type.

Parameters:
type - data type the format is for.
format - format for the data type.

getTableWidth

double getTableWidth()
Get the table width in inches.


setTableWidth

void setTableWidth(double w)
Set the table width in inches.


getFixedWidths

int[] getFixedWidths()
Get the fixed column widths in pixels.


setFixedWidths

void setFixedWidths(int[] ws)
Set the fixed column widths in pixels.


getLayout

int getLayout()
Get the table layout policy.


setLayout

void setLayout(int layout)
Set the table layout policy.


getPadding

Insets getPadding()
Get cell padding space.


setPadding

void setPadding(Insets padding)
Set cell padding space.


getTableAdvance

int getTableAdvance()
Get the advance amount after a table element.


setTableAdvance

void setTableAdvance(int tableadv)
Set the advance amount after a table element.


getMaxColWidth

float getMaxColWidth()
Get the maximum column width.

Returns:
maximum column width or 0 if maximum column width is not set.

setMaxColWidth

void setMaxColWidth(float w)
Set the maximum column width.

Parameters:
w - maximum column width. If the value is 0, the width is not limited.

isKeepSpanTogether

boolean isKeepSpanTogether()
Check if span rows/columns should be kept together for horizontal wrapping.


setKeepSpanTogether

void setKeepSpanTogether(boolean keep)
Set if span rows/columns should be kept together for horizontal wrapping.


isKeepGroupTogether

boolean isKeepGroupTogether()
Check if group rows/columns should be kept together.


setKeepGroupTogether

void setKeepGroupTogether(boolean keep)
Set if group rows/columns should be kept together.


getColumnMatching

ColumnMatching getColumnMatching()
Get the column matching definition, which contains the target element ID and the column mappings.


setColumnMatching

void setColumnMatching(ColumnMatching mapping)
Set the column matching definition, which contains the target element ID and the column mappings. The column widths of this table is copied from the target table.


getTableLayout

TableLayout getTableLayout()
Get the table layout of the table.


getTableLayout

TableLayout getTableLayout(boolean createIfEmpty)
Get the table layout of the table.

Parameters:
createIfEmpty - when layout is null, need to create a new one, default is true.

setTableLayout

void setTableLayout(TableLayout tlayout)
Set table layout.


getMultiColumn

int getMultiColumn()
Check if the table is to be printed as multiple columns.


setMultiColumn

void setMultiColumn(int multiColumn)
Set whether to print the table as multiple columns. If set to a value greater than one, the table is wrapped into multiple page columns as if it's inside a multi-column report.


getTable

TableLens getTable()
Get the table lens.


setTable

void setTable(TableLens table)
Set the table lens.


getColWidth

float getColWidth(int col)
Get the column width in pixels.


setOrphanControl

void setOrphanControl(boolean orphan)
Set the table widow/orphan control option.

Parameters:
orphan - true to eliminate widow/orphan rows.

isOrphanControl

boolean isOrphanControl()
Check the current widow/orphan control setting.

Returns:
widow/orphan control option.

setOnClickRange

void setOnClickRange(Point[] range)
Set the range of cells the onClick handler is interested in. The Point.x specifies the column number, and Point.y specifies the row number. If all row/column should be included, use -1 as the index. Use Integer.MAX_VALUE to specify the last row/column.


getOnClickRange

Point[] getOnClickRange()
Get the range of cells the onClick handler is interested in.


getTextID

String getTextID(String colname)
Get the textID, which is used for i18n support, for each column.


setTextID

void setTextID(String colname,
               String textID)
Set the textID, which is used for i18n support, for each column.


getTextIDs

String[] getTextIDs()
Get the textIDs, which is used for i18n support.


setTextIDs

void setTextIDs(String[] textIDs)
Set the textIDs, which is used for i18n support.


getAllHyperlinks

Enumeration getAllHyperlinks()
Deprecated. 

Get the key enumeration of all defined Hyperlinks.


getHyperlink

Hyperlink getHyperlink(String colname)
Deprecated. 

Get the hyperlink definition for a column.


setHyperlink

void setHyperlink(String colname,
                  Hyperlink link)
Deprecated. 

Set the hyperlink definition for a column.

Parameters:
colname - name of the column to attach hyperlink to.
link - hyperlink definition.

removeAllHyperlinks

void removeAllHyperlinks()
Deprecated. 

Remove all hyperlink definitions.


setHyperlink

void setHyperlink(int row,
                  int col,
                  Hyperlink.Ref link)
Set a hyperlink on a cell. The hyperlink is a hyperlink instance instead of a hyperlink definition. Any parameter must be set in the Hyperlink.Ref.

Parameters:
row - table row index.
col - table column index.
link - hyperlink instance.

getHyperlink

Hyperlink.Ref getHyperlink(int row,
                           int col)
Get the hyperlink assigned to a cell.

Parameters:
row - table row index.
col - table column index.
Returns:
hyperlink instance associated with the cell or null.

isAdhocEnabled

boolean isAdhocEnabled()
Check if adhoc query is enabled on this element.


setAdhocEnabled

void setAdhocEnabled(boolean enabled)
Set whether adhoc query is enabled on this element.


setFillPage

void setFillPage(boolean fill)
Set the option to stretch the table to fill the page height.


isFillPage

boolean isFillPage()
Check whether to stretch the table to fill the page height.


setStyle

void setStyle(inetsoft.report.style.TableStyle style)
Set the table style.


getStyle

inetsoft.report.style.TableStyle getStyle()
Get the table style.


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