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

Variable Index

 o CELL3D
CELL3D specifies a 3D cell style.
 o GRID
GRID specifies a plain grid style.
 o GRID3D
GRID3D specifies a 3D grid style.

Constructor Index

 o Table(int, int, int)
Construct a table widget with row rows, col columns, and w characters in each column.
 o 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.

Method Index

 o getColumn()
Get number of columns in table.
 o getRow()
Get number of rows in table.
 o getText(int, int)
Return the text in cell (r, c).
 o paint(Graphics)
Paint the table.
 o setStyle(int)
Set the table display style.
 o setText(int, int, String)
Set the text in cell (r, c) to string t.

Variables

 o GRID
  public final static int GRID
GRID specifies a plain grid style.
 o GRID3D
  public final static int GRID3D
GRID3D specifies a 3D grid style.
 o CELL3D
  public final static int CELL3D
CELL3D specifies a 3D cell style.

Constructors

 o 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.
 o 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.

Methods

 o setStyle
  public void setStyle(int style)
Set the table display style.
Parameters:
style - table style flag.
 o 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.
 o 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.
 o getRow
  public int getRow()
Get number of rows in table.
Returns:
number of rows.
 o getColumn
  public int getColumn()
Get number of columns in table.
Returns:
number of columns.
 o 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