All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class tea.set.TextGridA

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----java.awt.Panel
                           |
                           +----java.applet.Applet
                                   |
                                   +----tea.set.BaseA
                                           |
                                           +----tea.set.TextGridA

public class TextGridA
extends BaseA
TextGridA is an applet wrapper for the TextGrid widget. It provides convenience methods to handle text and a few other common data types. TextGridA also supports importing data from an URL in delimited file format.

Parameters supported by this applet includes:

TextGrid.SCROLLABLE
if true, a Scroller is attached to the grid.
TextGrid.URL
a delimited file used for constructing a text grid. If this parameter is specified, the constructor TextGrid(InputStream, String, boolean) is used to create the widget.
TextGrid.DELIMITER
this parameter is only used if TextGrid.URL is set. It specifies to field delimiter used in the initialization file. If this parameter is not specified, the default delimiter is tab.
TextGrid.ROWS
number of rows in grid.
TextGrid.COLS
number of columns in grid.
TextGrid.CELL[$row,$col]
$row is a number between 0 and TextGrid.ROWS-1. $col is a number between 0 and TextGrid.COLS-1. They specify which cell the applet should be added to. The value of this parameter is an URL for an applet to be added to the specified cell. By default TextGrid initialize every cell to tea.set.TextCell. If the child applet is a Tea Set applet, the applet id of the applet is set to $row.$col. This means to pass parameter specifically to the applet, the $row.$col needs to to prepended to the parameter name. For example, if ImageButtonA is added to row 2 column 5, the parameter for that ImageButtonA should be 1.4.ImageButton.IMAGE. If row/column number is not added to the front of the parameter name, it will be used by all applet looking for the parameter, instead of only for one specific applet. This targetting mechanism is only true for Tea Set applets, unless the applet also inherits from tea.set.BaseA and follow the same conventions as explained in the Programming Guide.
TextGrid.OBJECT[$row,$col]
$row is a number between 0 and TextGrid.ROWS-1. $col is a number between 0 and TextGrid.COLS-1. They specify which cell the object should be added to. The value of this parameter is a text string which is either an encoded or plain text. The format of the string is the same as TextGrid.setObject().
TextGrid.SPAN[$row,$col]
this parameter specifies a spanning cell. A coresponding Grid.CELL[$row,$col] must be supplied for this parameter to be used. The value of the parameter is number of rows and number of columns separated by an 'x', e.g. 2x3
TextGrid.COLOR[$row,$col]
a color value in the same formats supported by BaseA.FOREGROUND parameter. It specifies the background color for the specified cell.
TextGrid.ALIGN[$row,$col]
this parameter specifies the alignment of a cell. A coresponding Grid.CELL[$row,$col] must be supplied for this parameter to be used. The value of the parameter is one of the nine possible alignment flags, or a string containing one or two of H_LEFT, H_CENTER, H_RIGHT, V_TOP, V_CENTER, and V_BOTTOM.
Grid.GAP[$row,$col]
this parameter specifies the gap of a cell. The value of this parameter are four numbers separated by '-'. Each number specifies the top, left, bottom, and right gap space respectively. e.g. 0-2-1-0.
TextGrid.FREEZEROW
The number of rows to freeze from the top of the grid. The frozen rows will not be scrolled with other rows.
TextGrid.FREEZECOL
The number of columns to freeze from the left of the grid. The frozen columns will not be scrolled with other columns.
TextGrid.TEXTWIDTH
comma separated list of column width. The width is the number of character for each column. If the list contains fewer than COLS columns, the rest of the column will have the same width as specified at the last width in the list.
TextGrid.TEXTHEIGHT
comma separated list of row height. The height is the number of text lines per row. If the list contains fewer than ROWS rows, the rest of the row will have the same height as specified at the last height in the list.
Grid.COLWIDTH
comma separated list of column width (proportional) If the list contains fewer than COLS columns, the rest of the column will have the same width as specified at the last width in the list. If this parameter is not specified, the column widths are calculated automatically using the preferred size of cell components. For detail, see Grid.
Grid.ROWHEIGHT
comma separated list of row heights (proportional) If the list contains fewer than ROWS columns, the rest of the row will have the same width as specified at the last height in the list. If this parameter is not specified, the row heights are calculated automatically using the preferred size of cell components. For detail, see Grid.
TextGrid.RULING
'|' separated list of ruling style flags: VERTICAL, HORIZONTAL, or ALL.
TextGrid.RESIZABLE
FALSE to disable user resize. Default is true.
TextGrid.ABSOLUTE
TRUE to switch grid to absolute mode. Default is false.
TextGrid.3D
line style for grid rulings: RAISED, LOWERED, and PLAIN.
TextGrid.ROWSELECTABLE
TRUE to enable row select. The default is to use selector. To disable selector, use TRUE-FALSE as the parameter value.
TextGrid.COLSELECTABLE
TRUE to enable column select. The default is to use selector. To disable selector, use TRUE-FALSE as the parameter value.
TextGrid.REGIONSELECTABLE
TRUE to enable region select.
TextGrid.MULTISELECT
TRUE to enable multiple rows and/or columns to be selected at one time.
TextGrid.COLHEADER
comma separated list of row headers.
TextGrid.ROWHEADER
comma separated list of column headers.
TextGrid.EDITABLE
make the cells editable or display only.

See Also:
TextGrid

Constructor Index

 o TextGridA()

Method Index

 o getWidget()
This method is overriden by actual applet to return the widget corresponding to this applet wrapper.
 o init()
Applet initialization method.
 o start()
Start all applets in this container.
 o stop()
Stop all applets in this container.

Constructors

 o TextGridA
 public TextGridA()

Methods

 o init
 public void init()
Applet initialization method.

Overrides:
init in class Applet
 o start
 public void start()
Start all applets in this container.

Overrides:
start in class Applet
 o stop
 public void stop()
Stop all applets in this container.

Overrides:
stop in class Applet
 o getWidget
 public Component getWidget()
This method is overriden by actual applet to return the widget corresponding to this applet wrapper. User can use this method to access the underlying widget directly.

Returns:
TextGrid widget.
Overrides:
getWidget in class BaseA

All Packages  Class Hierarchy  This Package  Previous  Next  Index