net.sourceforge.mewt.table
Class Table

java.lang.Object
  extended by javax.microedition.lcdui.Item
      extended by javax.microedition.lcdui.CustomItem
          extended by net.sourceforge.mewt.table.Table
All Implemented Interfaces:
Themeable

public class Table
extends javax.microedition.lcdui.CustomItem
implements Themeable

The Class Table.


Field Summary
 
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
Table(javax.microedition.lcdui.Form parent, java.lang.String[] titles)
          Instantiates a new table.
 
Method Summary
 void addRow(java.lang.String[] row)
          Adds the row.
 void addTableListener(TableListener tl)
          Adds the table listener.
 void applyTheme(Theme t)
          Apply theme.
 void deleteRow(int row)
          Delete row.
 void emptyTable()
          Empty table.
 int getBackground()
          Gets the background.
 int getBorder1()
          Gets the border1.
 int getBorder2()
          Gets the border2.
 int getButtonBgDark()
          Gets the button bg dark.
 int getButtonBgLight()
          Gets the button bg light.
 int getButtonSelDark()
          Gets the button sel dark.
 int getButtonSelLight()
          Gets the button sel light.
 int getColCount()
          Gets the col count.
 java.lang.String getData(int col, int row)
          Gets the data.
 int getForeground()
          Gets the foreground.
 java.lang.String[] getRow(int row)
          Gets the row.
 int getRowCount()
          Gets the row count.
 int getSelectedBackground()
          Gets the selected background.
 int getSelectedColIndex()
          Gets the selected col index.
 int getSelectedForeground()
          Gets the selected foreground.
 int getSelectedRowIndex()
          Gets the selected row index.
 java.lang.String getText()
          Returns the value of the currently selected table cell.
 int getTitleBackground()
          Gets the title background.
 int getTitleForeground()
          Gets the title foreground.
 boolean isRowSelect()
          Checks if is row select.
 void keyPressed(int keyCode)
           
 void notifyLayout()
          Notify layout.
 void removeTableListener(TableListener tl)
          Removes the table listener.
 void setBackground(int i)
          Sets the background.
 void setBorder1(int border1)
          Sets the border1.
 void setBorder2(int border2)
          Sets the border2.
 void setButtonBgDark(int buttonBgDark)
          Sets the button bg dark.
 void setButtonBgLight(int buttonBgLight)
          Sets the button bg light.
 void setButtonSelDark(int buttonSelDark)
          Sets the button sel dark.
 void setButtonSelLight(int buttonSelLight)
          Sets the button sel light.
 void setForeground(int foreground)
          Sets the foreground.
 void setRowSelect(boolean rowSelect)
          Sets the row select.
 void setSelectedBackground(int selectColor)
          Sets the selected background.
 void setSelectedCol(int selectedCol)
          Sets the selected col.
 void setSelectedForeground(int selectColor)
          Sets the selected foreground.
 void setSelectedRow(int selectedRow)
          Sets the selected row.
 void setText(java.lang.String text)
          Sets the text value of the currently selected table cell.
 void setTitleBackground(int titleBackground)
          Sets the title background.
 void setTitleForeground(int titleForeground)
          Sets the title foreground.
 
Methods inherited from class javax.microedition.lcdui.CustomItem
getGameAction
 
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

Table

public Table(javax.microedition.lcdui.Form parent,
             java.lang.String[] titles)
Instantiates a new table.

Parameters:
parent - the parent
titles - the titles
Method Detail

notifyLayout

public void notifyLayout()
Notify layout.


addTableListener

public void addTableListener(TableListener tl)
Adds the table listener.

Parameters:
tl - the tl

removeTableListener

public void removeTableListener(TableListener tl)
Removes the table listener.

Parameters:
tl - the tl

keyPressed

public void keyPressed(int keyCode)
Overrides:
keyPressed in class javax.microedition.lcdui.CustomItem

addRow

public void addRow(java.lang.String[] row)
Adds the row.

Parameters:
row - the row

deleteRow

public void deleteRow(int row)
Delete row.

Parameters:
row - the row

emptyTable

public void emptyTable()
Empty table.


setText

public void setText(java.lang.String text)
Sets the text value of the currently selected table cell.

Parameters:
text - the text

getText

public java.lang.String getText()
Returns the value of the currently selected table cell.

Returns:
the text

isRowSelect

public boolean isRowSelect()
Checks if is row select.

Returns:
true, if is row select

setRowSelect

public void setRowSelect(boolean rowSelect)
Sets the row select.

Parameters:
rowSelect - the new row select

getSelectedColIndex

public int getSelectedColIndex()
Gets the selected col index.

Returns:
the selected col index

setSelectedCol

public void setSelectedCol(int selectedCol)
Sets the selected col.

Parameters:
selectedCol - the new selected col

getSelectedRowIndex

public int getSelectedRowIndex()
Gets the selected row index.

Returns:
the selected row index

setSelectedRow

public void setSelectedRow(int selectedRow)
Sets the selected row.

Parameters:
selectedRow - the new selected row

getData

public java.lang.String getData(int col,
                                int row)
Gets the data.

Parameters:
col - the col
row - the row
Returns:
the data

getRowCount

public int getRowCount()
Gets the row count.

Returns:
the row count

getColCount

public int getColCount()
Gets the col count.

Returns:
the col count

getRow

public java.lang.String[] getRow(int row)
Gets the row.

Parameters:
row - the row
Returns:
the row

setBackground

public void setBackground(int i)
Description copied from interface: Themeable
Sets the background.

Specified by:
setBackground in interface Themeable
Parameters:
i - the new background

getForeground

public int getForeground()
Description copied from interface: Themeable
Gets the foreground.

Specified by:
getForeground in interface Themeable
Returns:
the foreground

setForeground

public void setForeground(int foreground)
Description copied from interface: Themeable
Sets the foreground.

Specified by:
setForeground in interface Themeable
Parameters:
foreground - the new foreground

getBackground

public int getBackground()
Description copied from interface: Themeable
Gets the background.

Specified by:
getBackground in interface Themeable
Returns:
the background

getTitleForeground

public int getTitleForeground()
Description copied from interface: Themeable
Gets the title foreground.

Specified by:
getTitleForeground in interface Themeable
Returns:
the title foreground

setTitleForeground

public void setTitleForeground(int titleForeground)
Sets the title foreground.

Parameters:
titleForeground - the new title foreground

getTitleBackground

public int getTitleBackground()
Description copied from interface: Themeable
Gets the title background.

Specified by:
getTitleBackground in interface Themeable
Returns:
the title background

setTitleBackground

public void setTitleBackground(int titleBackground)
Sets the title background.

Parameters:
titleBackground - the new title background

applyTheme

public void applyTheme(Theme t)
Description copied from interface: Themeable
Apply theme.

Specified by:
applyTheme in interface Themeable
Parameters:
t - the t

getButtonBgLight

public int getButtonBgLight()
Description copied from interface: Themeable
Gets the button bg light.

Specified by:
getButtonBgLight in interface Themeable
Returns:
the button bg light

setButtonBgLight

public void setButtonBgLight(int buttonBgLight)
Sets the button bg light.

Parameters:
buttonBgLight - the new button bg light

getButtonBgDark

public int getButtonBgDark()
Description copied from interface: Themeable
Gets the button bg dark.

Specified by:
getButtonBgDark in interface Themeable
Returns:
the button bg dark

setButtonBgDark

public void setButtonBgDark(int buttonBgDark)
Sets the button bg dark.

Parameters:
buttonBgDark - the new button bg dark

getButtonSelLight

public int getButtonSelLight()
Description copied from interface: Themeable
Gets the button sel light.

Specified by:
getButtonSelLight in interface Themeable
Returns:
the button sel light

setButtonSelLight

public void setButtonSelLight(int buttonSelLight)
Sets the button sel light.

Parameters:
buttonSelLight - the new button sel light

getButtonSelDark

public int getButtonSelDark()
Description copied from interface: Themeable
Gets the button sel dark.

Specified by:
getButtonSelDark in interface Themeable
Returns:
the button sel dark

setButtonSelDark

public void setButtonSelDark(int buttonSelDark)
Sets the button sel dark.

Parameters:
buttonSelDark - the new button sel dark

getBorder1

public int getBorder1()
Description copied from interface: Themeable
Gets the border1.

Specified by:
getBorder1 in interface Themeable
Returns:
the border1

setBorder1

public void setBorder1(int border1)
Description copied from interface: Themeable
Sets the border1.

Specified by:
setBorder1 in interface Themeable
Parameters:
border1 - the new border1

getBorder2

public int getBorder2()
Description copied from interface: Themeable
Gets the border2.

Specified by:
getBorder2 in interface Themeable
Returns:
the border2

setBorder2

public void setBorder2(int border2)
Description copied from interface: Themeable
Sets the border2.

Specified by:
setBorder2 in interface Themeable
Parameters:
border2 - the new border2

getSelectedBackground

public int getSelectedBackground()
Description copied from interface: Themeable
Gets the selected background.

Specified by:
getSelectedBackground in interface Themeable
Returns:
the selected background

getSelectedForeground

public int getSelectedForeground()
Description copied from interface: Themeable
Gets the selected foreground.

Specified by:
getSelectedForeground in interface Themeable
Returns:
the selected foreground

setSelectedBackground

public void setSelectedBackground(int selectColor)
Description copied from interface: Themeable
Sets the selected background.

Specified by:
setSelectedBackground in interface Themeable
Parameters:
selectColor - the new selected background

setSelectedForeground

public void setSelectedForeground(int selectColor)
Description copied from interface: Themeable
Sets the selected foreground.

Specified by:
setSelectedForeground in interface Themeable
Parameters:
selectColor - the new selected foreground