public class IlvEnumerationTableModelPropertyDescriptor extends IlvBasicTableModelPropertyDescriptor
IlvTableModelPropertyDescriptor
implementation looks up inside
a particular column of the table and map the values inside this table to values
of the model and conversely. The mapping from and to the model values is done by
associating enumerated values in the model to enumerated values in the table.Constructor and Description |
---|
IlvEnumerationTableModelPropertyDescriptor(int lookupColumn,
Object[] modelValues,
Object[] tableValues)
Creates an
IlvEnumrationPropertyDescriptor that will lookup at the given
column index to return the property value and will set it back to this index when
asked. |
IlvEnumerationTableModelPropertyDescriptor(String lookupColumn,
Object[] modelValues,
Object[] tableValues)
Creates an
IlvEnumerationPropertyDescriptor that will lookup at the index
of the given column name to return the property value and will set it back to
this index when asked. |
Modifier and Type | Method and Description |
---|---|
Object[] |
getModelValues()
Returns the values of the enumeration in the model.
|
Object |
getProperty(TableModel model,
int rowIndex)
Returns an
Object property value for the given
TableModel at the given row index. |
Object[] |
getTableValues()
Returns the values of the enumeration in the
TableModel . |
void |
setProperty(TableModel model,
int rowIndex,
Object propertyValue)
Sets the given property value inside the given
TableModel at
the given rowIndex . |
getColumnIndex, getColumns
public IlvEnumerationTableModelPropertyDescriptor(int lookupColumn, Object[] modelValues, Object[] tableValues)
IlvEnumrationPropertyDescriptor
that will lookup at the given
column index to return the property value and will set it back to this index when
asked.lookupColumn
- the column used for mappingmodelValues
- the enumerated values in the modeltableValues
- the enumerated values in the tablepublic IlvEnumerationTableModelPropertyDescriptor(String lookupColumn, Object[] modelValues, Object[] tableValues)
IlvEnumerationPropertyDescriptor
that will lookup at the index
of the given column name to return the property value and will set it back to
this index when asked.lookupColumn
- the column used for mappingmodelValues
- the enumerated values in the modeltableValues
- the enumerated values in the tablepublic final Object[] getModelValues()
public final Object[] getTableValues()
TableModel
.public Object getProperty(TableModel model, int rowIndex)
Object
property value for the given
TableModel
at the given row index.getProperty
in interface IlvTableModelPropertyDescriptor
getProperty
in class IlvBasicTableModelPropertyDescriptor
model
- The table model.rowIndex
- The row index.public void setProperty(TableModel model, int rowIndex, Object propertyValue) throws IlvConvertException
TableModel
at
the given rowIndex
.setProperty
in interface IlvTableModelPropertyDescriptor
setProperty
in class IlvBasicTableModelPropertyDescriptor
model
- The table model.rowIndex
- The row index.propertyValue
- The property value.IlvConvertException
© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.