org.zaval.lw
Interface LwEditorProvider
- All Known Implementing Classes:
- LwDefEditors
- public interface LwEditorProvider
This interface is used to provide an editor component for the specified object and the specified value. For example,
tree view component uses the interface to define editor components to edit its items.
|
Method Summary |
java.lang.Object |
fetchEditedValue(java.lang.Object data,
LwComponent c)
Fetches the value from the editor component of the specified edited object. |
LwComponent |
getEditor(LwComponent src,
java.lang.Object data)
Gets the editor component for the specified component and the given data model value.
|
boolean |
shouldStartEdit(java.lang.Object src,
LwVCLEvent e)
Tests if the specified event should perform editing process for the specified model value. |
getEditor
public LwComponent getEditor(LwComponent src,
java.lang.Object data)
- Gets the editor component for the specified component and the given data model value.
The method returns
null if there is no any editor for the given
object and its model value. In this case the editing process will not be started.
- Parameters:
src - the specified component.data - the specified data model value.- Returns:
- an editor component.
fetchEditedValue
public java.lang.Object fetchEditedValue(java.lang.Object data,
LwComponent c)
- Fetches the value from the editor component of the specified edited object. The returned
value will be used to update appropriate data model value.
- Parameters:
data - the specified model value.c - the specified editor component that has been used to edit the
object data model value.- Returns:
- a value to update the data model.
shouldStartEdit
public boolean shouldStartEdit(java.lang.Object src,
LwVCLEvent e)
- Tests if the specified event should perform editing process for the specified model value.
- Parameters:
src - the specified model value.e - the specified event.- Returns:
true if the editing process should be performed; otherwise
false.
|