CoffeeTable.Grid
Class GridPanel

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--java.awt.Panel
                    |
                    +--CoffeeTable.Grid.GridPanel

public class GridPanel
extends java.awt.Panel
implements GridPanelInterface, java.awt.event.AdjustmentListener, java.awt.event.KeyListener, java.awt.event.FocusListener, java.io.Serializable

GridPanel is a UI component for a generic grid object. It takes care of drawing it's cells, alongwith row and column headers, provides row/column/cell selection, column resizing, and scrolling support. GridAttributes can be set for the grid, the row and column headers and individual rows and columns. The simplest way to use it is to pass it a two dimensional array of strings which will provide the text data for the grid to display. In addition certain methods can be overidden to customize it's performance.

Version:
2.1.3 of October 1, 1999 Copyright © 1996-1999 3Magic
See Also:
Serialized Form

Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface CoffeeTable.Grid.GridPanelInterface
AUTO_RESIZE_COLS, AUTO_RESIZE_ROWS, CELL_SELECTION, CHOICE, COL_LINES, COL_RESIZE_ALL, COL_RESIZE_LAST, COL_RESIZE_NEXT, COL_SELECTION, DEMO_TEXT, DRAG_SELECT, EDIT_TEXT, IMAGE, JUST_CENTER, JUST_DEFAULT, JUST_FLAGS, JUST_LEFT, JUST_RIGHT, MAIL, MULTIPLE_SELECTION, NO_SELECTION, RESIZE_COL_HEADERS, RESIZE_COLUMNS, RESIZE_MULTIPLE, RESIZE_ROW_HEADERS, RESIZE_ROWS, ROW_LINES, ROW_NUMBERS, ROW_SELECTION, SCROLLBARS_ALWAYS, SCROLLBARS_AS_NEEDED, SCROLLBARS_NEVER, SINGLE_CLICK_EDITING, SORT_ASCENDING, SORT_ATTRIBUTES, SORT_DESCENDING, SORT_ROW_HEADERS, SPAN_COLUMNS, TEXT, THREED_BORDER, TRUNC_STRING, URL, WORD_WRAP
 
Constructor Summary
GridPanel()
          Constructs and creates a new GridPanel Object.
GridPanel(int numRows, int numCols)
          Constructs and creates a new GridPanel Object.
GridPanel(int numRows, int numCols, int rowHeight, int rowHeaderWidth, int colHeaderHeight, int[] colWidths, GridAttributes gridAttributes, GridAttributes headerAttributes, int vScrollbarDisplayPolicy, int hScrollbarDisplayPolicy, int flags)
          Constructs and creates a new GridPanel Object using the passed in parameters.
 
Method Summary
 void addGridListener(GridListener l)
          Adds the specified grid listener to receive grid events from this GridPanel.
 void addNotify()
          Notifies the Component that it has been added to a container.
 void adjustmentValueChanged(java.awt.event.AdjustmentEvent e)
          Used internally by the GridPanel to handle Scrollbar events.
 void autoResizeRow(int row, boolean repaint)
          Resize this row to display entire text in cells with WORD_WRAP enabled.
 void autoResizeRows(boolean repaint)
          Resize all the rows to display entire text in cells with WORD_WRAP enabled.
 void autoResizeRows(boolean adjustScrollbars, boolean repaint)
          Resize all the rows to display entire text in cells with WORD_WRAP enabled.
 java.awt.Rectangle cellToRect(java.awt.Point cell)
          Returns the rectangle for the specified cell.
 java.awt.Rectangle colHeaderToRect(int col)
          Returns the rectangle for the specified column's header.
 java.awt.Rectangle colToRect(int col)
          Returns the rectangle for the specified column.
 java.awt.Component createEditor(int col, int row)
          Returns an instance of a TextComponent for editing a cell.
 void createGridData()
          Allocates a new GridData object to store the data for the grid.
 void deleteCol(int atCol)
          Delete the specified column.
 void deleteCols(int atCol, int count)
          Deletes a specified number of columns, starting from a given column.
 void deleteRow(int atRow)
          Delete the specified row.
 void deleteRows(int atRow, int count)
          Deletes a specified number of rows, starting from a given row.
 void deselectAll(boolean repaint)
          Deselect all the cells in the grid.
 void deselectCell(int x, int y, boolean repaint)
          Deselect the specified cell in the grid.
 void deselectCol(int col, boolean repaint)
          Deselect the all the cells in a column in the grid.
 void deselectRow(int row, boolean repaint)
          Deselect the all the cells in a row in the grid.
 void disposeGridData()
          Deallocates the GridData object that stores the data for the grid.
protected  void doHScroll()
           
 void doKeyPressed(java.awt.event.KeyEvent e)
          Used internally by the GridPanel to handle keyPressed events in the GridPanel.
 void doKeySelect(java.awt.event.KeyEvent evt)
          Selects a cell, row or column based on the arrows keys and the selection mode.
 void doMouseClicked(java.awt.event.MouseEvent e)
          Used internally by the GridPanel to handle mouseClicked events.
 void doMouseDragged(java.awt.event.MouseEvent e)
          Used internally by the GridPanel to handle mouseDragged events.
 void doMouseEntered(java.awt.event.MouseEvent e)
          Used internally by the GridPanel to handle mouseEntered events.
 void doMouseExited(java.awt.event.MouseEvent e)
          Used internally by the GridPanel to handle mouseExited events.
 void doMouseMoved(java.awt.event.MouseEvent e)
          Used internally by the GridPanel to handle mouseMoved events.
 void doMousePressed(java.awt.event.MouseEvent e)
          Used internally by the GridPanel to handle mousePressed events.
 void doMouseReleased(java.awt.event.MouseEvent e)
          Used internally by the GridPanel to handle mouseReleased events.
 void doSetCursor(java.awt.event.MouseEvent e)
           
protected  void doVScroll()
           
 void drawCell(java.awt.Graphics g, java.awt.Point cell, java.awt.Rectangle aRect, boolean highlight)
          Draw a cell in the GridPanel.
 void drawCellImage(java.awt.Graphics g, java.awt.Image im, java.awt.Point cell, java.awt.Rectangle aRect)
          Draw an image in the specified cell.
 void drawHeaderCol(java.awt.Graphics g, int col, java.awt.Rectangle colRect)
          Draw the header for a column.
 void drawHeaderRow(java.awt.Graphics g, int row, java.awt.Rectangle rowRect)
          Draw the header for a row.
 void drawIntersection(java.awt.Graphics g, java.awt.Rectangle aRect)
          Draw the area in the intersection between the row and column headers.
 void drawSpannedCell(java.awt.Graphics g, java.awt.Point cell, int startSpan, int spanColumns, java.awt.Rectangle aRect, java.awt.Rectangle spannedRect, boolean highlight)
          Draw a cell in the GridPanel, spanning across adjacent columns where applicable.
 boolean endEdit(boolean commitChanges)
          Deactivates editing, and updates the cell's text by calling the setCellText() method if needed.
 void focusGained(java.awt.event.FocusEvent e)
           
 void focusLost(java.awt.event.FocusEvent e)
           
 GridAttributes getCellAttributes(int col, int row)
          Return the drawing attributes for a cell.
 java.lang.Object getCellData(int x, int y)
          Return the data Object for a cell.
 java.awt.Point getCellInset()
          Return the cell inset.
 java.lang.String getCellText(int x, int y)
          Return the text for a cell.
 GridAttributes getColHeaderAttributes(int col)
          Returns the drawing attributes for the column headers.
 int getColHeaderHeight()
          Returns the height for the column headers.
 java.awt.Rectangle getColHeaderRect()
          Return the area taken up by the column headers.
 java.lang.String[] getColHeaders()
          Returns the column header labels for all the columns.
 java.lang.String getColHeaderText(int col)
          Returns the text for the column header for a specified column.
 int getColResizeMode()
          Return the column resize mode setting.
 int getColWidth(int col)
          Returns the width for the specified column.
 java.lang.String getColWidths()
          Return the column widths as a a comma delimited String e.g.
 int getColWidths(int startCol, int numCols)
          Returns the total width for a range of columns.
 int getDefaultRowHeight()
          Return the default row height for a row based on the font height
 java.awt.Point getEditCell()
          Return the cell being edited.
 java.awt.Component getEditor()
          Return the TextComponent object for the cell being edited.
 java.awt.Point getFirstSelectedCell()
          Returns the first selected cell in the grid.
 int getFirstSelectedCol()
          Returns the first selected column in the grid.
 int getFirstSelectedRow()
          Returns the first selected row in the grid.
 java.awt.Point getFirstVisibleCell()
          Returns the cell at the top-left corner of the grid.
 int getFlags()
          Returns the Grid's current feature flags
 GridAttributes getGridAttributes()
          Returns the drawing attributes for the entire grid.
 java.awt.Color getGridBackground()
          Return the grid's background color.
 GridDataInterface getGridData()
          Returns the GridData object for this grid.
 java.awt.Font getGridFont()
          Return the grid's text font.
 int getGridJustification()
          Return the grid's justification style.
 java.awt.Dimension getGridSize()
          Return the size of the Grid's view area this excluding the area of the scrollbars if present.
 java.awt.Color getGridTextColor()
          Return the grid's text color.
 GridAttributes getHeaderAttributes()
          Returns the drawing attributes for the row and column headers.
 java.awt.Color getHeaderBackground()
          Return the grid header's background color.
 java.awt.Font getHeaderFont()
          Return the grid header's text font.
 int getHeaderJustification()
          Return the grid header's justification style.
 java.awt.Color getHeaderTextColor()
          Return the grid header's text color.
 java.awt.Color getHighlightColor()
          Return the highlight color.
 java.awt.Color getHighlightTextColor()
          Return the highlight text color.
 int getHScrollAmount()
          Returns the number of pixels the grid is scrolled horizontally each time the scrollbar arrows are clicked.
 int getHScrollbarDisplayPolicy()
          Returns the display policy for the horizontal scrollbars.
protected  int getHScrollbarValue()
           
 java.awt.Point getLastSelectedCell()
          Returns the last selected cell in the grid.
 int getLastSelectedCol()
          Returns the last selected column in the grid.
 int getLastSelectedRow()
          Returns the last selected row in the grid.
 java.awt.Point getLastVisibleCell()
          Returns the cell at the bottom-right corner of the grid.
 java.awt.Color getLineColor()
          Return the row and column line colors.
 int getMinColWidth(int col)
          Returns the minimum column width for the specified column.
 java.lang.String getMinColWidths()
          Return the minimum column widths as a a comma delimited String e.g.
 java.awt.Dimension getMinimumSize()
          Returns the minimum size of this component.
 int getNumCols()
          Returns the number of columns in the grid.
 int getNumRows()
          Returns the number of rows in the grid.
 java.awt.Dimension getPreferredSize()
          Returns the preferred size of this component.
 boolean getResizeColHeaders()
          Return whether column header resizing is enabled
 boolean getResizeColumns()
          Return whether column resizing is enabled
 boolean getResizeRowHeaders()
          Return whether row header resizing is enabled
 boolean getResizeRows()
          Return whether row resizing is enabled
 java.util.Vector getRowData(int row)
          Return the data for all the cells in a row.
 GridAttributes getRowHeaderAttributes(int row)
          Returns the drawing attributes for the row headers.
 java.awt.Rectangle getRowHeaderRect()
          Return the area taken up by the row headers.
 java.lang.String getRowHeaderText(int row)
          Returns the text for the row header for a specified column.
 int getRowHeaderWidth()
          Returns the width for the row headers.
 int getRowHeight()
          Returns the default row height for the grid for all the rows in the grid.
 int getRowHeight(int row)
          Returns the height for the specified row.
 int getRowHeights(int startRow, int numRows)
          Returns the total height for a range of rows.
 java.lang.Object getRowTag(int row)
          Return the tag object for a row.
 java.awt.Point getScrollOffset()
          Returns vertical and horizontal pixel offset that the Grid is currently scrolled by.
 java.awt.Rectangle getSelBounds()
          Returns the boundary of the current selection.
 java.util.Vector getSelectedCells()
          Returns a list of the currently selected cells.
 java.util.Vector getSelectedCols()
          Returns a list of the currently selected columns.
 java.util.Vector getSelectedRows()
          Returns a list of the currently selected rows.
 int getSortColumn()
          Return the current sort column.
 java.awt.Color getSortColumnColor()
          Return the background color for cells in the column that the grid data is sorted on.
 boolean getSortEnable()
          Check if sorting is enabled for all columns.
 boolean getSortEnable(int col)
          Check if sorting is enabled for this column.
 int getSortOrder()
          Return the current sort orientation.
 java.lang.String getVersionString()
          Return the current version of the component.
 int getVScrollAmount()
          Returns the number of pixels the grid is scrolled vertically each time the scrollbar arrows are clicked.
 int getVScrollbarDisplayPolicy()
          Returns the display policy for the vertical scrollbars.
protected  int getVScrollbarValue()
           
 void goToURL(java.lang.String urlStr)
          Called by the handleURLClick() method in response to the user clicking in a cell containing a URL.
 boolean handleCellClick(java.awt.event.MouseEvent evt, int col, int row)
          Called if the user clicks in the grid area.
 boolean handleDoubleClick(java.awt.event.MouseEvent evt, int col, int row)
          Called if the user double clicks in the grid area.
 boolean handleEditClick(java.awt.event.MouseEvent evt, int col, int row)
          Activates editing in a cell.
 boolean handleMailClick(java.awt.event.MouseEvent evt, int col, int row)
          Called if the user clicks in a URL cell.
 boolean handleMouseDown(java.awt.event.MouseEvent evt)
          Called if the user clicks in the grid area.
 boolean handleURLClick(java.awt.event.MouseEvent evt, int col, int row)
          Called if the user clicks in a URL cell.
 java.awt.Rectangle headerColToRect(int col)
          Returns the rectangle for the column header.
 void highlightCell(java.awt.Graphics g, java.awt.Point cell, java.awt.Rectangle aRect, boolean highlight)
          Highlight a cell in the GridPanel.
 void highlightSpannedCell(java.awt.Graphics g, java.awt.Point cell, int startSpan, int spanCols, java.awt.Rectangle aRect, java.awt.Rectangle spannedRect, boolean highlight)
          Highlight a cell in the GridPanel, that spans across multiple columns.
protected  void hScrollTo(int scrollValue)
           
 void insertCol(int atCol)
          Insert a new column at the specified location.
 void insertCols(int atCol, int count)
          Insert a number of columns at the specified location.
 void insertRow(int atRow)
          Insert a new row at the specified location.
 void insertRows(int atRow, int count)
          Insert a number of rows at the specified location.
 boolean isAutoResizeColumns()
          Return whether the feature to size columns proportionally is set
 boolean isAutoResizeRows()
          Return whether the feature to automatically resize rows is enabled.
 boolean isCellSelected(int x, int y)
          Check if the specified cell is selected.
 boolean isCellSelection()
          Return whether cell selection is enabled
 boolean isColLines()
          Return whether drawing column lines is enabled
 boolean isColSelected(int col)
          Check if the all the cells in the specified column are selected.
 boolean isColSelection()
          Return whether column selection is enabled
 boolean isDemoText()
          Return true if drawing demo text is enabled for the grid.
 boolean isDragSelect()
          Return whether drag selection is enabled.
 boolean isFocusTraversable()
          Returns whether true to specify that this component can be traversed using Tab or Shift-Tab keyboard focus traversal.
 boolean isMultipleSelection()
          Return whether multiple selections is enabled
 boolean isResizeMultiple()
          Return whether resizing of multiple selected rows or columns is enabled
 boolean isRowLines()
          Return whether drawing row lines is enabled
 boolean isRowNumbers()
          Return true if drawing row numbers in the row headers.
 boolean isRowSelected(int row)
          Check if the all the cells in the specified row are selected.
 boolean isRowSelection()
          Return whether row selection is enabled
 boolean isSingleClickEditing()
          Return true if the feature to start editing cells with a single click, instead of a double click is set.
 boolean isSortAttributes()
          Return true if moving the attributes and row sizes with rows while sorting is enabled.
 boolean isSortRowHeaders()
          Return true if moving the row header data with rows while sorting is enabled.
 boolean isThreeDBorder()
          Return true if drawing a ThreeD border is enabled for the grid.
 void keyPressed(java.awt.event.KeyEvent e)
          Used internally by the GridPanel to handle keyPressed events in the cell Editor.
 void keyReleased(java.awt.event.KeyEvent e)
          Used internally by the GridPanel to handle keyReleased events in the cell Editor.
 void keyTyped(java.awt.event.KeyEvent e)
          Used internally by the GridPanel to handle keyTyped events in the cell Editor.
 void paint(java.awt.Graphics g)
          Paints the GridPanel.
 void print(java.awt.Graphics g)
          Prints the GridPanel.
 void processGridEvent(GridEvent e)
          Processes Grid events occuring on this GridPanel by dispatching them to any registered GridListener objects.
protected  void processKeyEvent(java.awt.event.KeyEvent e)
           
protected  void processMouseEvent(java.awt.event.MouseEvent e)
           
protected  void processMouseMotionEvent(java.awt.event.MouseEvent e)
           
 void recalcColumnWidths()
          Recalculate the column widths and size them proportionally so that they all fit in the GridPanel's displayarea without requiring a horizontal scrollbar.
 void removeGridListener(GridListener l)
          Removes the specified grid listener so it no longer receives grid events from this GridPanel.
 void repaint(long tm, int x, int y, int width, int height)
          Repaints part of the component.
 void repaintCell(java.awt.Point aCell)
          Repaint the specified cell.
 void repaintCol(int col)
          Repaint the specified column.
 void repaintColHeader(int col)
          Repaint the header for the specified column.
 void repaintGrid()
          Repaint the entire grid.
 void repaintRow(int row)
          Repaint the specified row.
 void repaintRowHeader(int row)
          Repaint the header for the specified row.
 void revealCell(int col, int row)
          Scroll the specified cell into view.
 void revealCol(int col)
          Scroll the specified column into view.
 void revealRow(int row)
          Scroll the specified row into view.
 java.awt.Rectangle rowHeaderToRect(int row)
          Returns the rectangle for the specified row's header.
 java.awt.Rectangle rowToRect(int row)
          Returns the rectangle for the specified row.
 void selectAll(boolean repaint)
          Select all the cells in the grid.
 void selectCell(int x, int y, boolean repaint)
          Select the specified cell in the grid.
 void selectCol(int col, boolean repaint)
          Select all the cells in the specified column.
 void selectRange(java.awt.Point startCell, java.awt.Point endCell, boolean extendSelection, boolean repaint)
          Select a rectangular range of cells.
 void selectRow(int row, boolean repaint)
          Select all the cells in the specified row.
 void setApplet(java.applet.Applet applet)
          Set the applet that this component is contained in.
 void setAutoResizeColumns(boolean state)
          Enable or disable the feature to size columns proportionally to fit in the GridPanel.
 void setAutoResizeRows(boolean state)
          Enable or disable the feature to automatically resize rows.
 void setBounds(int x, int y, int width, int height)
          reshapes the GridPanel to the specfied bounding box.
 void setCellAttributes(int col, int row, GridAttributes cellAttributes, boolean repaint)
          Specify the drawing attributes for a cell.
 void setCellData(int x, int y, java.lang.Object cellData, boolean repaint)
          Set the cell's data object.
 void setCellInset(java.awt.Point inset)
          Set the cell inset.
 void setCellSelection(boolean state)
          Enable or disable cell selection.
 void setCellText(int x, int y, java.lang.String cellText, boolean repaint)
          Set the cell's text.
 void setColAttributes(int col, GridAttributes colAttributes)
          Specify the drawing attributes for all the cells in a column.
 void setColAttributes(int col, GridAttributes colAttributes, boolean repaint)
          Specify the drawing attributes for all the cells in a column.
 void setColHeaderAttributes(GridAttributes colHeaderAttributes)
          Set the drawing attributes for column headers.
 void setColHeaderAttributes(int col, GridAttributes colHeaderAttributes)
          Set the drawing attributes for a specific column of the column headers.
 void setColHeaderHeight(int height)
          Set the height of the column headers.
 void setColHeaderHeight(int height, boolean repaint)
          Set the column header height.
 void setColHeaders(java.lang.String[] colTextArray)
          Set the column header labels for all the columns in the grid.
 void setColHeaderText(int col, java.lang.String colText)
          Set the column header text for the specified column.
 void setColHeaderText(int col, java.lang.String colText, boolean repaint)
          Set the column header text for the specified column.
 void setColLines(boolean state)
          Enable or disable column lines.
 void setColResizeMode(int colResizeMode)
          Set the column resize mode.
 void setColSelection(boolean state)
          Enable or disable column selection.
 void setColWidth(int col, int colWidth, boolean adjustScrollbars, boolean repaint)
          Set the column width.
 void setColWidths(int[] colWidths, boolean adjustScrollbars, boolean repaint)
          Set the column widths for all the column in the grid.
 void setColWidths(java.lang.String colWidths)
          Set the column widths for all the column in the grid.
 void setColWidths(java.lang.String colWidths, boolean adjustScrollbars, boolean repaint)
          Set the column widths for all the column in the grid.
 void setDemoText(boolean state)
          Enable or disable drawing demo text in empty cells.
 void setDragSelect(boolean state)
          Enable or disable drag selection.
 void setEnabled(boolean b)
          Enables the component.
 void setFlags(int flags)
          Set the Grid's feature flags.
 void setFlags(int flags, boolean repaint)
          Set the Grid's feature flags.
 void setGridAttributes(GridAttributes gridAttributes)
          Set the drawing attributes for the entire grid.
 void setGridAttributes(GridAttributes gridAttributes, boolean repaint)
          Set the drawing attributes for the entire grid.
 void setGridBackground(java.awt.Color c)
          Set the grid's background color.
 void setGridData(GridDataInterface gridData)
          Specify a preallocated instance of a GridData object to store the data for the grid.
 void setGridData(GridDataInterface gridData, boolean repaint)
          Specify a preallocated instance of a GridData object to store the data for the grid.
 void setGridFont(java.awt.Font f)
          Set the grid's text font.
 void setGridJustification(int just)
          Set the grid's justification style.
 void setGridTextColor(java.awt.Color c)
          Set the grid's text color.
 void setHeaderAttributes(GridAttributes headerAttributes)
          Set the drawing attributes for row and column headers.
 void setHeaderAttributes(GridAttributes headerAttributes, boolean repaint)
          Set the drawing attributes for row and column headers.
 void setHeaderBackground(java.awt.Color c)
          Set the grid header's background color.
 void setHeaderFont(java.awt.Font f)
          Set the grid header's text font.
 void setHeaderJustification(int just)
          Set the grid header's justification style.
 void setHeaderTextColor(java.awt.Color c)
          Set the grid header's text color.
 void setHighlightColor(java.awt.Color aColor)
          Set the highlight color.
 void setHighlightTextColor(java.awt.Color aColor)
          Set the highlight text color.
 void setHScrollAmount(int hScrollAmount)
          Set the number of pixels the grid is scrolled horizontally each time the scrollbar arrows are clicked.
 void setHScrollbarDisplayPolicy(int scrollbarPolicy)
          Set the horizontal scroll bar display policy.
 void setInGridPrinter(boolean inGridPrinter)
          Used internally by the GridPanel.
 void setLineColor(java.awt.Color c)
          Set the row and column line colors.
 void setLineColor(java.awt.Color aColor, boolean repaint)
          Set the line color.
 void setMinColWidth(int col, int minColWidth)
          Set the column's minimum width.
 void setMinColWidths(java.lang.String minColWidths)
          Set the minimum column widths for all the columns in the grid.
 void setMultipleSelection(boolean state)
          Enable or disable multiple selections.
 void setNumCols(int numCols)
          Set the number of columns in the grid.
 void setNumCols(int numCols, boolean repaint)
          Set the number of columns in the grid.
 void setNumCols(int numCols, int[] colWidths, boolean repaint)
          Set the number of columns in the grid, including the column widths.
 void setNumCols(int numCols, int colWidth, boolean repaint)
          Set the number of columns in the grid.
 void setNumCols(int numCols, java.lang.String colWidths, boolean repaint)
          Set the number of columns in the grid, including the column widths.
 void setNumRows(int numRows)
          Set the number of rows in the grid.
 void setNumRows(int numRows, boolean repaint)
          Set the number of rows in the grid.
 void setNumRows(int numRows, boolean repaint, boolean scrollToTop)
          Set the number of rows in the grid.
 void setPrintPageRect(java.awt.Rectangle printPageRect)
          Used internally by the GridPanel.
 void setResizeColHeaders(boolean state)
          Enable or disable column header resizing.
 void setResizeColumns(boolean state)
          Enable or disable column resizing.
 void setResizeMultiple(boolean state)
          Enable or disable resizing of multiple rows or columns if selected.
 void setResizeRowHeaders(boolean state)
          Enable or disable row header resizing.
 void setResizeRows(boolean state)
          Enable or disable row resizing.
 void setRowAttributes(int row, GridAttributes rowAttributes)
          Specify the drawing attributes for all the cells in a row.
 void setRowAttributes(int row, GridAttributes rowAttributes, boolean repaint)
          Specify the drawing attributes for all the cells in a row.
 void setRowData(int row, java.util.Vector rowData, boolean repaint)
          Sets the data for all the cells in a row.
 void setRowHeaderAttributes(GridAttributes rowHeaderAttributes)
          Set the drawing attributes for row headers.
 void setRowHeaderAttributes(int row, GridAttributes rowHeaderAttributes)
          Set the drawing attributes for a specific row of the row headers.
 void setRowHeaderText(int row, java.lang.String rowText, boolean repaint)
          Set the row header text for the specified row.
 void setRowHeaderWidth(int width)
          Set the width of the row headers.
 void setRowHeaderWidth(int width, boolean repaint)
          Set the row header width.
 void setRowHeight(int height)
          Set the row height for all the rows.
 void setRowHeight(int row, int rowHeight, boolean adjustScrollbars, boolean repaint)
          Set the height of the specified row.
 void setRowLines(boolean state)
          Enable or disable row lines.
 void setRowNumbers(boolean state)
          Enable or disable drawing row numbers in the row headers.
 void setRowSelection(boolean state)
          Enable or disable row selection.
 void setRowTag(int row, java.lang.Object tag)
          Set the tag object for a row.
 void setSingleClickEditing(boolean state)
          Enable or disable single click editing.
 void setSortAttributes(boolean state)
          Enable or disable moving the attributes with the rows while sorting.
 void setSortColumn(int col)
          Set the current sort column, and sort the data based on the contents of this column and repaint the column if needed.
 void setSortColumn(int col, boolean repaint)
          Set the sort column, and sort the data based on the contents of this column.
 void setSortColumn(int col, boolean repaint, int sortOrder)
          Set the sort column, and sort the data based on the contents of this column.
 void setSortColumnColor(java.awt.Color c)
          Set the background color for cells in the column that the grid data is sorted on.
 void setSortEnable(boolean sortEnable)
          Set the flag to enable or disable sorting for all the columns in the grid.
 void setSortEnable(int col, boolean sortEnable)
          Set the flag to enable or disable sorting for a column.
 void setSortRowHeaders(boolean state)
          Enable or disable moving the row header data with the rows while sorting.
 void setThreeDBorder(boolean state)
          Enable or disable drawing a ThreeD border around the grid.
 void setVisibleCells(int cols, int rows)
          Set the number of visible rows and columns for this Grid.
 void setVScrollAmount(int vScrollAmount)
          Set the number of pixels the grid is scrolled vertically each time the scrollbar arrows are clicked.
 void setVScrollbarDisplayPolicy(int scrollbarPolicy)
          Set the vertical scroll bar display policy.
 void sortRows(int sortCol)
          Sort the rows based on the values in the specified column.
 void sortRows(int sortCol, int sortOrder)
          Sort the rows based on the values in the specified column.
 void startEdit(int col, int row)
          Activates editing in a cell.
 void update(java.awt.Graphics g)
          Updates the GridPanel.
 boolean validate(java.lang.String aText, java.awt.Point editCell)
          Validate the text in a cell after editing.
protected  void vScrollTo(int scrollValue)
           
 int xToCol(int x)
          Map the x coordinate to a column in the grid.
 java.awt.Point xyToCell(int x, int y)
          Map a point to a cell in the grid.
 int