All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class netscape.peas.GridView

java.lang.Object
   |
   +----netscape.application.View
           |
           +----netscape.peas.GridView

public class GridView
extends View
GridView implements a very basic IFC based table control. A very limited set of methods are provided for getting and column information, values and rows of values.


Constructor Index

 o GridView(Target)
Construct a GridView which sends event notifications to the specified Target.

Method Index

 o addRow(Object[])
Add a row to the end of the table using the given values.
 o getField(int)
Given an index for a field, return its text field.
 o getHeight()
Return the cell height
 o getIndex(Object)
Return the index of the given element, adjusted so as to ignore the fact that the column headers are elements.
 o getNumColumns()
Return the number of columns
 o getNumRows()
Return the number of rows.
 o getRowIndex(int)
 o getWidth()
Return the cell width
 o getWidth(int)
 o removeAll()
Remove everything: layout mgr.
 o removeRowAt(int)
Remove a row from the layout and a row of viws from this view.
 o setColumnInfo(int, String[], int[])
Given column information, create a row for the column names
 o setCurrentRow(int)
 o setNumColumns(int)
Set the number of columns.
 o setNumRows(int)
Set the number of rows.
 o setWidth(int, int)
Set the cell width
 o sizeTo()
Ensure that GridView is of appropriate size.

Constructors

 o GridView
 public GridView(Target oTarget)
Construct a GridView which sends event notifications to the specified Target.

Methods

 o getRowIndex
 public int getRowIndex(int iRow)
 o setCurrentRow
 public void setCurrentRow(int iNewCurrentRow)
 o sizeTo
 public void sizeTo()
Ensure that GridView is of appropriate size. Called whenever size is chagned.

 o getIndex
 public int getIndex(Object oElement)
Return the index of the given element, adjusted so as to ignore the fact that the column headers are elements. To get the row/column from this index: row = iIndex / NumRows; col = iIndex % NumRows;

 o getField
 public TextField getField(int iIndex)
Given an index for a field, return its text field. Indexes are zero based and are adjusted to ignore the fact that column headers are in same vector.

 o removeRowAt
 public void removeRowAt(int iRow)
Remove a row from the layout and a row of viws from this view.

 o removeAll
 public void removeAll()
Remove everything: layout mgr. rows, and TextFields (subviews).

 o addRow
 public void addRow(Object aValues[])
Add a row to the end of the table using the given values.

 o setColumnInfo
 public void setColumnInfo(int iNumColumns,
                           String aColumnNames[],
                           int aColumnWidths[])
Given column information, create a row for the column names

 o setNumRows
 public void setNumRows(int iNewValue)
Set the number of rows. This does not include column header row.

 o getNumRows
 public int getNumRows()
Return the number of rows. This does not include column header row.

 o setNumColumns
 public void setNumColumns(int iNewValue)
Set the number of columns.

 o getNumColumns
 public int getNumColumns()
Return the number of columns

 o getHeight
 public int getHeight()
Return the cell height

 o getWidth
 public int getWidth()
Return the cell width

 o getWidth
 public int getWidth(int i)
 o setWidth
 public void setWidth(int ind,
                      int w)
Set the cell width


All Packages  Class Hierarchy  This Package  Previous  Next  Index