All Packages Class Hierarchy This Package Previous Next Index
Class COM.taligent.widget.ListboxTable
java.lang.Object
|
+----COM.taligent.util.TableModel
|
+----COM.taligent.widget.ListboxTable
- public class ListboxTable
- extends TableModel
A listbox table used by the MultiColumnListbox (MCLB) in order
to retain the same behavior as previous versions. When the
programmer makes MCLB calls without first setting the model,
the listbox creates a ListboxTable automatically. The difference
between the ListboxTable and other TableModel objects is that the
MCLB will completely rearrange the data contents of the model
whereas (normally) the listbox is merely a view of the
data from the model.
If the programmer lets the listbox create a standard ListboxTable,
uses the getModel method to retrieve the current model,
and then sets other listboxes to use that model instance as their
data source, sorts and other methods that affect the data within
the model will be reflected in the second lisbox.
- Version:
- 1.0
- Author:
- Andy Clark, Taligent Inc.
-
ListboxTable()
- Constructs an empty table with 0 columns and 0 rows.
-
addColumn(Object[], Object)
- Adds a column.
-
addRow(Object[], Object)
- Adds a row.
-
addTableListener(TableListener)
- Adds a table listener.
-
getColumnCount()
- Returns the number of columns in the table.
-
getColumnIndex(Object)
- Returns the index of the first column information that equals
the specified information or -1 if no column information matches.
-
getColumnInfo(int)
- Returns the specified column's information.
-
getElement(int, int)
- Returns the element at the specified <row, col>.
-
getRowCount()
- Returns the number of rows in the table.
-
getRowIndex(Object)
- Returns the index of the first row information that equals
the specified information or -1 if no column information matches.
-
getRowInfo(int)
- Returns the specified row's information.
-
insertColumn(Object[], Object, int)
- Inserts a column at the specified index.
-
insertRow(Object[], Object, int)
- Insert a row at the specified index.
-
removeAllColumns()
- Removes all of the columns in the table.
-
removeAllRows()
- Removes all of the rows in the table.
-
removeColumn(int)
- Removes the specified column.
-
removeRow(int)
- Removes specified row.
-
removeTableListener(TableListener)
- Removes the specified table listener.
-
replaceColumn(Object[], Object, int)
- Replace the column at the specified index.
-
replaceRow(Object[], Object, int)
- Replaces the row at the specified index.
-
setColumnInfo(Object, int)
- Sets the specified column's information.
-
setElement(Object, int, int)
- Sets the element at the specified <row, col>.
-
setRowInfo(Object, int)
- Sets the specified row's information.
ListboxTable
public ListboxTable()
- Constructs an empty table with 0 columns and 0 rows.
addTableListener
public void addTableListener(TableListener listener)
- Adds a table listener.
- Overrides:
- addTableListener in class TableModel
removeTableListener
public void removeTableListener(TableListener listener)
- Removes the specified table listener.
- Overrides:
- removeTableListener in class TableModel
setElement
public void setElement(Object element,
int row,
int col)
- Sets the element at the specified <row, col>.
- Parameters:
- element - The new element.
- row - The row index.
- col - The column index.
- Overrides:
- setElement in class TableModel
getElement
public synchronized Object getElement(int row,
int col)
- Returns the element at the specified <row, col>.
- Parameters:
- row - The row index.
- col - The column index.
- Overrides:
- getElement in class TableModel
getColumnCount
public int getColumnCount()
- Returns the number of columns in the table.
- Overrides:
- getColumnCount in class TableModel
setColumnInfo
public void setColumnInfo(Object info,
int col)
- Sets the specified column's information.
- Parameters:
- info - The column information.
- col - The column index.
- Overrides:
- setColumnInfo in class TableModel
getColumnInfo
public synchronized Object getColumnInfo(int col)
- Returns the specified column's information.
- Parameters:
- col - The column index.
- Overrides:
- getColumnInfo in class TableModel
getColumnIndex
public synchronized int getColumnIndex(Object info)
- Returns the index of the first column information that equals
the specified information or -1 if no column information matches.
- Parameters:
- info - The column information.
- Overrides:
- getColumnIndex in class TableModel
addColumn
public void addColumn(Object data[],
Object info)
- Adds a column.
- Parameters:
- data - The new column's data. Can be null. If the data
array length is shorter than the number of rows,
then null values will be added; and if the length
is greater than the number of rows, the extraneous
values are ignored.
- info - The new column's information. Can be null.
- Overrides:
- addColumn in class TableModel
removeColumn
public void removeColumn(int col)
- Removes the specified column.
- Parameters:
- col - The column index.
- Overrides:
- removeColumn in class TableModel
removeAllColumns
public void removeAllColumns()
- Removes all of the columns in the table.
- Overrides:
- removeAllColumns in class TableModel
insertColumn
public void insertColumn(Object data[],
Object info,
int col)
- Inserts a column at the specified index.
- Parameters:
- data - The new column's data. Can be null. If the data
array length is shorter than the number of rows,
then null values will be added; and if the length
is greater than the number of rows, the extraneous
values are ignored.
- info - The new column's information. Can be null.
- col - The column index.
- Overrides:
- insertColumn in class TableModel
replaceColumn
public void replaceColumn(Object data[],
Object info,
int col)
- Replace the column at the specified index.
- Parameters:
- data - The column's new data. Can be null. If the data
array length is shorter than the number of rows,
then null values will be added; and if the length
is greater than the number of rows, the extraneous
values are ignored.
- info - The column's new information. Can be null.
- col - The column index.
- Overrides:
- replaceColumn in class TableModel
getRowCount
public synchronized int getRowCount()
- Returns the number of rows in the table.
- Overrides:
- getRowCount in class TableModel
setRowInfo
public void setRowInfo(Object info,
int row)
- Sets the specified row's information.
- Parameters:
- info - The row information.
- row - The row index.
- Overrides:
- setRowInfo in class TableModel
getRowInfo
public Object getRowInfo(int row)
- Returns the specified row's information.
- Parameters:
- row - The row index.
- Overrides:
- getRowInfo in class TableModel
getRowIndex
public synchronized int getRowIndex(Object info)
- Returns the index of the first row information that equals
the specified information or -1 if no column information matches.
- Parameters:
- info - The row information.
- Overrides:
- getRowIndex in class TableModel
addRow
public void addRow(Object data[],
Object info)
- Adds a row.
- Parameters:
- data - The new row's data. Can be null. If the data
array length is shorter than the number of
columns, then null values will be added; and if
the length is greater than the number of columns,
the extraneous values are ignored.
- info - The new row's information. Can be null.
- Overrides:
- addRow in class TableModel
removeRow
public void removeRow(int row)
- Removes specified row.
- Parameters:
- row - The row index.
- Overrides:
- removeRow in class TableModel
removeAllRows
public void removeAllRows()
- Removes all of the rows in the table.
- Overrides:
- removeAllRows in class TableModel
insertRow
public void insertRow(Object data[],
Object info,
int row)
- Insert a row at the specified index.
- Parameters:
- data - The new row's data. Can be null. If the data
array length is shorter than the number of
columns, then null values will be added; and if
the length is greater than the number of columns,
the extraneous values are ignored.
- info - The new row's information.
- row - The row index.
- Overrides:
- insertRow in class TableModel
replaceRow
public void replaceRow(Object data[],
Object info,
int row)
- Replaces the row at the specified index. The implementer of
this method should send TableEvent.ROW_CHANGED events to the
registered table listeners.
- Parameters:
- data - The row's new data. Can be null. If the data
array length is shorter than the number of
columns, then null values will be added; and if
the length is greater than the number of columns,
the extraneous values are ignored.
- info - The row's new information. Can be null.
- row - The row index.
- Overrides:
- replaceRow in class TableModel
All Packages Class Hierarchy This Package Previous Next Index