|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectCellModel
public class CellModel
The CellModel is the base class for JavaBean objects that are used to configure the rendering of a CellDecorator.
A CellModel exposes primitive services and state that can be used by CellDecorator
s during rendering.
Constructor Summary | |
---|---|
CellModel()
|
Method Summary | |
---|---|
void |
addFormatter(FormatTag.Formatter formatter)
Add a FormatTag.Formatter which can be used to format an Object for rendering. |
String |
formatText(Object value)
Format an Object value. |
DataGridTagModel |
getDataGridTagModel()
Get the DataGridTagModel which is associated with the data grid tag that contains this
cell. |
void |
setDataGridTagModel(DataGridTagModel dataGridTagModel)
Set the DataGridTagModel for this cell. |
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CellModel()
Method Detail |
---|
public DataGridTagModel getDataGridTagModel()
DataGridTagModel
which is associated with the data grid tag that contains this
cell.
DataGridTagModel
for this cell. Inside a valid data grid, this method should
not return null
.public void setDataGridTagModel(DataGridTagModel dataGridTagModel)
DataGridTagModel
for this cell.
dataGridTagModel
- the new DataGridTagModel
value.public void addFormatter(FormatTag.Formatter formatter)
FormatTag.Formatter
which can be used to format an Object for rendering. Many
FormatTag.Formatter
instances can be registered and will be executed in the order in
which they were added. This method is provided as a service to CellModel subclasses;
the use of formatters can vary based on the implementation of a CellDecorator
.
formatter
- the FormatTag.Formatter
to addpublic String formatText(Object value)
Object
value. This method is used to apply a chain of formatters to some
value. It will return null
if the provided value is null; in this case, it
is up to the caller to provide an appropriate default value.
value
- the Object
to format
value
is null, return null
. If there are no registered
FormatTag.Formatter
instances, return Object.toString()
for the value
parameter.
Otherwisee, return the formatted value.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |