Class DtTreeView

    • Field Detail

      • TREE_VIEWER_KEY

        protected static final String TREE_VIEWER_KEY
    • Constructor Detail

      • DtTreeView

        public DtTreeView()
    • 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 class SwtStandardView<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 class SwtStandardView<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
        Handles FocusEvent.
        Overrides:
        handleFocusEvent in class SwtView<TreeViewModel,​org.eclipse.swt.widgets.Composite>
        Parameters:
        event - the focus event, cannot be null.
        viewModel - the view model, cannot be null.
        control - the native control, cannot be null.
      • handleEventChannelEvent

        protected void handleEventChannelEvent​(IEvent event,
                                               TreeViewModel viewModel,
                                               org.eclipse.swt.widgets.Composite control)
        Description copied from class: View
        Handles events from IEventChannel. By default handles only focus events.
        Overrides:
        handleEventChannelEvent in class View<SwtRenderingParameters,​TreeViewModel,​org.eclipse.swt.widgets.Composite>
        Parameters:
        event - the event, cannot be null.
        viewModel - the view model, cannot be null.
        control - the control, cannot be null.
      • creareTreeViewer

        protected TreeViewer creareTreeViewer​(org.eclipse.swt.widgets.Composite composite)
        Creates a tree viewer.
        Parameters:
        composite - the parent composite, cannot be null
        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 be null
        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 be null
        treeViewer - the tree viewer, cannot be null
        provider - the label provider, cannot be null
      • configureTree

        protected void configureTree​(TreeViewer treeViewer,
                                     TreeViewModel viewModel)
        Configure created tree.
        Parameters:
        treeViewer - the tree viewer, cannot be null
        viewModel - the view model, cannot be null