Class DefaultTreeMasterDetailCustomization
- java.lang.Object
-
- org.eclipse.emfforms.internal.swt.treemasterdetail.DefaultTreeViewerCustomization
-
- org.eclipse.emfforms.internal.swt.treemasterdetail.DefaultTreeMasterDetailCustomization
-
- All Implemented Interfaces:
ContentProviderProvider
,DetailCompositeBuilder
,Disposeable
,DNDProvider
,InitialSelectionProvider
,LabelDecoratorProvider
,LabelProviderProvider
,MenuProvider
,TreeMasterDetailSWTCustomization
,TreeReadOnlyProvider
,TreeViewerBuilder
,TreeViewerCustomization
,TreeWidthProvider
,ViewerFilterProvider
,ViewModelServiceProvider
- Direct Known Subclasses:
EcoreEditorTMDCustomization
,GenModelEditorTMDCustomization
public class DefaultTreeMasterDetailCustomization extends DefaultTreeViewerCustomization implements TreeMasterDetailSWTCustomization
Default implementation of theTreeMasterDetailSWTCustomization
.- Author:
- Johannes Faltermeier
-
-
Constructor Summary
Constructors Constructor Description DefaultTreeMasterDetailCustomization()
Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.eclipse.swt.widgets.Composite
createDetailComposite(org.eclipse.swt.widgets.Composite parent)
Called to create the detail composite on the right.boolean
enableVerticalCopy()
Defines whether the grid will allow to vertically copy values.int
getInitialTreeWidth()
Returns the initial width for the composite displaying the tree.ViewModelService[]
getViewModelServices(VView view, org.eclipse.emf.ecore.EObject eObject)
Returns newly created view model services which will be used when the given view for the given object is rendered.void
setDetailComposite(DetailCompositeBuilder detailComposite)
Sets the detail composite builder.void
setInitialTreeWidth(TreeWidthProvider width)
Sets the tree width provider.void
setViewModelServices(ViewModelServiceProvider viewServiceProvider)
Sets the view model services provider.-
Methods inherited from class org.eclipse.emfforms.internal.swt.treemasterdetail.DefaultTreeViewerCustomization
createTree, customizeMenu, customizeMenu, customizeMenu, dispose, getAdapterFactoryContentProvider, getComposedAdapterFactory, getContentProvider, getDragListener, getDragOperations, getDragTransferTypes, getDropListener, getDropOperations, getDropTransferTypes, getInitialSelection, getLabelDecorator, getLabelProvider, getMenu, getViewerFilters, hasDND, isReadOnly, setContentProvider, setDragAndDrop, setInitialSelection, setLabelDecorator, setLabelProvider, setMenu, setReadOnly, setTree, setViewerFilters
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.eclipse.emfforms.spi.swt.treemasterdetail.ContentProviderProvider
getContentProvider
-
Methods inherited from interface org.eclipse.emfforms.spi.swt.treemasterdetail.Disposeable
dispose
-
Methods inherited from interface org.eclipse.emfforms.spi.swt.treemasterdetail.DNDProvider
getDragListener, getDragOperations, getDragTransferTypes, getDropListener, getDropOperations, getDropTransferTypes, hasDND
-
Methods inherited from interface org.eclipse.emfforms.spi.swt.treemasterdetail.InitialSelectionProvider
getInitialSelection
-
Methods inherited from interface org.eclipse.emfforms.spi.swt.treemasterdetail.LabelDecoratorProvider
getLabelDecorator
-
Methods inherited from interface org.eclipse.emfforms.spi.swt.treemasterdetail.LabelProviderProvider
getLabelProvider
-
Methods inherited from interface org.eclipse.emfforms.spi.swt.treemasterdetail.MenuProvider
getMenu
-
Methods inherited from interface org.eclipse.emfforms.spi.swt.treemasterdetail.TreeReadOnlyProvider
isReadOnly
-
Methods inherited from interface org.eclipse.emfforms.spi.swt.treemasterdetail.TreeViewerBuilder
createTree
-
Methods inherited from interface org.eclipse.emfforms.spi.swt.treemasterdetail.ViewerFilterProvider
getViewerFilters
-
-
-
-
Method Detail
-
getInitialTreeWidth
public int getInitialTreeWidth()
Description copied from interface:TreeWidthProvider
Returns the initial width for the composite displaying the tree.- Specified by:
getInitialTreeWidth
in interfaceTreeWidthProvider
- Returns:
- the width in pixel
-
createDetailComposite
public org.eclipse.swt.widgets.Composite createDetailComposite(org.eclipse.swt.widgets.Composite parent)
Description copied from interface:DetailCompositeBuilder
Called to create the detail composite on the right.- Specified by:
createDetailComposite
in interfaceDetailCompositeBuilder
- Parameters:
parent
- the parent composite- Returns:
- the detail composite
-
getViewModelServices
public ViewModelService[] getViewModelServices(VView view, org.eclipse.emf.ecore.EObject eObject)
Description copied from interface:ViewModelServiceProvider
Returns newly created view model services which will be used when the given view for the given object is rendered.- Specified by:
getViewModelServices
in interfaceViewModelServiceProvider
- Parameters:
view
- the view to be renderedeObject
- the object to be rendered- Returns:
- the services
-
setDetailComposite
public void setDetailComposite(DetailCompositeBuilder detailComposite)
Sets the detail composite builder.- Parameters:
detailComposite
- the builder
-
setInitialTreeWidth
public void setInitialTreeWidth(TreeWidthProvider width)
Sets the tree width provider.- Parameters:
width
- the provider
-
setViewModelServices
public void setViewModelServices(ViewModelServiceProvider viewServiceProvider)
Sets the view model services provider.- Parameters:
viewServiceProvider
- the provider
-
enableVerticalCopy
public boolean enableVerticalCopy()
Defines whether the grid will allow to vertically copy values.- Specified by:
enableVerticalCopy
in interfaceDetailCompositeBuilder
- Returns:
- true if copy is allowed, false otherwise
- See Also:
DetailCompositeBuilder.enableVerticalCopy()
-
-