public interface DomainObjectFieldAdapter
JTable
).
In order to display a domain object as a row in such a table, data
members of the domain object must be mapped to cardinal fields. This adapter
provides the interface to accomplish this.JTable
Modifier and Type | Method and Description |
---|---|
TableCellEditor |
getCellEditor(int field)
Get a cell editor that is appropriate for editing a given field.
|
TableCellRenderer |
getCellRenderer(int field)
Get a cell renderer that is appropriate for rendering a given field.
|
Object |
getField(DomainObject object,
int field)
Get a field value.
|
Class |
getFieldClass(int field)
Determine the type of a given field.
|
int |
getFieldCount()
Get the field count.
|
int |
getFieldMaxWidth(int field)
Get the maximum column width for this field.
|
int |
getFieldMinWidth(int field)
Get the minimum column width for this field.
|
String |
getFieldName(int field)
Get the name of a field.
|
int |
getFieldPreferredWidth(int field)
Get the preferered column width for this field.
|
boolean |
isFieldEditable(int field)
Determine if the given field is editable.
|
void |
setField(DomainObject object,
int field,
Object value)
Set a field value.
|
int getFieldCount()
String getFieldName(int field)
field
- The field number.Object getField(DomainObject object, int field)
object
- The domain object for which a field value is being
requested.field
- The field number.void setField(DomainObject object, int field, Object value) throws MutatorException
object
- The domain object for which a field value is being set.field
- The field number.value
- The new value for the field.MutatorException
- If the value could not be set.TableCellRenderer getCellRenderer(int field)
field
- The field number.TableCellRenderer
that can be used to render the
value of this field.TableCellEditor getCellEditor(int field)
field
- The field number.TableCellEditor
that can be used to edit the
value of this field.boolean isFieldEditable(int field)
field
- The field number.true
if the field can be edited by external means
(such as through a table control), and false
if it is
immutable (display-only).Class getFieldClass(int field)
field
- The field number.int getFieldPreferredWidth(int field)
JTable
or similar component to determine column sizing
for the data model that uses this adapter.field
- The field number.int getFieldMinWidth(int field)
JTable
or similar component to determine column sizing
for the data model that uses this adapter.field
- The field number.int getFieldMaxWidth(int field)
JTable
or similar component to determine column sizing
for the data model that uses this adapter.field
- The field number.WebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses