org.tigris.swidgets
Class PropertyTable
JTable
org.tigris.swidgets.PropertyTable
public class PropertyTable
extends JTable
A table of editable properties. Each row contains a single property,
where the first column is the property name and the second column is
the editable value. PropertyTable will attempt to use an editor that
is appropriate for the value type of each Property. This includes support
for using checkboxes for Booleans and Combo Boxes for arrays of choices.
TableCellEditor | getCellEditor(int row, int column) - Overridden to return the appropriate cell editor for the property
at the specified row.
|
TableCellRenderer | getCellRenderer(int row, int column) - Overridden to return the appropriate cell renderer for the property
value if the cell is in the value column, otherwise returns the default
renderer.
|
PropertyTable
public PropertyTable(Property[] p)
Creates a new PropertyTable for the specified set of Properties.
p
- set of properties to display in the table
PropertyTable
public PropertyTable(Property[] p,
String nct,
String vct)
Creates a new PropertyTable for the specified set of Properties.
p
- set of properties to display in the tablenct
- title to be displayed in the first
column headervct
- title to be displayed in the second
column header
getCellEditor
public TableCellEditor getCellEditor(int row,
int column)
Overridden to return the appropriate cell editor for the property
at the specified row. Returns null if column is not the value column.
row
- the row of the cell to editcolumn
- the column of the cell to edit
getCellRenderer
public TableCellRenderer getCellRenderer(int row,
int column)
Overridden to return the appropriate cell renderer for the property
value if the cell is in the value column, otherwise returns the default
renderer.
row
- the row of the cell to rendercolumn
- the column of the cell to render
- the renderer for this cell