|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecteu.webtoolkit.jwt.WObject
eu.webtoolkit.jwt.WAbstractItemDelegate
eu.webtoolkit.jwt.WItemDelegate
public class WItemDelegate
Standard delegate class for rendering a view item.
This class provides the standard implementation for rendering an item in a
WTreeView.
| Constructor Summary | |
|---|---|
WItemDelegate()
Create an item delegate. |
|
WItemDelegate(WObject parent)
Create an item delegate. |
|
| Method Summary | |
|---|---|
java.lang.String |
getTextFormat()
Returns the text format string. |
void |
setTextFormat(java.lang.String format)
Sets the text format string. |
WWidget |
update(WWidget widget,
WModelIndex index,
java.util.EnumSet<ViewItemRenderFlag> flags)
Creates or updates a widget that renders an item. |
void |
updateModelIndex(WWidget widget,
WModelIndex index)
Updates the model index of a widget. |
| Methods inherited from class eu.webtoolkit.jwt.WAbstractItemDelegate |
|---|
update |
| Methods inherited from class eu.webtoolkit.jwt.WObject |
|---|
getId, getObjectName, remove, setObjectName, tr |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public WItemDelegate(WObject parent)
public WItemDelegate()
Calls this((WObject)null)
| Method Detail |
|---|
public WWidget update(WWidget widget,
WModelIndex index,
java.util.EnumSet<ViewItemRenderFlag> flags)
WAbstractItemDelegate
The item is specified by its model index, which also
indicates the model. If an existing widget already renders the item, but
needs to be updated, it is passed as the widget parameter.
You may decide to create a new widget, in which case you are responsible
to delete the previous widget if it is not reused.
When widget is null, a new widget needs to be
created.
The flags parameter indicates options for rendering the
item.
update in class WAbstractItemDelegate
public void updateModelIndex(WWidget widget,
WModelIndex index)
WAbstractItemDelegateThis method is invoked by the view when due to row/column insertions or removals, an index was modified for a widget.
You should reimplement this method if you are storing the model index
(e.g. for editing purposes) in the widget, which you should
update to the new index.
The default implementation does nothing.
updateModelIndex in class WAbstractItemDelegatepublic void setTextFormat(java.lang.String format)
The DisplayRole data is converted to a string using
StringUtils.asString(Object) by passing the given format.
The default value is "".
public java.lang.String getTextFormat()
setTextFormat(String format)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||