com.tssap.util.ui.reuse.tree
Class TreeSelectorEditorComponent

java.lang.Object
  |
  +--com.tssap.util.ui.reuse.tree.TreeSelectorEditorComponent

public class TreeSelectorEditorComponent
extends java.lang.Object

The TreeSelectorEditorComponent is a wrapper for a @see com.tssap.util.ui.reuse.tree.TreeSelector. It adds special functionality to use the Component as an Object editor. Data transfer will be managed when the right side component implements @see com.tssap.util.ui.reuse.IObjectEditorComponent Data transfer is done like this. The converted(@see com.tssap.util.ui.reuse.tree.TreeSelector#setSelectionConverter(ISelectionConverter)) Object will be set @see com.tssap.util.ui.reuse.IObjectEditorComponent#setData(Object), @see com.tssap.util.ui.reuse.IObjectEditorComponent#refreshUIFromData(). When the selection changes in tree the data will be updated @see com.tssap.util.ui.reuse.IObjectEditorComponent#refreshDataFromUI() Such an update will also be done when @see #aboutToLeave() is called.


Constructor Summary
TreeSelectorEditorComponent(TreeSelector selector)
          The TreeSelectorEditorComponent in a wraps a @see TreeSelector.
 
Method Summary
 void aboutToLeave()
          Inform the component that it will be closed/disabled The current right side @see IObjectEditorComponent will be told to update it's data
 ISelectionConverter getSelectionConverter()
          Delegation method.
 TreeSelector getTreeSelector()
          Returns the used/wrapped TreeSelector
 void init()
          Not used
 boolean isEditable()
          Delegation method.
 boolean isRefreshAfterSelectionChange()
           
 java.lang.String okToLeave()
          Delegation method.
 void refreshTree()
          Delegation method.
 void refreshTree(boolean refreshLabels)
          Delegation method.
 void setAddRemoveCallback(IAddRemoveCallback callback)
          The TreeSelectorCallback of the used @see TreeSelector will be handled TreeSelectorEditorComponent.
 void setEditable(boolean editable)
          Delegation method.
 void setModifiedCallback(IModifiedCallback callback)
          Hook on data modification in right side editor.
 void setRefreshAfterSelectionChange(boolean refreshAfterSelectionChange)
          Editing an Object may change the structure in the tree (Or maybe the icon of an Object) Setting this flag will cause a refreshing of the tree after every selection change in the tree.
 void setReusableManager(IReuseableManager reusableManager)
          Delegation method.
 void setSelection(java.lang.Object objToSelect)
          Delegation method.
 void setSelectionConverter(ISelectionConverter selectionConverter)
          Delegation method.
 void setTreeContentProvider(org.eclipse.jface.viewers.ITreeContentProvider contentProvider)
          Delegation method.
 void setTreeInput(java.lang.Object obj)
          Delegation method.
 void setTreeLabelProvider(org.eclipse.jface.viewers.ILabelProvider labelProvider)
          Delegation method.
 void setViewerSorter(org.eclipse.jface.viewers.ViewerSorter sorter)
          Delegation method.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TreeSelectorEditorComponent

public TreeSelectorEditorComponent(TreeSelector selector)
The TreeSelectorEditorComponent in a wraps a @see TreeSelector. DO NOT SET A TreeSelectorCallback TO THE THE TreeSelector. IT WILL BE REPLACED.
Parameters:
selector - the TreeSelector to be used
Method Detail

init

public void init()
Not used

setTreeLabelProvider

public void setTreeLabelProvider(org.eclipse.jface.viewers.ILabelProvider labelProvider)
Delegation method. @see TreeSelector#setTreeLabelProvider(ILabelProvider)
Parameters:
labelProvider -  

setTreeContentProvider

public void setTreeContentProvider(org.eclipse.jface.viewers.ITreeContentProvider contentProvider)
Delegation method. @see TreeSelector#setTreeContentProvider(ITreeContentProvider)
Parameters:
contentProvider -  

setTreeInput

public void setTreeInput(java.lang.Object obj)
Delegation method. @see TreeSelector#setTreeInput(Object)
Parameters:
obj -  

setReusableManager

public void setReusableManager(IReuseableManager reusableManager)
Delegation method. @see TreeSelector#setReusableManager(IReuseableManager)
Parameters:
reusableManager -  

setViewerSorter

public void setViewerSorter(org.eclipse.jface.viewers.ViewerSorter sorter)
Delegation method. @see TreeSelector#setViewerSorter(ViewerSorter)
Parameters:
sorter -  

setEditable

public void setEditable(boolean editable)
Delegation method. @see TreeSelector#setEditable(boolean editable)
Parameters:
editable - false if read only

isEditable

public boolean isEditable()
Delegation method. @see TreeSelector#isEditable()

setModifiedCallback

public void setModifiedCallback(IModifiedCallback callback)
Hook on data modification in right side editor. (May be used for activation/deactivation of save button...)
Parameters:
callback - @see IModifiedCallback

setAddRemoveCallback

public void setAddRemoveCallback(IAddRemoveCallback callback)
The TreeSelectorCallback of the used @see TreeSelector will be handled TreeSelectorEditorComponent. IT MUST NOT BE SET TO THE UNDERLYING TREESELECTOR. The handling of "Add"/"Remove" action has to be done in the specified @see IAddRemoveCallback
Parameters:
callback -  

getSelectionConverter

public ISelectionConverter getSelectionConverter()
Delegation method. @see TreeSelector#getSelectionConverter()
Returns:
 

setSelectionConverter

public void setSelectionConverter(ISelectionConverter selectionConverter)
Delegation method. @see TreeSelector#setSelectionConverter(ISelectionConverter)
Parameters:
selectionConverter -  

setSelection

public void setSelection(java.lang.Object objToSelect)
Delegation method. @see TreeSelector#setSelection(Object)
Parameters:
objToSelect -  

getTreeSelector

public TreeSelector getTreeSelector()
Returns the used/wrapped TreeSelector
Returns:
 

refreshTree

public void refreshTree()
Delegation method. @see TreeSelector#refreshTree()

refreshTree

public void refreshTree(boolean refreshLabels)
Delegation method. @see TreeSelector#refreshTree(boolean)
Parameters:
refreshLabels -  

aboutToLeave

public void aboutToLeave()
Inform the component that it will be closed/disabled The current right side @see IObjectEditorComponent will be told to update it's data

okToLeave

public java.lang.String okToLeave()
Delegation method. @see IObjectEditorComponent#okToLeave()
Returns:
when a @see IObjectEditorComponent is currently shown on the right side it's leaving staus will be returned. null otherwise

isRefreshAfterSelectionChange

public boolean isRefreshAfterSelectionChange()
Returns:
boolean
See Also:
setRefreshAfterSelectionChange(boolean)

setRefreshAfterSelectionChange

public void setRefreshAfterSelectionChange(boolean refreshAfterSelectionChange)
Editing an Object may change the structure in the tree (Or maybe the icon of an Object) Setting this flag will cause a refreshing of the tree after every selection change in the tree.
Parameters:
refreshAfterSelectionChange - The refreshAfterSelectionChange to set


Copyright © 2005 SAP AG. All Rights Reserved.