Class DtTreeView
- java.lang.Object
-
- com._1c.g5.aef2.views.View<SwtRenderingParameters,VM,NC>
-
- com._1c.g5.aef2.swt.views.SwtView<VM,NC>
-
- com._1c.g5.aef2.standard.swt.views.SwtStandardView<TreeViewModel,org.eclipse.swt.widgets.Composite>
-
- com._1c.g5.v8.dt.ui.aef.swt.views.DtTreeView
-
- All Implemented Interfaces:
IView<SwtRenderingParameters,TreeViewModel,org.eclipse.swt.widgets.Composite>
- Direct Known Subclasses:
CommonAttributeContentSwtView
,ConfigurationStandaloneContentSwtTreeView
,ExchangePlanContentSwtTreeView
,PredefinedDataSwtView
public class DtTreeView extends SwtStandardView<TreeViewModel,org.eclipse.swt.widgets.Composite>
The DT tree view with optional search box. It has multiple displaying and behavior options that is pointed through view model.- See Also:
DtTreeViewProvider
,TreeViewModel
,IAefTreeContentProvider
-
-
Field Summary
Fields Modifier and Type Field Description protected static String
TREE_VIEWER_KEY
-
Constructor Summary
Constructors Constructor Description DtTreeView()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
bind(TreeViewModel viewModel, org.eclipse.swt.widgets.Composite nativeControl)
Binds the view model and native control together to this view.protected void
configureTree(TreeViewer treeViewer, TreeViewModel viewModel)
Configure created tree.protected TreeViewer
creareTreeViewer(org.eclipse.swt.widgets.Composite composite)
Creates a tree viewer.protected void
createColumns(TreeViewModel viewModel, TreeViewer treeViewer, CellLabelProvider labelProvider)
Create columns for the tree.org.eclipse.swt.widgets.Composite
createControl(org.eclipse.swt.widgets.Composite parent, TreeViewModel viewModel)
Creates a native control for the view without decorations.protected DtTreeViewProvider
createTreeViewProvider(TreeViewer treeViewer)
Creates a tree viewer provider.protected void
handleEventChannelEvent(IEvent event, TreeViewModel viewModel, org.eclipse.swt.widgets.Composite control)
Handles events fromIEventChannel
.protected void
handleFocusEvent(FocusEvent event, TreeViewModel viewModel, org.eclipse.swt.widgets.Composite control)
HandlesFocusEvent
.-
Methods inherited from class com._1c.g5.aef2.standard.swt.views.SwtStandardView
createNativeControl, setEnabledApperance
-
Methods inherited from class com._1c.g5.aef2.swt.views.SwtView
computeNativeStyle, getContentControl, isControlDisposed, setContentControl, uiAsyncExec, uiSyncExec
-
Methods inherited from class com._1c.g5.aef2.views.View
bindListener, bindNativeControl, bindValue, bindValue, bindViewModel, getNativeControl, getParameters, getViewModel, initialize, manageObservable, queueAndWaitEvent, queueEvent, registerEventChannelListener, unbind, unbindNativeControl, unbindViewModel, unmanageObservable, unregisterEventChannelListener
-
-
-
-
Field Detail
-
TREE_VIEWER_KEY
protected static final String TREE_VIEWER_KEY
-
-
Method Detail
-
bind
public void bind(TreeViewModel viewModel, org.eclipse.swt.widgets.Composite nativeControl)
Description copied from class:View
Binds the view model and native control together to this view. Override this method to customize the binding.- Overrides:
bind
in classSwtStandardView<TreeViewModel,org.eclipse.swt.widgets.Composite>
- Parameters:
viewModel
- the view model to bind.nativeControl
- the native control to bind.
-
createControl
public org.eclipse.swt.widgets.Composite createControl(org.eclipse.swt.widgets.Composite parent, TreeViewModel viewModel)
Description copied from class:SwtStandardView
Creates a native control for the view without decorations.- Specified by:
createControl
in classSwtStandardView<TreeViewModel,org.eclipse.swt.widgets.Composite>
- Parameters:
parent
- the parent composite to place a control in.viewModel
- the view mode to create a control for.- Returns:
- the newly created control
-
handleFocusEvent
protected void handleFocusEvent(FocusEvent event, TreeViewModel viewModel, org.eclipse.swt.widgets.Composite control)
Description copied from class:View
HandlesFocusEvent
.- Overrides:
handleFocusEvent
in classSwtView<TreeViewModel,org.eclipse.swt.widgets.Composite>
- Parameters:
event
- the focus event, cannot benull
.viewModel
- the view model, cannot benull
.control
- the native control, cannot benull
.
-
handleEventChannelEvent
protected void handleEventChannelEvent(IEvent event, TreeViewModel viewModel, org.eclipse.swt.widgets.Composite control)
Description copied from class:View
Handles events fromIEventChannel
. By default handles only focus events.- Overrides:
handleEventChannelEvent
in classView<SwtRenderingParameters,TreeViewModel,org.eclipse.swt.widgets.Composite>
- Parameters:
event
- the event, cannot benull
.viewModel
- the view model, cannot benull
.control
- the control, cannot benull
.
-
creareTreeViewer
protected TreeViewer creareTreeViewer(org.eclipse.swt.widgets.Composite composite)
Creates a tree viewer.- Parameters:
composite
- the parent composite, cannot benull
- Returns:
- the tree viewer, never
null
-
createTreeViewProvider
protected DtTreeViewProvider createTreeViewProvider(TreeViewer treeViewer)
Creates a tree viewer provider.- Parameters:
treeViewer
- the tree viewer to create provider for, cannot benull
- Returns:
- the tree viewer provider, never
null
-
createColumns
protected void createColumns(TreeViewModel viewModel, TreeViewer treeViewer, CellLabelProvider labelProvider)
Create columns for the tree. Default implementation creates single column with configured label provider.- Parameters:
viewModel
- the view model, cannot benull
treeViewer
- the tree viewer, cannot benull
provider
- the label provider, cannot benull
-
configureTree
protected void configureTree(TreeViewer treeViewer, TreeViewModel viewModel)
Configure created tree.- Parameters:
treeViewer
- the tree viewer, cannot benull
viewModel
- the view model, cannot benull
-
-