| org.netbeans.microedition.lcdui.TableItem
TableItem | public class TableItem extends CustomItem implements TableModelListener(Code) | | An item that visualizes a table from TableModel .
The table can be larger than a screen in both directions - user can use
a cursor to scroll in all directions.
author: breh |
Constructor Summary | |
public | TableItem(Display display, String label) Creates a new instance of TableItem without any model. | public | TableItem(Display display, String label, TableModel model) Creates a new instance of TableItem with a model. | public | TableItem(Display display, String label, TableModel model, ColorSchema colorSchema) Creates a new instance of TableItem with a model.
Parameters: display - non-null display parameter. Parameters: label - label for the item Parameters: model - a TableModel to be visualized by this item Parameters: colorSchema - a color schema to be used. |
TableItem | public TableItem(Display display, String label, TableModel model, ColorSchema colorSchema) throws IllegalArgumentException(Code) | | Creates a new instance of TableItem with a model.
Parameters: display - non-null display parameter. Parameters: label - label for the item Parameters: model - a TableModel to be visualized by this item Parameters: colorSchema - a color schema to be used. If set to null, SystemCOlorSchema will be used throws: java.lang.IllegalArgumentException - if the display parameter is null |
getColorSchema | public ColorSchema getColorSchema()(Code) | | Gets color schema currently in use
|
getHeadersFont | public Font getHeadersFont()(Code) | | Gets font used to paint the column names (headers) of the table
headers font |
getMinContentHeight | protected int getMinContentHeight()(Code) | | implementation of the abstract method
minimal content height |
getMinContentWidth | protected int getMinContentWidth()(Code) | | |
getPrefContentHeight | protected int getPrefContentHeight(int width)(Code) | | implementation of the abstract method
Parameters: width - preferred contnent height |
getPrefContentWidth | protected int getPrefContentWidth(int height)(Code) | | implementation of the abstract method
Parameters: height - preferred content width |
getSelectedCellColumn | public int getSelectedCellColumn()(Code) | | Gets the column position of the cursor in the table.
selected cell column |
getSelectedCellRow | public int getSelectedCellRow()(Code) | | Gets the row position of the cursor in the table.
selected cell row |
getTitle | public String getTitle()(Code) | | Gets title of the table.
title string or null if there is no title defined |
getTitleFont | public Font getTitleFont()(Code) | | Gets font used to paint the table title
title font |
getValuesFont | public Font getValuesFont()(Code) | | Gets font used to paint the table cell values
values font |
isBorders | public boolean isBorders()(Code) | | Should the table use borders
true if the table will be painted with borders. False if it will beborderless. |
paint | protected void paint(Graphics g, int width, int height)(Code) | | implementation of the abstract method
Parameters: g - Parameters: width - Parameters: height - |
setBorders | public void setBorders(boolean showBorders)(Code) | | Sets state whether the table should be visualized with or without borders.
The table is automatically repainted when the state is changed.
Parameters: showBorders - true if the borders should be painted, false otherwise |
setColorSchema | public void setColorSchema(ColorSchema colorSchema)(Code) | | Sets color schema to be used with this component. If set to null
SystemColorSchema will be used
|
setHeadersFont | public void setHeadersFont(Font headersFont)(Code) | | Sets the font to be used to paint title. If null is specified,
the default font (bold static text font) will be used.
When the font changes, the table gets automatically repainted.
Parameters: headersFont - font used for painting column names (headers), might be null |
setTitle | public void setTitle(String tableTitle)(Code) | | Sets title of the table. The difference between title and label
specified in the constructor is, that the title appears in the table (it
is surrounded by the borders). Title can be null if no title should
be shown.
The table is automatically repainted when a new title is set.
Parameters: tableTitle - title for the table. Can be null |
setTitleFont | public void setTitleFont(Font titleFont)(Code) | | Sets the font to be used to paint title. If null is specified,
the default font (bold version of static text font) will be used.
When the font changes, the table gets automatically repainted.
Parameters: titleFont - font to be used for painting table title, might be null. |
setValuesFont | public void setValuesFont(Font valuesFont)(Code) | | Sets the font to be used to paint title. If null is specified,
the default font (static text font) will be used.
When the font changes, the table gets automatically repainted.
Parameters: valuesFont - font used for painting values, might be null |
sizeChanged | protected void sizeChanged(int w, int h)(Code) | | implementation of the abstract method - if the item size has changed, simply repaint the table
Parameters: w - Parameters: h - |
tableModelChanged | public void tableModelChanged(TableModel changedModel)(Code) | | Listener for changes of the model. Just repaints the table when
any change happened to the table model of this table.
Parameters: changedModel - |
traverse | protected boolean traverse(int dir, int viewportWidth, int viewportHeight, int[] visRect_inout)(Code) | | implementation of the abstract method
|
traverseOut | protected void traverseOut()(Code) | | implementation of the abstract method
|
|
|