Class tea.set.Table
All Packages Class Hierarchy This Package Previous Next Index
Class tea.set.Table
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Container
|
+----java.awt.Panel
|
+----tea.set.Table
- public class Table
- extends Panel
The Table widget supports a flexible spreadsheet like table interface.
The appearance of a table can be easily configured, such as number
of rows, number of columns, the width of individual columns.
The cells in the table provides full editing capability. The Table
widget supports three different styles of displaying: plain grid(GRID),
3D grid(GRID3D), or 3D cells(CELL3D).
!!! Table widget is obsolete. Please use TextGrid instead. Table
widget may not be kept in future releases.
- See Also:
- TextEdit
-
CELL3D
- CELL3D specifies a 3D cell style.
-
GRID
- GRID specifies a plain grid style.
-
GRID3D
- GRID3D specifies a 3D grid style.
-
Table(int, int, int)
- Construct a table widget with row rows, col columns, and w
characters in each column.
-
Table(int, int, int[])
- Construct a table widget with row rows, col columns, and
character width for each column coresponds to the value
in cwidth.
-
getColumn()
- Get number of columns in table.
-
getRow()
- Get number of rows in table.
-
getText(int, int)
- Return the text in cell (r, c).
-
paint(Graphics)
- Paint the table.
-
setStyle(int)
- Set the table display style.
-
setText(int, int, String)
- Set the text in cell (r, c) to string t.
GRID
public final static int GRID
- GRID specifies a plain grid style.
GRID3D
public final static int GRID3D
- GRID3D specifies a 3D grid style.
CELL3D
public final static int CELL3D
- CELL3D specifies a 3D cell style.
Table
public Table(int row,
int col,
int w)
- Construct a table widget with row rows, col columns, and w
characters in each column.
- Parameters:
- row - number of rows.
- col - number of columns.
- w - column width.
Table
public Table(int row,
int col,
int cwidth[])
- Construct a table widget with row rows, col columns, and
character width for each column coresponds to the value
in cwidth.
- Parameters:
- row - number of rows.
- col - number of columns.
- cwidth - column width array.
setStyle
public void setStyle(int style)
- Set the table display style.
- Parameters:
- style - table style flag.
getText
public String getText(int r,
int c)
- Return the text in cell (r, c).
- Parameters:
- r - row number.
- c - column number.
- Returns:
- cell text.
setText
public void setText(int r,
int c,
String t)
- Set the text in cell (r, c) to string t.
- Parameters:
- r - row number.
- c - column number.
- t - cell text.
getRow
public int getRow()
- Get number of rows in table.
- Returns:
- number of rows.
getColumn
public int getColumn()
- Get number of columns in table.
- Returns:
- number of columns.
paint
public void paint(Graphics g)
- Paint the table.
- Parameters:
- g - Graphics context of this component.
- Overrides:
- paint in class Component
All Packages Class Hierarchy This Package Previous Next Index