com.tssap.util.ui.reuse
Class ObjectEditorComponent

java.lang.Object
  |
  +--com.tssap.util.ui.AbstractEditable
        |
        +--com.tssap.util.ui.reuse.GenericComponent
              |
              +--com.tssap.util.ui.reuse.ObjectEditorComponent
All Implemented Interfaces:
IEditable, IGenericComponent, IGridLayoutPaneContainer, IObjectEditorComponent, IReuseable
Direct Known Subclasses:
DefaultObjectEditorComponent

public abstract class ObjectEditorComponent
extends GenericComponent
implements IObjectEditorComponent


Fields inherited from interface com.tssap.util.ui.reuse.IObjectEditorComponent
SEVERITY_PREFIX_ERROR, SEVERITY_PREFIX_INFO, SEVERITY_PREFIX_LEAVABLE_WARNING, SEVERITY_PREFIX_UNLEAVABLE_WARNING
 
Constructor Summary
ObjectEditorComponent()
          Constructor for ObjectEditorComponent.
ObjectEditorComponent(java.lang.String title)
          Constructor for ObjectEditorComponent.
 
Method Summary
 java.lang.String acceptData(java.lang.Object data)
          Method acceptData.
 void dispose()
           
 java.lang.Object getData()
          Returns the edited data Object.
 IModifiedCallback getModifiedCallback()
           
 boolean isDataAutoRefreshing()
           
 boolean isEnabled()
          Receive the component's enabled state.
 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 setEnabled(boolean enabled)
          Set whether or not the component and all its subcomponents are enabled.
 void setModifiedCallback(IModifiedCallback callback)
          The @see IModifiedCallback has to be informed about the "dirty" status of the editor component.
 
Methods inherited from class com.tssap.util.ui.reuse.GenericComponent
addModifyListener, addSelectionListener, createPartControl, createPartControl, createPartControl, getTitle, getUserAreaGridLayoutPane, isComposable, refresh, removeModifyListener, removeSelectionListener, setTitle
 
Methods inherited from class com.tssap.util.ui.AbstractEditable
isEditable, setEditable
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.tssap.util.ui.reuse.IReuseable
createPartControl
 
Methods inherited from interface com.tssap.util.ui.IEditable
isEditable, setEditable
 
Methods inherited from interface com.tssap.util.ui.glpc.IGridLayoutPaneContainer
getUserGridNumOfColumns, initContainer, isUserGridEqualColSize
 

Constructor Detail

ObjectEditorComponent

public ObjectEditorComponent()
Constructor for ObjectEditorComponent.

ObjectEditorComponent

public ObjectEditorComponent(java.lang.String title)
Constructor for ObjectEditorComponent.
Parameters:
title -  
Method Detail

dispose

public void dispose()
See Also:
com.tssap.util.ui.reuse.IObjectEditorComponent#dispose()

getData

public java.lang.Object getData()
Description copied from interface: IObjectEditorComponent
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()
Specified by:
getData in interface IObjectEditorComponent
See Also:
IObjectEditorComponent.getData()

isDataAutoRefreshing

public boolean isDataAutoRefreshing()
See Also:
com.tssap.util.ui.reuse.IObjectEditorComponent#isDataAutoRefreshing()

refreshDataFromUI

public void refreshDataFromUI()
Description copied from interface: IObjectEditorComponent
The implementation has to update the content of the data Object with the current UI inputs
Specified by:
refreshDataFromUI in interface IObjectEditorComponent
See Also:
IObjectEditorComponent.refreshDataFromUI()

refreshUIFromData

public void refreshUIFromData()
Description copied from interface: IObjectEditorComponent
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
Specified by:
refreshUIFromData in interface IObjectEditorComponent
See Also:
IObjectEditorComponent.refreshUIFromData()

setData

public void setData(java.lang.Object data)
Description copied from interface: IObjectEditorComponent
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()
Specified by:
setData in interface IObjectEditorComponent
See Also:
IObjectEditorComponent.setData(Object)

acceptData

public java.lang.String acceptData(java.lang.Object data)
Method acceptData.
Parameters:
data -  
Returns:
String reason

okToLeave

public java.lang.String okToLeave()
Description copied from interface: IObjectEditorComponent
Tests weather leaving the Editor is allowed. If not because of invalid data input an explanation text describing the reason is returned.
Specified by:
okToLeave in interface IObjectEditorComponent
Following copied from interface: com.tssap.util.ui.reuse.IObjectEditorComponent
Returns:
String containing explanation why leaving is not possible or null if leaving the EditorComponent is allowed.

isEnabled

public boolean isEnabled()
Description copied from interface: IReuseable
Receive the component's enabled state.
Specified by:
isEnabled in interface IReuseable
Overrides:
isEnabled in class GenericComponent
See Also:
IReuseable.isEnabled()

setEnabled

public void setEnabled(boolean enabled)
Description copied from interface: IReuseable
Set whether or not the component and all its subcomponents are enabled.
Specified by:
setEnabled in interface IReuseable
Overrides:
setEnabled in class GenericComponent
See Also:
IReuseable.setEnabled(boolean)

setModifiedCallback

public void setModifiedCallback(IModifiedCallback callback)
Description copied from interface: IObjectEditorComponent
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
Specified by:
setModifiedCallback in interface IObjectEditorComponent
See Also:
com.tssap.util.ui.reuse.IObjectEditorComponent#setModifyCallback(IModifiedCallback)

getModifiedCallback

public IModifiedCallback getModifiedCallback()
Specified by:
getModifiedCallback in interface IObjectEditorComponent
Following copied from interface: com.tssap.util.ui.reuse.IObjectEditorComponent
Returns:
 
See Also:
IObjectEditorComponent.setModifiedCallback(IModifiedCallback)


Copyright © 2005 SAP AG. All Rights Reserved.