|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.microedition.lcdui.Item
javax.microedition.lcdui.CustomItem
org.netbeans.microedition.lcdui.TableItem
public class TableItem
An item that visualizes a table from TableModel.
| Field Summary |
|---|
| Fields inherited from class javax.microedition.lcdui.CustomItem |
|---|
KEY_PRESS, KEY_RELEASE, KEY_REPEAT, NONE, POINTER_DRAG, POINTER_PRESS, POINTER_RELEASE, TRAVERSE_HORIZONTAL, TRAVERSE_VERTICAL |
| Fields inherited from class javax.microedition.lcdui.Item |
|---|
BUTTON, HYPERLINK, LAYOUT_2, LAYOUT_BOTTOM, LAYOUT_CENTER, LAYOUT_DEFAULT, LAYOUT_EXPAND, LAYOUT_LEFT, LAYOUT_NEWLINE_AFTER, LAYOUT_NEWLINE_BEFORE, LAYOUT_RIGHT, LAYOUT_SHRINK, LAYOUT_TOP, LAYOUT_VCENTER, LAYOUT_VEXPAND, LAYOUT_VSHRINK, PLAIN |
| Constructor Summary | |
|---|---|
TableItem(javax.microedition.lcdui.Display display,
java.lang.String label)
Creates a new instance of TableItem without any model. |
|
TableItem(javax.microedition.lcdui.Display display,
java.lang.String label,
TableModel model)
Creates a new instance of TableItem with a model. |
|
TableItem(javax.microedition.lcdui.Display display,
java.lang.String label,
TableModel model,
ColorSchema colorSchema)
Creates a new instance of TableItem with a model. |
|
| Method Summary | |
|---|---|
ColorSchema |
getColorSchema()
Gets color schema currently in use |
javax.microedition.lcdui.Font |
getHeadersFont()
Gets font used to paint the column names (headers) of the table |
protected int |
getMinContentHeight()
implementation of the abstract method |
protected int |
getMinContentWidth()
|
protected int |
getPrefContentHeight(int width)
implementation of the abstract method |
protected int |
getPrefContentWidth(int height)
implementation of the abstract method |
int |
getSelectedCellColumn()
Gets the column position of the cursor in the table. |
int |
getSelectedCellRow()
Gets the row position of the cursor in the table. |
java.lang.String |
getTitle()
Gets title of the table. |
javax.microedition.lcdui.Font |
getTitleFont()
Gets font used to paint the table title |
javax.microedition.lcdui.Font |
getValuesFont()
Gets font used to paint the table cell values |
boolean |
isBorders()
Should the table use borders |
protected void |
paint(javax.microedition.lcdui.Graphics g,
int width,
int height)
implementation of the abstract method |
void |
setBorders(boolean showBorders)
Sets state whether the table should be visualized with or without borders. |
void |
setColorSchema(ColorSchema colorSchema)
Sets color schema to be used with this component. |
void |
setHeadersFont(javax.microedition.lcdui.Font headersFont)
Sets the font to be used to paint title. |
void |
setModel(TableModel model)
Sets a new model to the table. |
void |
setTitle(java.lang.String tableTitle)
Sets title of the table. |
void |
setTitleFont(javax.microedition.lcdui.Font titleFont)
Sets the font to be used to paint title. |
void |
setValuesFont(javax.microedition.lcdui.Font valuesFont)
Sets the font to be used to paint title. |
protected void |
sizeChanged(int w,
int h)
implementation of the abstract method - if the item size has changed, simply repaint the table |
void |
tableModelChanged(TableModel changedModel)
Listener for changes of the model. |
protected boolean |
traverse(int dir,
int viewportWidth,
int viewportHeight,
int[] visRect_inout)
implementation of the abstract method |
protected void |
traverseOut()
implementation of the abstract method |
| Methods inherited from class javax.microedition.lcdui.CustomItem |
|---|
getGameAction, getInteractionModes, hideNotify, invalidate, keyPressed, keyReleased, keyRepeated, pointerDragged, pointerPressed, pointerReleased, repaint, repaint, showNotify |
| Methods inherited from class javax.microedition.lcdui.Item |
|---|
addCommand, getLabel, getLayout, getMinimumHeight, getMinimumWidth, getPreferredHeight, getPreferredWidth, notifyStateChanged, removeCommand, setDefaultCommand, setItemCommandListener, setLabel, setLayout, setPreferredSize |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TableItem(javax.microedition.lcdui.Display display,
java.lang.String label)
throws java.lang.IllegalArgumentException
TableItem without any model.
display - non-null display parameter.label - label for the item
java.lang.IllegalArgumentException - if the display parameter is null
public TableItem(javax.microedition.lcdui.Display display,
java.lang.String label,
TableModel model)
throws java.lang.IllegalArgumentException
TableItem with a model.
display - non-null display parameter.label - label for the itemmodel - a TableModel to be visualized by this item
java.lang.IllegalArgumentException - if the display parameter is null
public TableItem(javax.microedition.lcdui.Display display,
java.lang.String label,
TableModel model,
ColorSchema colorSchema)
throws java.lang.IllegalArgumentException
TableItem with a model.
display - non-null display parameter.label - label for the itemmodel - a TableModel to be visualized by this itemcolorSchema - a color schema to be used. If set to null, SystemCOlorSchema will be used
java.lang.IllegalArgumentException - if the display parameter is null| Method Detail |
|---|
public void setColorSchema(ColorSchema colorSchema)
public ColorSchema getColorSchema()
public java.lang.String getTitle()
public void setTitle(java.lang.String tableTitle)
tableTitle - title for the table. Can be nullpublic boolean isBorders()
public void setBorders(boolean showBorders)
showBorders - true if the borders should be painted, false otherwise
public void setModel(TableModel model)
throws java.lang.IllegalArgumentException
model - a new model to be visualized - cannot be null
java.lang.IllegalArgumentException - if the model parameter is nullpublic javax.microedition.lcdui.Font getTitleFont()
public void setTitleFont(javax.microedition.lcdui.Font titleFont)
titleFont - font to be used for painting table title, might be null.public javax.microedition.lcdui.Font getValuesFont()
public void setValuesFont(javax.microedition.lcdui.Font valuesFont)
valuesFont - font used for painting values, might be nullpublic javax.microedition.lcdui.Font getHeadersFont()
public void setHeadersFont(javax.microedition.lcdui.Font headersFont)
headersFont - font used for painting column names (headers), might be nullpublic int getSelectedCellRow()
public int getSelectedCellColumn()
protected int getMinContentHeight()
getMinContentHeight in class javax.microedition.lcdui.CustomItemprotected int getMinContentWidth()
getMinContentWidth in class javax.microedition.lcdui.CustomItemprotected int getPrefContentHeight(int width)
getPrefContentHeight in class javax.microedition.lcdui.CustomItemwidth -
protected int getPrefContentWidth(int height)
getPrefContentWidth in class javax.microedition.lcdui.CustomItemheight -
protected void paint(javax.microedition.lcdui.Graphics g,
int width,
int height)
paint in class javax.microedition.lcdui.CustomItemg - width - height -
protected void sizeChanged(int w,
int h)
sizeChanged in class javax.microedition.lcdui.CustomItemw - h -
protected boolean traverse(int dir,
int viewportWidth,
int viewportHeight,
int[] visRect_inout)
traverse in class javax.microedition.lcdui.CustomItemprotected void traverseOut()
traverseOut in class javax.microedition.lcdui.CustomItempublic void tableModelChanged(TableModel changedModel)
tableModelChanged in interface TableModelListenerchangedModel -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||