com.tssap.util.ui.reuse
Interface IObjectEditorComponent
- All Superinterfaces:
- IEditable, IReuseable
- All Known Implementing Classes:
- ObjectEditorComponent
- public interface IObjectEditorComponent
- extends IReuseable, IEditable
- See Also:
IReuseableManager
|
Method Summary |
java.lang.Object |
getData()
Returns the edited data Object.
|
IModifiedCallback |
getModifiedCallback()
|
java.lang.String |
okToLeave()
Tests weather leaving the Editor is allowed. |
void |
refreshDataFromUI()
The implementation has to update the content of the data Object with the current UI inputs |
void |
refreshUIFromData()
The implementation has to fill it's UI elements with the data contained in it's data Object
The implementation can rely that @see #setData(Object) and @see IReuseable#createPartControl(Composite)
have been called before this method is invoked |
void |
setData(java.lang.Object data)
The implentation should test if the given Object is understood by this component and store
a reference to the data Object.
|
void |
setModifiedCallback(IModifiedCallback callback)
The @see IModifiedCallback has to be informed about the "dirty" status of the editor component.
|
SEVERITY_PREFIX_INFO
public static final java.lang.String SEVERITY_PREFIX_INFO
SEVERITY_PREFIX_LEAVABLE_WARNING
public static final java.lang.String SEVERITY_PREFIX_LEAVABLE_WARNING
SEVERITY_PREFIX_UNLEAVABLE_WARNING
public static final java.lang.String SEVERITY_PREFIX_UNLEAVABLE_WARNING
SEVERITY_PREFIX_ERROR
public static final java.lang.String SEVERITY_PREFIX_ERROR
refreshUIFromData
public void refreshUIFromData()
- The implementation has to fill it's UI elements with the data contained in it's data Object
The implementation can rely that @see #setData(Object) and @see IReuseable#createPartControl(Composite)
have been called before this method is invoked
refreshDataFromUI
public void refreshDataFromUI()
- The implementation has to update the content of the data Object with the current UI inputs
setData
public void setData(java.lang.Object data)
- The implentation should test if the given Object is understood by this component and store
a reference to the data Object.
THERE SHOULD BE NO AUTOMATIC UI UPDATE BE DONE IN THIS METHOD. @see #refreshUIFromData()
- Parameters:
data - the Object to be edited
getData
public java.lang.Object getData()
- Returns the edited data Object.
Currently there is no rule restricting the component in the time updateing it's data Object.
So currently the retured data Object may have change even there was no call of @see #refreshDataFromUI()
- Returns:
- the edited data Object
setModifiedCallback
public void setModifiedCallback(IModifiedCallback callback)
- The @see IModifiedCallback has to be informed about the "dirty" status of the editor component.
A editor component has to inform the Callback when the UI user changes any UI content so that a call of
- Parameters:
callback - - See Also:
will change the data content.
The "dirty" can also be reset to false if for example the UI offers a reset button or includes the
ability to recognize that a change was reverted by the user to the original state.
getModifiedCallback
public IModifiedCallback getModifiedCallback()
- Returns:
-
- See Also:
setModifiedCallback(IModifiedCallback)
okToLeave
public java.lang.String okToLeave()
- Tests weather leaving the Editor is allowed. If not because of invalid data input
an explanation text describing the reason is returned.
- Returns:
- String containing explanation why leaving is not possible or null if leaving
the EditorComponent is allowed.
Copyright © 2005 SAP AG. All Rights Reserved.