Class marimba.gui.TableWidget
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class marimba.gui.TableWidget

java.lang.Object
   |
   +----marimba.gui.Widget
           |
           +----marimba.gui.ContainerWidget
                   |
                   +----marimba.gui.ScrollingContainerWidget
                           |
                           +----marimba.gui.TableWidget

public class TableWidget
extends ScrollingContainerWidget
A table widget for multiple columns and rows of data. Every cell can contain the following objects: Widget, Boolean, Character, Double, Float, Integer, Long and String. A Widget is placed on the correct position and its width is adjusted to the width of the column. All other objects are just painted at the correct location. This TableWidget supports sorting on columns, dragging columns around, row selections, resizing of columns and both horizontal and vertical scrollbars of course.
Version:
1.49, 01/18/97
Author:
Klaas Waslander

Variable Index

 o colHeaders
The current option for column headers.
 o colHeadersOptions
The possible options for the column header style, which are none, plain, outline and raised.
 o colPadding
The number of pixels space at the left and right of each cell.
 o columnCount
The number of columns.
 o columnDrag
The columns can be moved by dragging them around.
 o columnLine
The columns can be separated by a line.
 o columnMap
Array for mapping column display index to a column index.
 o columnResize
The columns can be resizable in the header area.
 o columns
The information about the columns is stored in this array.
 o currentRowIndex
The display index of the current row.
 o fillHeaders
The headers can be filled or transparent.
 o hdrFont
The font that has to be used for the header.
 o rowCount
The number of rows.
 o rowMap
Array for mapping row display index to an actual row index.
 o rowPadding
The number of pixels space at the top and bottom of each cell.
 o rows
The information about the rows is stored in this array.
 o selectedRows
The currently selected rows, this vector contains the actual index of every selected row.
 o selectMode
The type of selections that can be made: none, exclusive or multiple selections.
 o selectModeOptions
The possible options for selecting, which are none, exclusive or multiple.
 o sizeToCell
The widgets can be sized to the cell size.
 o sortIndex
The current column index on which is being sorted, which is the actual index and not the display index.
 o sortMethod
The current sort method, ascending/descending/none.
 o sortMode
The current option for sorting.
 o sortModeOptions
The possible options for sorting, which are none, ascending, descending, both.
 o sortSymbol
The current sorting can be drawn in the headers using an appropriate symbol.
 o unsort
Determines whether the user can 'unsort' the data by clicking the column header.

Constructor Index

 o TableWidget()
Constructor.

Method Index

 o action()
The user performed an action.
 o action(int, int)
The user wants to perform an action at the given cell, represented by the column, row number combination.
 o addColumn()
Append an empty column without header.
 o addColumn(String)
Append an empty column to this table.
 o addColumn(String, int)
Append an empty column with the given width to this table.
 o addRow()
Append an empty row to this table.
 o addRow(TableRow)
Append a row in the form of a TableRow.
 o addRow(Vector)
Append a row to this table.
 o changeColumnWidth(int, int)
Change the column width of the column with the given actual index.
 o columnCount()
Get the number of columns.
 o columnsWidth()
Get the width of all the columns together.
 o deselectAllRows()
Deselect all rows.
 o deselectRow(TableRow)
Deselect the given row.
 o deselectRowAt(int)
Deselect the row with the given (actual) index.
 o eventInHeader(Event)
Checks whether the given event is located in the header area.
 o findColumn(int)
Returns the display index of the column the given x-coordinate corresponds with.
 o focusAtRow(int)
Focus the content at the row with the given actual index.
 o focusInterest()
The table widget supports input focus when it is not disabled and there are rows.
 o getCell(int, int)
Get the data in the cell that corresponds with the given (column, row) pair.
 o getColHeaders()
Get the current option for the colHeaders.
 o getColHeadersOptions()
Get the possible options for the column headers.
 o getColPadding()
Get the number of pixels at the left and right of each cell.
 o getColumn(int)
Get the TableColumn with info about the column with the given index, not dealing with columns being switched.
 o getColumnAlignAt(int)
Get the alignment of the given column.
 o getColumnData(int)
Get the data of the column with the given index.
 o getColumnDrag()
Check whether the columns can be moved by dragging them around.
 o getColumnHeaders()
Get the column headers as a string.
 o getColumnIndex(int)
Get the index of the column that is displayed at the given position.
 o getColumnLabelAt(int)
Get the label of the given column.
 o getColumnLine()
Check whether the columns are separated by a line.
 o getColumnResize()
Check whether the columns are resizable from the header area.
 o getCurrentRow()
Get the current row, which is the row that has the focus.
 o getCurrentRowIndex()
Get the display index of the current row.
 o getFillHeaders()
Check whether the headers are filled.
 o getHdrFont()
Get the font for the header.
 o getIntegerValue()
Get the index of the first selected row.
 o getProperties(PropertyList)
Get the properties of this widget.
 o getRow(int)
Get the TableRow with info about the row with the given index, not dealing with rows being sorted.
 o getRowData(int)
Get the data of the row with the given index.
 o getRowIndex(int)
Get the index of the row that is displayed at the given position.
 o getRowPadding()
Get the number of pixels at the top and bottom of each cell.
 o getSelectedRowIndexes()
Get the indexes of the currently selected rows.
 o getSelectedRows()
Get the currently selected rows as a vector containing TableRow objects.
 o getSelectMode()
Check the select mode.
 o getSelectModeOptions()
Get the possible options for the select mode.
 o getSizeToCell()
Check whether the widgets are sized to the cell size.
 o getSortIndex()
Get the column index on which currently is being sorted, which is the actual index and not the display index.
 o getSortMethod()
Get the current method of sorting, which can be ascending, descending or none.
 o getSortMode()
Get the current sort mode.
 o getSortModeOptions()
Get the possible options for the sort mode.
 o getSortSymbol()
Check whether a sort symbol is shown in a header.
 o getUnsort()
Check whether the user can unsort the data when clicking on a header.
 o getValue()
Get the index of the first selected row.
 o handleEvent(Event)
Event handler for mouse events.
 o insertColumnAt(String, int)
Insert an empty column at the given position to this table.
 o insertColumnAt(String, int, int)
Insert an empty column at the given position and with the given width to this table.
 o insertRowAt(TableRow, int)
Insert a row at the given position to this table.
 o insertRowAt(Vector, int)
Insert a row at the given position to this table.
 o layout()
Layout the widget, which means setting the content height and width and laying out the content.
 o moveColumn(int, int)
Move the 'from' column before the 'to' column.
 o newContent()
Allocate content container.
 o newScrollbar(int)
Create a new scrollbar with all the necessary properties.
 o paint(Graphics, int, int, int, int)
Paint the headers of the table.
 o paintSortSymbol(Graphics, int, int, int, int)
Paint the sort symbol at the given coordinates.
 o paramString(StringBuffer)
Debugging.
 o removeAllColumns()
Remove all columns with their data.
 o removeAllRows()
Remove all the rows.
 o removeColumnAt(int)
Remove the column at the given position, which is the actual index and not the display index.
 o removeRow(TableRow)
Remove the given row.
 o removeRowAt(int)
Remove the row at the given position, which is the actual and not the display index.
 o rowCount()
Get the number of rows.
 o rowIsSelected(TableRow)
Check whether the given table row is selected.
 o rowIsSelectedAt(int)
Check whether the row with the given actual index is selected.
 o rowsHeight()
Get the height of all the rows together.
 o scrollContent(int, int)
When scrolling the content to a given position generate a repaint for the headers-area if necessary.
 o selectRow(TableRow)
Select the given row.
 o selectRowAt(int)
Select the row with the given (actual) index.
 o setCell(Object, int, int)
Set the content of the cell that corresponds with the given (column, row) pair.
 o setColHeaders(int)
Set the colHeaders to be none, plain, outline or raised.
 o setColPadding(int)
Set the number of pixels at the left and right of each cell.
 o setColumnAlignAt(int, int)
Set the alignment of the given column to right, left or center.
 o setColumnDrag(boolean)
Set dragging of columns to true or false.
 o setColumnHeaders(String)
Base the columns on these column headers.
 o setColumnLabelAt(String, int)
Set the label of the given column.
 o setColumnLine(boolean)
Show/hide the lines between columns.
 o setColumnResize(boolean)
Disable or enable column resizing in the header area.
 o setColumnWidth(int, int)
Set the column width of the column with the given actual index and adjust the x positions of the other columns.
 o setCurrentRow(TableRow)
Set the current row with the focus to the given row.
 o setCurrentRowIndex(int)
Set the current display row index to the given (display) row index.
 o setFillHeaders(boolean)
Fill the headers area or let the area be transparent.
 o setHdrFont(Font)
Set the font for the header.
 o setProperties(PropertyList)
Set the properties of this widget.
 o setRowPadding(int)
Set the number of pixels at the top and bottom of each cell.
 o setRows(TableRow[])
Set the rows by supplying the array with TableRows directly.
 o setRows(Vector[])
Set the rows by supplying the array with Vectors containing the data directly.
 o setSelectMode(int)
Set the select mode to none, exclusive or multiple.
 o setSizeToCell(boolean)
Size the widgets to the cell size automatically or not.
 o setSortMode(int)
Set the sort mode to be none, ascending, descending or both.
 o setSortSymbol(boolean)
Show or hide the sort symbol for showing the current sorting column column and its way of sorting.
 o setUnsort(boolean)
(Dis)allow unsorting the data using the headers.
 o setValue(int)
Select a row.
 o setValue(Object)
Select a row by specifying a Number, String or TableRow object.
 o sortOnColumn(TableColumn, int)
Sort on the given column.
 o sortOnColumnAt(int, int)
Sort on the column at the given actual index, so not a display index.
 o switchColumns(int, int)
Switch two columns.
 o unSort()
Unsort the data in the table.

Variables

 o colHeadersOptions
  public static Options colHeadersOptions
The possible options for the column header style, which are none, plain, outline and raised.
See Also:
getColHeadersOptions, colHeaders
 o sortModeOptions
  public static Options sortModeOptions
The possible options for sorting, which are none, ascending, descending, both.
See Also:
getSortModeOptions, sortMode
 o selectModeOptions
  public static Options selectModeOptions
The possible options for selecting, which are none, exclusive or multiple.
See Also:
getSelectModeOptions, selectMode
 o sortMode
  public int sortMode
The current option for sorting.
See Also:
getSortMode, setSortMode, sortModeOptions
 o unsort
  public boolean unsort
Determines whether the user can 'unsort' the data by clicking the column header.
See Also:
getUnsort, setUnsort
 o sortSymbol
  public boolean sortSymbol
The current sorting can be drawn in the headers using an appropriate symbol.
See Also:
getSortSymbol, setSortSymbol
 o hdrFont
  public Font hdrFont
The font that has to be used for the header.
See Also:
getHdrFont, setHdrFont
 o selectMode
  public int selectMode
The type of selections that can be made: none, exclusive or multiple selections.
See Also:
getSelectMode, setSelectMode, selectModeOptions
 o columnDrag
  public boolean columnDrag
The columns can be moved by dragging them around. This is never possible if colHeaders is set to none.
See Also:
getColumnDrag, setColumnDrag
 o columnLine
  public boolean columnLine
The columns can be separated by a line.
See Also:
getColumnLine, setColumnLine
 o columnResize
  public boolean columnResize
The columns can be resizable in the header area. This is never possible if colHeaders is set to none.
See Also:
getColumnResize, setColumnResize
 o colHeaders
  public int colHeaders
The current option for column headers.
See Also:
getColHeaders, setColHeaders, colHeaderOptions
 o fillHeaders
  public boolean fillHeaders
The headers can be filled or transparent.
See Also:
getFillHeaders, setFillHeaders
 o sizeToCell
  public boolean sizeToCell
The widgets can be sized to the cell size.
See Also:
getSizeToCell, setSizeToCell
 o rowPadding
  public int rowPadding
The number of pixels space at the top and bottom of each cell.
See Also:
getRowPadding, setRowPadding
 o colPadding
  public int colPadding
The number of pixels space at the left and right of each cell.
See Also:
getColPadding, setColPadding
 o currentRowIndex
  public int currentRowIndex
The display index of the current row.
See Also:
getCurrentRow, setCurrentRow, getCurrentRowIndex, setCurrentRowIndex
 o columns
  protected TableColumn columns[]
The information about the columns is stored in this array. It contains a TableColumn for each column.
See Also:
getColumn
 o rows
  protected TableRow rows[]
The information about the rows is stored in this array. It contains a TableRow for each row with the data of that row.
See Also:
getRow
 o selectedRows
  protected int selectedRows[]
The currently selected rows, this vector contains the actual index of every selected row.
See Also:
getSelectedRows, getSelectedRowIndexes, rowIsSelected, rowIsSelectedAt
 o columnMap
  protected int columnMap[]
Array for mapping column display index to a column index. The array index is the display index, the item is the actual column index. Mapping the other way around can be done by asking a column for its 'displayIndex'.
See Also:
getColumnIndex
 o rowMap
  protected int rowMap[]
Array for mapping row display index to an actual row index. The array index is the display index, the item is the actual row index. Mapping the other way around can be done by asking a row for its 'displayIndex'.
See Also:
getRowIndex
 o rowCount
  protected int rowCount
The number of rows.
See Also:
rowCount
 o columnCount
  protected int columnCount
The number of columns.
See Also:
columnCount
 o sortMethod
  protected int sortMethod
The current sort method, ascending/descending/none.
See Also:
getSortMethod
 o sortIndex
  protected int sortIndex
The current column index on which is being sorted, which is the actual index and not the display index.
See Also:
getSortIndex

Constructors

 o TableWidget
  public TableWidget()
Constructor.

Methods

 o getProperties
  public void getProperties(PropertyList list)
Get the properties of this widget.
Overrides:
getProperties in class ScrollingContainerWidget
 o setProperties
  public void setProperties(PropertyList list)
Set the properties of this widget.
Overrides:
setProperties in class ScrollingContainerWidget
 o getColumnHeaders
  public String getColumnHeaders()
Get the column headers as a string. This is used in the getProperties method and if you pass this string to setColumnHeaders it will result in the correct headers.
See Also:
setColumnHeaders
 o setColumnHeaders
  public synchronized void setColumnHeaders(String str)
Base the columns on these column headers. Names are changed if necessary and columns removed/added if appropriate. Column names must be separated by a comma, each column name can be given a width using a slash. For example: "one/20,two,three/50". If you want a column name with a slash in it, you have to supply two slashes. For example: "12//3/20, 5//2".
See Also:
getColumnHeaders
 o newContent
  protected Widget newContent()
Allocate content container.
Overrides:
newContent in class ScrollingContainerWidget
 o newScrollbar
  public ScrollbarWidget newScrollbar(int orientation)
Create a new scrollbar with all the necessary properties.
Overrides:
newScrollbar in class ScrollingContainerWidget
 o getIntegerValue
  public int getIntegerValue()
Get the index of the first selected row.
 o getValue
  public Object getValue()
Get the index of the first selected row.
Overrides:
getValue in class Widget
 o setValue
  public void setValue(Object value)
Select a row by specifying a Number, String or TableRow object.
Overrides:
setValue in class Widget
See Also:
selectedRows
 o setValue
  public void setValue(int rowIndex)
Select a row.
See Also:
selectedRows
 o getColHeadersOptions
  public Options getColHeadersOptions()
Get the possible options for the column headers.
See Also:
colHeadersOptions
 o getSortModeOptions
  public Options getSortModeOptions()
Get the possible options for the sort mode.
See Also:
sortModeOptions
 o getSortMode
  public int getSortMode()
Get the current sort mode.
See Also:
sortMode
 o setSortMode
  public void setSortMode(int sortMode)
Set the sort mode to be none, ascending, descending or both.
See Also:
sortMode
 o getUnsort
  public boolean getUnsort()
Check whether the user can unsort the data when clicking on a header.
See Also:
unsort
 o setUnsort
  public void setUnsort(boolean unsort)
(Dis)allow unsorting the data using the headers.
See Also:
unsort
 o getSortSymbol
  public boolean getSortSymbol()
Check whether a sort symbol is shown in a header.
See Also:
sortSymbol
 o setSortSymbol
  public void setSortSymbol(boolean sortSymbol)
Show or hide the sort symbol for showing the current sorting column column and its way of sorting.
See Also:
sortSymbol
 o getSelectModeOptions
  public Options getSelectModeOptions()
Get the possible options for the select mode.
See Also:
selectModeOptions
 o getSelectMode
  public int getSelectMode()
Check the select mode.
See Also:
selectMode
 o setSelectMode
  public void setSelectMode(int selectMode)
Set the select mode to none, exclusive or multiple.
See Also:
selectMode
 o getHdrFont
  public Font getHdrFont()
Get the font for the header.
See Also:
hdrFont
 o setHdrFont
  public void setHdrFont(Font hdrFont)
Set the font for the header.
See Also:
hdrFont
 o getColumnDrag
  public boolean getColumnDrag()
Check whether the columns can be moved by dragging them around.
See Also:
columnDrag
 o setColumnDrag
  public void setColumnDrag(boolean columnDrag)
Set dragging of columns to true or false.
See Also:
columnDrag
 o getColumnLine
  public boolean getColumnLine()
Check whether the columns are separated by a line.
See Also:
columnLine
 o setColumnLine
  public void setColumnLine(boolean columnLine)
Show/hide the lines between columns.
See Also:
columnLine
 o getColumnResize
  public boolean getColumnResize()
Check whether the columns are resizable from the header area.
See Also:
columnResize
 o setColumnResize
  public void setColumnResize(boolean columnResize)
Disable or enable column resizing in the header area.
See Also:
columnResize
 o getColHeaders
  public int getColHeaders()
Get the current option for the colHeaders.
See Also:
colHeaders
 o setColHeaders
  public void setColHeaders(int colHeaders)
Set the colHeaders to be none, plain, outline or raised.
See Also:
colHeaders
 o getFillHeaders
  public boolean getFillHeaders()
Check whether the headers are filled.
See Also:
fillHeaders
 o setFillHeaders
  public void setFillHeaders(boolean fillHeaders)
Fill the headers area or let the area be transparent.
See Also:
fillHeaders
 o getSizeToCell
  public boolean getSizeToCell()
Check whether the widgets are sized to the cell size.
See Also:
sizeToCell
 o setSizeToCell
  public void setSizeToCell(boolean sizeToCell)
Size the widgets to the cell size automatically or not.
See Also:
sizeToCell
 o columnCount
  public int columnCount()
Get the number of columns.
See Also:
columnCount
 o rowCount
  public int rowCount()
Get the number of rows.
See Also:
rowCount
 o getRowPadding
  public int getRowPadding()
Get the number of pixels at the top and bottom of each cell.
See Also:
rowPadding
 o setRowPadding
  public void setRowPadding(int rowPadding)
Set the number of pixels at the top and bottom of each cell.
See Also:
rowPadding
 o getColPadding
  public int getColPadding()
Get the number of pixels at the left and right of each cell.
See Also:
colPadding
 o setColPadding
  public void setColPadding(int colPadding)
Set the number of pixels at the left and right of each cell.
See Also:
colPadding
 o columnsWidth
  public int columnsWidth()
Get the width of all the columns together.
 o rowsHeight
  public int rowsHeight()
Get the height of all the rows together.
 o setColumnWidth
  public void setColumnWidth(int index,
                             int width)
Set the column width of the column with the given actual index and adjust the x positions of the other columns.
 o changeColumnWidth
  public void changeColumnWidth(int index,
                                int widthChange)
Change the column width of the column with the given actual index.
 o getColumn
  public TableColumn getColumn(int columnIndex)
Get the TableColumn with info about the column with the given index, not dealing with columns being switched.
 o getRow
  public TableRow getRow(int index)
Get the TableRow with info about the row with the given index, not dealing with rows being sorted.
 o getColumnData
  public Vector getColumnData(int columnIndex)
Get the data of the column with the given index. It is returned in the original unsorted order.
 o getRowData
  public Vector getRowData(int index)
Get the data of the row with the given index. It is returned in the original order, not the current display order.
 o getCell
  public Object getCell(int colIndex,
                        int rowIndex)
Get the data in the cell that corresponds with the given (column, row) pair. It uses the original column and row index, so it does not take account of row sorting and a different display order of the columns.
See Also:
setCell
 o setCell
  public void setCell(Object item,
                      int colIndex,
                      int rowIndex)
Set the content of the cell that corresponds with the given (column, row) pair. The old content is removed. You can supply null to make the cell empty.
See Also:
getCell
 o getColumnLabelAt
  public String getColumnLabelAt(int index)
Get the label of the given column.
 o setColumnLabelAt
  public void setColumnLabelAt(String newLabel,
                               int index)
Set the label of the given column.
 o getColumnAlignAt
  public int getColumnAlignAt(int index)
Get the alignment of the given column.
 o setColumnAlignAt
  public void setColumnAlignAt(int align,
                               int index)
Set the alignment of the given column to right, left or center.
 o addColumn
  public void addColumn()
Append an empty column without header.
 o addColumn
  public void addColumn(String header)
Append an empty column to this table.
 o addColumn
  public void addColumn(String header,
                        int width)
Append an empty column with the given width to this table.
 o insertColumnAt
  public void insertColumnAt(String header,
                             int index)
Insert an empty column at the given position to this table.
 o insertColumnAt
  public void insertColumnAt(String header,
                             int index,
                             int width)
Insert an empty column at the given position and with the given width to this table. Its actual index and display index will be the same.
 o removeAllColumns
  public void removeAllColumns()
Remove all columns with their data.
 o removeColumnAt
  public void removeColumnAt(int columnIndex)
Remove the column at the given position, which is the actual index and not the display index. The data in that column is also removed.
 o getColumnIndex
  public int getColumnIndex(int displayIndex)
Get the index of the column that is displayed at the given position. Mapping the display index to the actual index is necessary, since you can only search using the actual index. Mapping from actual index to display index can be done by asking for 'displayIndex' in TableColumn.
See Also:
columnMap
 o moveColumn
  public void moveColumn(int fromIndex,
                         int toIndex)
Move the 'from' column before the 'to' column. The index for both columns is the current display index, so not the actual index.
 o switchColumns
  public void switchColumns(int colIndex1,
                            int colIndex2)
Switch two columns. The index for both columns is the current display index, so not the original index. The display index can be retreived from the TableColumn by asking for its 'displayIndex'.
 o sortOnColumn
  public void sortOnColumn(TableColumn sortCol,
                           int mode)
Sort on the given column.
Parameters:
mode - The sortmode, which means ascending or descending.
 o sortOnColumnAt
  public void sortOnColumnAt(int colIndex,
                             int mode)
Sort on the column at the given actual index, so not a display index.
Parameters:
mode - The sortmode, which means ascending or descending.
 o unSort
  public void unSort()
Unsort the data in the table.
 o getSortMethod
  public int getSortMethod()
Get the current method of sorting, which can be ascending, descending or none.
See Also:
sortMethod, getSortIndex
 o getSortIndex
  public int getSortIndex()
Get the column index on which currently is being sorted, which is the actual index and not the display index.
See Also:
sortIndex, getSortMethod
 o setRows
  public void setRows(Vector rows[])
Set the rows by supplying the array with Vectors containing the data directly.
See Also:
rows
 o setRows
  public void setRows(TableRow rows[])
Set the rows by supplying the array with TableRows directly.
See Also:
rows
 o addRow
  public void addRow()
Append an empty row to this table.
 o addRow
  public void addRow(Vector rowData)
Append a row to this table. You can supply null to add an empty row.
 o addRow
  public void addRow(TableRow row)
Append a row in the form of a TableRow. You can supply null to add an empty row.
 o insertRowAt
  public void insertRowAt(Vector rowData,
                          int index)
Insert a row at the given position to this table. You can supply null to add an empty row. Its actual index and display index will be the same.
 o insertRowAt
  public void insertRowAt(TableRow row,
                          int index)
Insert a row at the given position to this table. You can supply null to add an empty row. Its actual index and display index will be the same.
 o removeAllRows
  public void removeAllRows()
Remove all the rows.
 o removeRow
  public void removeRow(TableRow oldRow)
Remove the given row.
 o removeRowAt
  public void removeRowAt(int rowIndex)
Remove the row at the given position, which is the actual and not the display index.
 o getRowIndex
  public int getRowIndex(int displayIndex)
Get the index of the row that is displayed at the given position. Mapping the display index to the actual index is necessary, since you can only search using the actual index. Mapping from actual index to display index can be done by asking for 'displayIndex' in TableRow.
See Also:
rowMap
 o selectRow
  public void selectRow(TableRow row)
Select the given row. If the select mode is exclusive it will deselect all other rows.
See Also:
selectedRows
 o selectRowAt
  public void selectRowAt(int rowIndex)
Select the row with the given (actual) index. If the select mode is exclusive it will deselect all other rows.
See Also:
selectedRows
 o deselectRow
  public void deselectRow(TableRow row)
Deselect the given row.
See Also:
selectedRows
 o deselectRowAt
  public void deselectRowAt(int rowIndex)
Deselect the row with the given (actual) index.
See Also:
selectedRows
 o deselectAllRows
  public void deselectAllRows()
Deselect all rows.
See Also:
selectedRows
 o getSelectedRows
  public Vector getSelectedRows()
Get the currently selected rows as a vector containing TableRow objects. If no row is currently selected, an vector with zero elements is returned.
See Also:
selectedRows
 o getSelectedRowIndexes
  public int[] getSelectedRowIndexes()
Get the indexes of the currently selected rows. If no row is currently selected, an array with zero elements is returned.
See Also:
selectedRows
 o rowIsSelected
  public boolean rowIsSelected(TableRow row)
Check whether the given table row is selected.
See Also:
selectedRows
 o rowIsSelectedAt
  public boolean rowIsSelectedAt(int rowIndex)
Check whether the row with the given actual index is selected.
See Also:
selectedRows
 o getCurrentRow
  public TableRow getCurrentRow()
Get the current row, which is the row that has the focus.
See Also:
currentRowIndex
 o setCurrentRow
  public void setCurrentRow(TableRow currentRow)
Set the current row with the focus to the given row.
See Also:
currentRowIndex
 o getCurrentRowIndex
  public int getCurrentRowIndex()
Get the display index of the current row.
See Also:
currentRowIndex
 o setCurrentRowIndex
  public void setCurrentRowIndex(int displayRowIndex)
Set the current display row index to the given (display) row index.
See Also:
currentRowIndex
 o scrollContent
  public void scrollContent(int tx,
                            int ty)
When scrolling the content to a given position generate a repaint for the headers-area if necessary.
Overrides:
scrollContent in class ScrollingContainerWidget
 o layout
  public void layout()
Layout the widget, which means setting the content height and width and laying out the content.
Overrides:
layout in class ScrollingContainerWidget
 o focusAtRow
  public void focusAtRow(int rowIndex)
Focus the content at the row with the given actual index.
 o paint
  public void paint(Graphics g,
                    int cx,
                    int cy,
                    int cw,
                    int ch)
Paint the headers of the table.
Overrides:
paint in class Widget
 o paintSortSymbol
  protected void paintSortSymbol(Graphics g,
                                 int x,
                                 int y,
                                 int height,
                                 int sorting)
Paint the sort symbol at the given coordinates.
Parameters:
sorting - None, ascending or descending.
 o findColumn
  protected int findColumn(int x)
Returns the display index of the column the given x-coordinate corresponds with. Returns the negative index of an edge if the x-coordinate corresponds with that edge. Returns zero if no edge or column is found.
 o eventInHeader
  protected boolean eventInHeader(Event evt)
Checks whether the given event is located in the header area.
 o handleEvent
  public boolean handleEvent(Event evt)
Event handler for mouse events.
Overrides:
handleEvent in class ScrollingContainerWidget
 o action
  public void action(int column,
                     int row)
The user wants to perform an action at the given cell, represented by the column, row number combination.
 o action
  public void action()
The user performed an action.
Overrides:
action in class Widget
 o paramString
  public void paramString(StringBuffer buf)
Debugging.
Overrides:
paramString in class Widget
 o focusInterest
  public boolean focusInterest()
The table widget supports input focus when it is not disabled and there are rows.
Overrides:
focusInterest in class Widget

All Packages  Class Hierarchy  This Package  Previous  Next  Index