|
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.lens.AttributeTableLens
public class AttributeTableLens
The AttributeTableLens is a decorator table. It can be used with another table to allow users to change the attributes of the table by calling the attribute setter methods on the AttributeTableLens.
There are four levels of setting in the AttributeTableLens. An attribute can be changed at table level, in which case the attribute is applied to all cells in the table. An attribute can also be set at per row or per column level. The finest level of control allows an attribute being set at per cell level. For each attribute, there are four attribute setter methods corresponding to the four levels described above.
AttributeTableLens is the base class of most other table lens classes. Its methods can be called to change the table attributes.
| Field Summary | |
|---|---|
protected inetsoft.util.SparseIndexedMatrix |
alignmap
|
protected AttributeTableLens |
attritable
|
protected inetsoft.util.SparseIndexedMatrix |
backgroundmap
|
protected inetsoft.util.SparseMatrix |
cache
|
protected boolean |
check
|
protected inetsoft.util.SparseIndexedMatrix |
colborderCmap
|
protected inetsoft.util.SparseIndexedMatrix |
colbordermap
|
protected inetsoft.util.SparseIndexedMatrix |
fontmap
|
protected inetsoft.util.SparseIndexedMatrix |
foregroundmap
|
protected inetsoft.util.SparseIndexedMatrix |
insetsmap
|
protected inetsoft.util.SparseIndexedMatrix |
linkmap
|
protected inetsoft.util.SparseIndexedMatrix |
presentermap
|
protected inetsoft.util.SparseIndexedMatrix |
rowborderCmap
|
protected inetsoft.util.SparseIndexedMatrix |
rowbordermap
|
protected TableLens |
table
|
protected inetsoft.util.SparseIndexedMatrix |
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 |
| Constructor Summary | |
|---|---|
AttributeTableLens()
The setTable() method must be called before this table can be used. |
|
AttributeTableLens(TableLens table)
Create an attribute table with the specified table as the base table. |
|
| Method Summary | |
|---|---|
Object |
clone()
Make a copy of this table. |
void |
cloneAttributes(AttributeTableLens attr)
Make copy of the attributes to a new attribute table lens. |
boolean |
containsLink()
Check if contains hyperlink definitation. |
void |
dispose()
Dispose the table to clear up temporary resources. |
int |
findColumn(String header)
Find the column with the specified header. |
protected Object |
format(int r,
int c,
Object obj)
Format or add presenter to an object. |
int |
getAlignment(int r,
int c)
Return the alignment for the row. |
Color |
getBackground(int r,
int c)
Return the background color for the specified row. |
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. |
Format |
getCellFormat(int row,
int col)
Get the format defined in this table lens. |
Format |
getCellFormat(int row,
int col,
boolean cellOnly)
Get the format defined in this table lens. |
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. |
Object |
getColHeader(int col)
Get column header. |
Class |
getColType(int col)
Get the current column content type. |
String |
getColumnIdentifier(int col)
Get the column identifier of a column. |
int |
getColWidth(int col)
Get the current column width setting. |
Object |
getData(int r,
int c)
Return the data at the specified cell. |
TableDataDescriptor |
getDescriptor()
Get internal table data descriptor which contains table structural infos. |
Font |
getFont(int r,
int c)
Return the per row font. |
Color |
getForeground(int r,
int c)
Return the foreground color for the specified row. |
Format |
getFormat(int col)
Get the format associated with the column. |
Format |
getFormat(int row,
int col)
Get the format for the specified cell. |
Format |
getFormat(int row,
int col,
boolean cellOnly)
Get the format for the specified cell. |
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. |
Hyperlink.Ref |
getHyperlink(int r,
int c)
Get hyperlink of a table cell. |
Insets |
getInsets(int r,
int c)
Return the cell gap space. |
Object |
getObject(int r,
int c)
Return the value at the specified cell. |
Object |
getObject0(int r,
int c)
Return the value at the specified cell. |
Presenter |
getPresenter(int col)
Get the presenter for the specified column. |
Presenter |
getPresenter(int row,
int col)
Get the presenter for the specified cell. |
Presenter |
getPresenter(String header)
Get the presenter for the specified column. |
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. |
Format |
getRowFormat(int row)
Get the format associated with a row. |
int |
getRowHeight(int row)
Get the current row heights setting. |
Dimension |
getSpan(int r,
int c)
Return the spanning setting for the cell. |
TableLens |
getTable()
Get the base table lens. |
int |
getTrailerColCount()
Return the number of columns on the right of the table to be treated as tail columns. |
int |
getTrailerRowCount()
Return the number of rows on the bottom of the table to be treated as tail rows. |
void |
invalidate()
Invalidate the table filter forcely, and the table filter will perform filtering calculation to validate itself. |
boolean |
isColSuppressIfDuplicate(int c)
Return the per col suppress if duplicate. |
boolean |
isColSuppressIfZero(int c)
Return the per col suppress if zero. |
boolean |
isLineWrap(int r,
int c)
Return the per cell line wrap mode. |
boolean |
isSuppressIfDuplicate(int r,
int c)
Return the per cell suppress if duplicate mode. |
boolean |
isSuppressIfZero(int r,
int c)
Return the per cell suppress if zero mode. |
boolean |
moreRows(int row)
Check if there are more rows. |
void |
removeAllSpans()
Remove all span setting. |
void |
setAlignment(int align)
Set the table level cell alignment. |
void |
setAlignment(int r,
int c,
int align)
Set the cell alignment. |
void |
setBackground(int r,
int c,
Color color)
Set the background color for the specified cell. |
void |
setColAlignment(int c,
int align)
Set the col cell alignment. |
void |
setColAutoSize(boolean auto)
If autosize is enabled, the base table column width is ignored. |
void |
setColBackground(int c,
Color color)
Set the background color for the specified col. |
void |
setColBorder(int style)
Set the table level column border. |
void |
setColBorder(int c,
int style)
Set the style of the column border. |
void |
setColBorder(int r,
int c,
int style)
Set the style of the column border. |
void |
setColBorderColor(Color color)
Set the table level column border color. |
void |
setColBorderColor(int c,
Color color)
Set the color for the column border. |
void |
setColBorderColor(int r,
int c,
Color color)
Set the color for the column border. |
void |
setColCount(int cols)
Set the number of columns. |
void |
setColFont(int c,
Font font)
Set the font for the col. |
void |
setColForeground(int c,
Color color)
Set the foreground color for the specified col. |
void |
setColHeader(int col,
Object hdr)
Set the table column header. |
void |
setColInsets(int c,
Insets insets)
Set the cell insets for the col. |
void |
setColLineWrap(int c,
boolean wrap)
Set the line wrap for the col. |
void |
setColSuppressIfDuplicate(int c,
boolean dup)
Set the line wrap for the col. |
void |
setColSuppressIfZero(int c,
boolean zero)
Set the line wrap for the col. |
void |
setColWidth(int col,
int width)
Set the width of the column in pixels. |
void |
setData(int r,
int c,
Object val)
Return the data at the specified cell. |
void |
setFont(Font font)
Set the default font for the table. |
void |
setFont(int r,
int c,
Font font)
Set the font for the cell. |
void |
setForeground(int r,
int c,
Color color)
Set the foreground color for the specified cell. |
void |
setFormat(int col,
Format p)
Set the format for the specified column. |
void |
setFormat(int r,
int c,
Format format)
Set the format for the specified cell. |
void |
setFormat(String header,
Format p)
Set the format for the specified column. |
void |
setHeaderColCount(int headerCol)
Set the number of header columns. |
void |
setHeaderRowCount(int headerRow)
Set the number of header rows. |
void |
setHyperlink(int r,
int c,
Hyperlink.Ref link)
Set the hyperlink for the specified cell. |
void |
setInsets(Insets insets)
Set the table level cell padding. |
void |
setInsets(int r,
int c,
Insets insets)
Set the cell insets for the cell. |
void |
setLineWrap(boolean wrap)
Set the table line wrap setting. |
void |
setLineWrap(int r,
int c,
boolean wrap)
Set the line wrap for the cell. |
void |
setObject(int r,
int c,
Object val)
Set a cell value. |
void |
setPresenter(int r,
int c,
Presenter presenter)
Set the presenter for the specified cell. |
void |
setPresenter(int col,
Presenter p)
Set the presenter for the specified column. |
void |
setPresenter(String header,
Presenter p)
Set the presenter for the specified column. |
void |
setRowAlignment(int r,
int align)
Set the row cell alignment. |
void |
setRowAutoSize(boolean auto)
If autosize is enabled, the base table row height is ignored. |
void |
setRowBackground(int r,
Color color)
Set the background color for the specified row. |
void |
setRowBorder(int style)
Set the table level row border. |
void |
setRowBorder(int r,
int style)
Set the style of the row border. |
void |
setRowBorder(int r,
int c,
int style)
Set the style of the row border. |
void |
setRowBorderColor(Color color)
Set the table level row border color. |
void |
setRowBorderColor(int r,
Color color)
Set the color for the row border. |
void |
setRowBorderColor(int r,
int c,
Color color)
Set the color for the row border at the specified cell. |
void |
setRowCount(int rows)
Set the number of rows. |
void |
setRowFont(int r,
Font font)
Set the font for the row. |
void |
setRowForeground(int r,
Color color)
Set the foreground color for the specified row. |
void |
setRowFormat(int row,
Format p)
Set the format for the specified column. |
void |
setRowHeight(int h)
Set the row height of the table. |
void |
setRowHeight(int r,
int h)
Set the row height of a row in the table. |
void |
setRowInsets(int r,
Insets insets)
Set the cell insets for the row. |
void |
setRowLineWrap(int r,
boolean wrap)
Set the line wrap for the row. |
void |
setRowPresenter(int row,
Presenter p)
Set the presenter for the specified row. |
void |
setSpan(int r,
int c,
Dimension span)
Set the span dimension of a cell. |
void |
setTable(TableLens table)
Set the base table to be used with the attribute table table. |
void |
setTrailerColCount(int tailCol)
Set the number of tail columns. |
void |
setTrailerRowCount(int tailRow)
Set the number of tail rows. |
| 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 |
| Field Detail |
|---|
protected TableLens table
protected AttributeTableLens attritable
protected inetsoft.util.SparseMatrix cache
protected boolean check
protected inetsoft.util.SparseIndexedMatrix colbordermap
protected inetsoft.util.SparseIndexedMatrix rowbordermap
protected inetsoft.util.SparseIndexedMatrix rowborderCmap
protected inetsoft.util.SparseIndexedMatrix colborderCmap
protected inetsoft.util.SparseIndexedMatrix foregroundmap
protected inetsoft.util.SparseIndexedMatrix backgroundmap
protected inetsoft.util.SparseIndexedMatrix alignmap
protected inetsoft.util.SparseIndexedMatrix wrapmap
protected inetsoft.util.SparseIndexedMatrix insetsmap
protected inetsoft.util.SparseIndexedMatrix presentermap
protected inetsoft.util.SparseIndexedMatrix linkmap
protected inetsoft.util.SparseIndexedMatrix fontmap
| Constructor Detail |
|---|
public AttributeTableLens()
public AttributeTableLens(TableLens table)
table - base table.| Method Detail |
|---|
public int getBaseRowIndex(int row)
getBaseRowIndex in interface TableFilterrow - row index in the filtered table.
public int getBaseColIndex(int col)
getBaseColIndex in interface TableFiltercol - column index in the filtered table.
public void setTable(TableLens table)
setTable in interface TableFiltertable - base table.public TableLens getTable()
getTable in interface TableFilterpublic TableDataDescriptor getDescriptor()
getDescriptor in interface TableLensgetDescriptor in interface XTablegetDescriptor in class AbstractTableLenspublic void invalidate()
invalidate in interface TableFilter
public void setColHeader(int col,
Object hdr)
col - column index.hdr - column header value.public Object getColHeader(int col)
col - column index.
public boolean moreRows(int row)
moreRows in interface XTablemoreRows in class AbstractTableLensrow - row number.
public int getRowCount()
getRowCount in interface XTablepublic void setRowCount(int rows)
rows - number of rows.public int getColCount()
getColCount in interface XTablepublic void setColCount(int cols)
cols - number of columns.public Class getColType(int col)
getColType in interface XTablegetColType in class AbstractTableLenscol - column number.
public Object getData(int r,
int c)
r - row number.c - column number.
public void setData(int r,
int c,
Object val)
r - row number.c - column number.val - cell value.
public Object getObject(int r,
int c)
getObject in interface XTabler - row number.c - column number.
public void setObject(int r,
int c,
Object val)
setObject in interface XTablesetObject in class AbstractTableLensr - row index.c - column index.val - cell value.
public Object getObject0(int r,
int c)
r - row number.c - column number.
protected Object format(int r,
int c,
Object obj)
public int getHeaderRowCount()
getHeaderRowCount in interface XTablegetHeaderRowCount in class AbstractTableLenspublic void setHeaderRowCount(int headerRow)
headerRow - number of header rows.public int getHeaderColCount()
getHeaderColCount in interface XTablegetHeaderColCount in class AbstractTableLenspublic void setHeaderColCount(int headerCol)
headerCol - number of header columns.public int getTrailerRowCount()
getTrailerRowCount in interface XTablegetTrailerRowCount in class AbstractTableLenspublic void setTrailerRowCount(int tailRow)
tailRow - number of tail rows.public int getTrailerColCount()
getTrailerColCount in interface XTablegetTrailerColCount in class AbstractTableLenspublic void setTrailerColCount(int tailCol)
tailCol - number of tail columns.public int getRowHeight(int row)
getRowHeight in interface TableLensgetRowHeight in class AbstractTableLenspublic void setRowAutoSize(boolean auto)
auto - true to enable autosize.public void setRowHeight(int h)
h - minimum row height.
public void setRowHeight(int r,
int h)
r - row number.h - minimum row height.public int getColWidth(int col)
getColWidth in interface TableLensgetColWidth in class AbstractTableLenspublic void setColAutoSize(boolean auto)
auto - true to enable autosize.
public void setColWidth(int col,
int width)
col - column index.width - column width.
public Color getRowBorderColor(int r,
int c)
getRowBorderColor in interface TableLensgetRowBorderColor in class AbstractTableLensr - row number.c - column number.
public void setRowBorderColor(Color color)
color - row border color.
public void setRowBorderColor(int r,
Color color)
r - row number.color - border color.
public void setRowBorderColor(int r,
int c,
Color color)
r - row number.c - column number.color - border color.
public Color getColBorderColor(int r,
int c)
getColBorderColor in interface TableLensgetColBorderColor in class AbstractTableLensr - row number.c - column number.
public void setColBorderColor(Color color)
color - column border color.
public void setColBorderColor(int c,
Color color)
c - column number.color - border color.
public void setColBorderColor(int r,
int c,
Color color)
r - row number.c - column number.color - border color.
public int getRowBorder(int r,
int c)
getRowBorder in interface TableLensgetRowBorder in class AbstractTableLensr - row number.c - column number.
public void setRowBorder(int style)
style - row border style.
public void setRowBorder(int r,
int style)
r - row number.style - border style.
public void setRowBorder(int r,
int c,
int style)
r - row number.style - border style.
public int getColBorder(int r,
int c)
getColBorder in interface TableLensgetColBorder in class AbstractTableLensr - row number.c - column number.
public void setColBorder(int style)
style - column border style.
public void setColBorder(int c,
int style)
c - column number.style - border style.
public void setColBorder(int r,
int c,
int style)
r - row number.c - column number.style - border style.
public Insets getInsets(int r,
int c)
getInsets in interface TableLensgetInsets in class AbstractTableLensr - row number.c - col number.
public void setInsets(Insets insets)
insets - cell padding.
public void setInsets(int r,
int c,
Insets insets)
r - row number.c - column number.insets - cell insets.
public void setRowInsets(int r,
Insets insets)
r - row number.insets - cell insets.
public void setColInsets(int c,
Insets insets)
c - col number.insets - cell insets.
public Dimension getSpan(int r,
int c)
getSpan in interface TableLensgetSpan in class AbstractTableLensr - row number.c - column number.
public void setSpan(int r,
int c,
Dimension span)
r - row number.c - column number.span - span dimension.public void removeAllSpans()
public int getAlignment(int r,
int c)
getAlignment in interface TableLensgetAlignment in class AbstractTableLensr - row number.c - col number.
public void setAlignment(int align)
align - alignment.
public void setAlignment(int r,
int c,
int align)
r - row number.c - column number.align - alignment flagn, pass -1 to clear the setting.
public void setRowAlignment(int r,
int align)
r - row number.align - alignment flag, pass -1 to clear the setting.
public void setColAlignment(int c,
int align)
c - col number.align - alignment flag, pass -1 to clear the setting.
public Font getFont(int r,
int c)
getFont in interface TableLensgetFont in class AbstractTableLensr - row number.c - column number.
public void setFont(int r,
int c,
Font font)
r - row number.c - column number.font - row font.public void setFont(Font font)
font - table font.
public void setRowFont(int r,
Font font)
r - row number.font - row font.
public void setColFont(int c,
Font font)
c - col number.font - col font.
public boolean isLineWrap(int r,
int c)
isLineWrap in interface TableLensisLineWrap in class AbstractTableLensr - row number.c - column number.
public void setLineWrap(boolean wrap)
wrap - true to allow lines to wrap.
public void setLineWrap(int r,
int c,
boolean wrap)
r - row number.c - column number.wrap - row wrap.
public void setRowLineWrap(int r,
boolean wrap)
r - row number.wrap - row wrap.
public void setColLineWrap(int c,
boolean wrap)
c - col number.wrap - col wrap.
public void setColSuppressIfZero(int c,
boolean zero)
c - col number.zero - col suppress if zero.public boolean isColSuppressIfZero(int c)
c - column number.
public boolean isSuppressIfZero(int r,
int c)
r - row numberc - column number
public void setColSuppressIfDuplicate(int c,
boolean dup)
c - col number.dup - col suppress if duplicate.public boolean isColSuppressIfDuplicate(int c)
c - column number.
public boolean isSuppressIfDuplicate(int r,
int c)
r - row numberc - column number
public Color getForeground(int r,
int c)
getForeground in interface TableLensgetForeground in class AbstractTableLensr - row number.c - col number.
public void setForeground(int r,
int c,
Color color)
r - row number.c - column number.color - foreground color.
public void setRowForeground(int r,
Color color)
r - row number.color - foreground color.
public void setColForeground(int c,
Color color)
c - col number.color - foreground color.
public Color getBackground(int r,
int c)
getBackground in interface TableLensgetBackground in class AbstractTableLensr - row number.c - col number.
public void setBackground(int r,
int c,
Color color)
r - row number.c - column number.color - background color.
public void setRowBackground(int r,
Color color)
r - row number.color - background color.
public void setColBackground(int c,
Color color)
c - col number.color - background color.
public Presenter getPresenter(int row,
int col)
row - row numbercol - column number.
public Presenter getPresenter(int col)
col - column cell presenter.
public Presenter getPresenter(String header)
header - name of the cell presenter.
public void setPresenter(String header,
Presenter p)
header - column header.p - presenter.
public void setPresenter(int r,
int c,
Presenter presenter)
r - row number.c - column number.presenter - cell presenter.
public void setPresenter(int col,
Presenter p)
col - column number.p - presenter.
public void setRowPresenter(int row,
Presenter p)
row - row number.p - presenter.
public Format getFormat(int row,
int col)
row - row number.col - column number.
public Format getFormat(int row,
int col,
boolean cellOnly)
row - row number.col - column number.
public Format getCellFormat(int row,
int col)
public Format getCellFormat(int row,
int col,
boolean cellOnly)
public Format getFormat(int col)
col - column number.
public Format getRowFormat(int row)
row - row index.
public void setFormat(int r,
int c,
Format format)
r - row number.c - column number.format - cell format.
public void setFormat(String header,
Format p)
header - column header.p - format.
public void setFormat(int col,
Format p)
col - column number.p - format.
public void setRowFormat(int row,
Format p)
row - row number.p - format.public int findColumn(String header)
public void setHyperlink(int r,
int c,
Hyperlink.Ref link)
r - row number.c - column number.link - the specified hyperlink.public boolean containsLink()
public Hyperlink.Ref getHyperlink(int r,
int c)
r - the specified rowc - the specified colpublic Object clone()
clone in class AbstractTableLenspublic void cloneAttributes(AttributeTableLens attr)
public void dispose()
dispose in interface XTabledispose in class AbstractTableLenspublic String getColumnIdentifier(int col)
getColumnIdentifier in interface XTablegetColumnIdentifier in class AbstractTableLenscol - the specified column index.
|
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 | ||||||||