public final class TreeMasterDetailSWTBuilder extends Object
Modifier and Type | Method and Description |
---|---|
TreeMasterDetailComposite |
create()
Call this method after all desired customizations have been passed to the builder.
|
TreeMasterDetailSWTBuilder |
customizeCildCreation(CreateElementCallback createElementCallback)
Use this method to customize the
Menu which is shown when an element in the
tree is right-clicked. |
TreeMasterDetailSWTBuilder |
customizeContentProvider(ContentProviderProvider contentProvider)
Use this method to set a custom
IContentProvider on the tree
viewer. |
TreeMasterDetailSWTBuilder |
customizeContentProvider(org.eclipse.jface.viewers.IContentProvider contentProvider)
Use this method to set a custom
IContentProvider on the tree
viewer. |
TreeMasterDetailSWTBuilder |
customizeDelete(DeleteActionBuilder deleteActionBuilder)
Use this method to customize the
Menu which is shown when an element in the
tree is right-clicked. |
TreeMasterDetailSWTBuilder |
customizeDetailComposite(DetailCompositeBuilder detailComposite)
Use this method to create the parent composite, which will contain the detail composite.
|
TreeMasterDetailSWTBuilder |
customizeDragAndDrop(DNDProvider dnd)
Use this method to add a customized drag and drop behaviour to the tree or to remove drag and drop functionality.
|
TreeMasterDetailSWTBuilder |
customizeInitialSelection(InitialSelectionProvider selection)
Use this method to customize which element should be selected after the initial rendering.
|
TreeMasterDetailSWTBuilder |
customizeInitialTreeWidth(int width)
Use this method to influence the width of the composite which hosts the
TreeViewer . |
TreeMasterDetailSWTBuilder |
customizeLabelDecorator(org.eclipse.jface.viewers.ILabelDecorator decorator)
Use this method to add a
ILabelDecorator for decorating the labels of the label provider. |
TreeMasterDetailSWTBuilder |
customizeLabelDecorator(LabelDecoratorProvider provider)
Use this method to add a
ILabelDecorator for decorating the labels of the label provider. |
TreeMasterDetailSWTBuilder |
customizeLabelProvider(org.eclipse.jface.viewers.IBaseLabelProvider provider)
Use this method a add a custom
IBaseLabelProvider to the
tree. |
TreeMasterDetailSWTBuilder |
customizeLabelProvider(LabelProviderProvider provider)
Use this method a add a custom
IBaseLabelProvider to the
tree. |
TreeMasterDetailSWTBuilder |
customizeMenu(MenuProvider menu)
Use this method to customize the
Menu which is shown when an element in the
tree is right-clicked. |
TreeMasterDetailSWTBuilder |
customizeMenuItems(Collection<MasterDetailAction> rightClickActions)
Use this method to customize the
Menu which is shown when an element in the
tree is right-clicked. |
TreeMasterDetailSWTBuilder |
customizeTree(TreeViewerBuilder tree)
Use this method to create the
TreeViewer which is part of the tree
master detail. |
TreeMasterDetailSWTBuilder |
customizeUpdateDelay(int updateDelay)
Use this method to specify the time between a detected selection change and updating the detail panel.
|
TreeMasterDetailSWTBuilder |
customizeViewerFilters(org.eclipse.jface.viewers.ViewerFilter[] filters)
Use this method to add
ViewerFilters on the tree. |
TreeMasterDetailSWTBuilder |
customizeViewModelServices(ViewModelServiceProvider viewServiceProvider)
Use this method to specify which
ViewModelServices
will be added when the detail views
are rendered. |
public TreeMasterDetailSWTBuilder customizeContentProvider(ContentProviderProvider contentProvider)
IContentProvider
on the tree
viewer. The default implementation will use
an AdapterFactoryContentProvider
.contentProvider
- the desired behaviorpublic TreeMasterDetailSWTBuilder customizeContentProvider(org.eclipse.jface.viewers.IContentProvider contentProvider)
IContentProvider
on the tree
viewer. If the content provider requires more dispose code than calling IContentProvider.dispose()
use
customizeContentProvider(ContentProviderProvider)
instead. The default implementation will use
an AdapterFactoryContentProvider
.contentProvider
- the content provider to addpublic TreeMasterDetailSWTBuilder customizeDetailComposite(DetailCompositeBuilder detailComposite)
ScrolledComposite
which allows
vertical and horizontal scrolling.detailComposite
- the desired behaviorpublic TreeMasterDetailSWTBuilder customizeDragAndDrop(DNDProvider dnd)
DND#DROP_COPY
,
DND#DROP_MOVE
and DND#DROP_LINK
based
on EMF Edit.dnd
- the desired behaviorpublic TreeMasterDetailSWTBuilder customizeLabelProvider(LabelProviderProvider provider)
IBaseLabelProvider
to the
tree. The default implementation uses an
AdapterFactoryLabelProvider
.provider
- the desired behaviorpublic TreeMasterDetailSWTBuilder customizeLabelProvider(org.eclipse.jface.viewers.IBaseLabelProvider provider)
IBaseLabelProvider
to the
tree. If the label provider requires more dispose code than a call to IBaseLabelProvider.dispose()
use
customizeLabelProvider(LabelProviderProvider)
instead. The default implementation uses an
AdapterFactoryLabelProvider
.provider
- the label provider to addpublic TreeMasterDetailSWTBuilder customizeLabelDecorator(LabelDecoratorProvider provider)
ILabelDecorator
for decorating the labels of the label provider. The default
implementation does not use a decorator.provider
- the LabelDecoratorProvider
which will be used to create the decoratorpublic TreeMasterDetailSWTBuilder customizeLabelDecorator(org.eclipse.jface.viewers.ILabelDecorator decorator)
ILabelDecorator
for decorating the labels of the label provider. The default
implementation does not use a decorator.decorator
- the decorator instance to be usedpublic TreeMasterDetailSWTBuilder customizeMenu(MenuProvider menu)
Menu
which is shown when an element in the
tree is right-clicked. The
default implementation will offer menu entries to create new elements based on EMF Edit and to delete elements.menu
- the desired behaviorpublic TreeMasterDetailSWTBuilder customizeMenuItems(Collection<MasterDetailAction> rightClickActions)
Menu
which is shown when an element in the
tree is right-clicked. Use this method to add additional menu entries.rightClickActions
- the additional right click actions which will be shown in the context menupublic TreeMasterDetailSWTBuilder customizeCildCreation(CreateElementCallback createElementCallback)
Menu
which is shown when an element in the
tree is right-clicked. Use this method to influence the way new children are created.createElementCallback
- a callback which gets notified when a new child is created. this allows to veto the
creation or to change the object to be addedpublic TreeMasterDetailSWTBuilder customizeDelete(DeleteActionBuilder deleteActionBuilder)
Menu
which is shown when an element in the
tree is right-clicked. Use this method to change the way elements are deleted.deleteActionBuilder
- the delete action which will be added to the context menupublic TreeMasterDetailSWTBuilder customizeInitialSelection(InitialSelectionProvider selection)
selection
- the desired behaviorpublic TreeMasterDetailSWTBuilder customizeTree(TreeViewerBuilder tree)
TreeViewer
which is part of the tree
master detail. The default
implementation creates a regular TreeViewer
with an
expand
level
of 3.tree
- the desired behaviorpublic TreeMasterDetailSWTBuilder customizeInitialTreeWidth(int width)
TreeViewer
. The default is 300px.width
- the desired widthpublic TreeMasterDetailSWTBuilder customizeViewerFilters(org.eclipse.jface.viewers.ViewerFilter[] filters)
ViewerFilters
on the tree. The default
implementation does not add
filters.filters
- the filters to addpublic TreeMasterDetailSWTBuilder customizeViewModelServices(ViewModelServiceProvider viewServiceProvider)
ViewModelServices
will be added when the detail views
are rendered. The default implementation does not add any services.viewServiceProvider
- the desired behaviorpublic TreeMasterDetailSWTBuilder customizeUpdateDelay(int updateDelay)
updateDelay
- the new update delay in mspublic TreeMasterDetailComposite create()
TreeMasterDetailComposite
with the desired customizations.TreeMasterDetailComposite
Copyright © 2019. All rights reserved.