Class DtTableView

    • Field Detail

      • TABLE_VIEWER_KEY

        protected static final String TABLE_VIEWER_KEY
      • SEARCH_BOX_KEY

        protected static final String SEARCH_BOX_KEY
      • MIN_SEARCH_PATTERN_LENGTH

        protected static final int MIN_SEARCH_PATTERN_LENGTH
        See Also:
        Constant Field Values
    • Constructor Detail

      • DtTableView

        public DtTableView()
    • Method Detail

      • bind

        public void bind​(TableViewModel 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<TableViewModel,​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,
                                                               TableViewModel viewModel)
        Description copied from class: SwtStandardView
        Creates a native control for the view without decorations.
        Specified by:
        createControl in class SwtStandardView<TableViewModel,​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
      • unbind

        public void unbind​(TableViewModel viewModel,
                           org.eclipse.swt.widgets.Composite nativeControl)
        Description copied from class: View
        Unbinds the view model and the native control from this view. Override this method to customize the unbinding.
        Overrides:
        unbind in class View<SwtRenderingParameters,​TableViewModel,​org.eclipse.swt.widgets.Composite>
        Parameters:
        viewModel - the view mode to unbind.
        nativeControl - the native control to unbind.
      • handleEventChannelEvent

        protected void handleEventChannelEvent​(IEvent event,
                                               TableViewModel 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,​TableViewModel,​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.
      • activateContexts

        protected void activateContexts​(TableViewModel viewModel)
        Activates view model contexts.
        Parameters:
        viewModel - the view model, cannot be null
      • createTable

        protected TableViewer createTable​(org.eclipse.swt.widgets.Composite parent,
                                          TableViewModel viewModel)
        Create table viewer according to the given AEF table view model.
        Parameters:
        parent - the parent composite to create table on, cannot be null
        viewModel - the AEF table view model, cannot be null
        Returns:
        a creted table viewer, never null
      • createTableViewProvider

        protected DtTableViewProvider createTableViewProvider​(TableViewer tableViewer,
                                                              TableViewModel viewModel)
        Creates table view provider.
        Parameters:
        tableViewer - the tabl viewer, cannot be null
        viewModel - the view model, cannot be null
        Returns:
        the table view provider, cannot be {@code null
      • configureTable

        protected void configureTable​(TableViewer tableViewer)
        Configure created table.
        Parameters:
        tableViewer - the table viewer, cannot be null
      • createColumns

        protected void createColumns​(TableViewModel viewModel,
                                     TableViewer tableViewer,
                                     CellLabelProvider labelProvider)
        Create columns for the table. Default implementation creates single column with configured label provider.
        Parameters:
        viewModel - the view model, cannot be null
        tableViewer - the table viewer, cannot be null
        provider - the label provider, cannot be null
      • deactivateContexts

        protected void deactivateContexts​(TableViewModel viewModel)
        Deactivates view model contexts.
        Parameters:
        viewModel - the view model, cannot be null
      • getChecked

        protected Collection<TableItemViewModel> getChecked​(TableViewer viewer,
                                                            TableViewModel viewModel,
                                                            TableItemViewModel itemViewModel)
        Returns checked elements in the table viewer.
        Parameters:
        viewer - the table viewer, cannot be null
        viewModel - the view model, cannot be null
        itemViewModel - the item with changed check state, cannot be null
        Returns:
        a collection of checked view model items, never null
      • handleTableItemSelection

        protected void handleTableItemSelection​(TableViewer viewer,
                                                TableViewModel viewModel,
                                                TableItemViewModel itemViewModel)
        Handle table item selection.
        Parameters:
        viewer - the table viewer, cannot be null
        viewModel - the view model, cannot be null
        itemViewModel - the item with changed check state, cannot be null