    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.

##

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

##

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

##

GridView

     public GridView(Target oTarget)

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

##

getRowIndex

     public int getRowIndex(int iRow)

setCurrentRow

     public void setCurrentRow(int iNewCurrentRow)

sizeTo

     public void sizeTo()

  Ensure that GridView is of appropriate size. Called whenever size is chagned.

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;

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.

removeRowAt

     public void removeRowAt(int iRow)

  Remove a row from the layout and a row of viws from this view.

removeAll

     public void removeAll()

  Remove everything: layout mgr. rows, and TextFields (subviews).

addRow

     public void addRow(Object aValues[])

  Add a row to the end of the table using the given values.

setColumnInfo

     public void setColumnInfo(int iNumColumns,
                               String aColumnNames[],
                               int aColumnWidths[])

  Given column information, create a row for the column names

setNumRows

     public void setNumRows(int iNewValue)

  Set the number of rows. This does not include column header row.

getNumRows

     public int getNumRows()

  Return the number of rows. This does not include column header row.

setNumColumns

     public void setNumColumns(int iNewValue)

  Set the number of columns.

getNumColumns

     public int getNumColumns()

  Return the number of columns

getHeight

     public int getHeight()

  Return the cell height

getWidth

     public int getWidth()

  Return the cell width

getWidth

     public int getWidth(int i)

setWidth

     public void setWidth(int ind,
                          int w)

  Set the cell width

    All Packages  Class Hierarchy  This Package  Previous  Next  Index