Class TableViewerSWTBuilder

    • Constructor Detail

      • TableViewerSWTBuilder

        protected TableViewerSWTBuilder​(org.eclipse.swt.widgets.Composite composite,
                                        int swtStyleBits,
                                        java.lang.Object input,
                                        org.eclipse.core.databinding.observable.value.IObservableValue title,
                                        org.eclipse.core.databinding.observable.value.IObservableValue tooltip)
        Parameters:
        composite - the parent Composite
        swtStyleBits - the swt style bits
        input - the input object
        title - the title
        tooltip - the tooltip
    • Method Detail

      • getComposite

        protected org.eclipse.swt.widgets.Composite getComposite()
        Returns:
        the composite
      • getSwtStyleBits

        protected int getSwtStyleBits()
        Returns:
        the swtStyleBits
      • getInput

        protected java.lang.Object getInput()
        Returns:
        the input
      • getTitle

        protected org.eclipse.core.databinding.observable.value.IObservableValue getTitle()
        Returns:
        the title
      • getTooltip

        protected org.eclipse.core.databinding.observable.value.IObservableValue getTooltip()
        Returns:
        the tooltip
      • customizeCompositeStructure

        public TableViewerSWTBuilder customizeCompositeStructure​(TableViewerCompositeBuilder builder)

        Use this method to customize the way title, validation, buttons and the tableviewer are arranged.

        The default implementation will create a title bar with title to left, a validation label in the middle and a button bar on the right. Below the title bar the viewer will be created

        Parameters:
        builder - the TableViewerCompositeBuilder
        Returns:
        self
      • customizeTableViewerCreation

        public TableViewerSWTBuilder customizeTableViewerCreation​(TableViewerCreator<? extends org.eclipse.jface.viewers.AbstractTableViewer> creator)

        Use this method to create the actual TableViewer.

        The default implementation will create a viewer with the SWT#MULTI, SWT#V_SCROLL, FULL_SELECTION and SWT#BORDER style bits. The table will show the header and will show lines.

        Parameters:
        creator - the TableViewerCreator
        Returns:
        self
      • customizeComparator

        public TableViewerSWTBuilder customizeComparator​(org.eclipse.jface.viewers.ViewerComparator comparator)

        Use this method to set a ViewerComparator on the table.

        The default implementation does not add a comparator.

        Parameters:
        comparator - the ViewerComparator
        Returns:
        self
      • customizeContentProvider

        public TableViewerSWTBuilder customizeContentProvider​(org.eclipse.jface.viewers.IContentProvider provider)

        Use this method to set a different content provider on the viewer.

        The default implementation uses a ObservableListContentProvider.

        Parameters:
        provider - the IContentProvider to use
        Returns:
        self
      • customizeActionBar

        public TableViewerSWTBuilder customizeActionBar​(ActionBar<? extends org.eclipse.jface.viewers.Viewer> actionBar)

        Use this method to customize the way the button bar is filled.

        The default behavior will not add any buttons.

        Parameters:
        actionBar - the ActionBar
        Returns:
        self
      • customizeActionConfiguration

        public TableViewerSWTBuilder customizeActionConfiguration​(ActionConfiguration actionConfiguration)

        Use this method to customize the key bindings for the table viewer.

        The default behavior will not register any bindings.

        Parameters:
        actionConfiguration - the ActionConfiguration
        Returns:
        self
      • customizeDragAndDrop

        public TableViewerSWTBuilder customizeDragAndDrop​(DNDProvider provider)

        Use this method to customize drag&drop.

        The default behaviour disables drag&drop.

        Parameters:
        provider - the provider
        Returns:
        self
      • showHideColumns

        public TableViewerSWTBuilder showHideColumns​(boolean showHideColumns)
        Set whether support for users to show and hide columns is installed.
        Parameters:
        showHideColumns - true to enable showing and hiding of columns; false to disable it
        Returns:
        this builder, for fluent chaining
        Since:
        1.21
      • columnSubstringFilter

        public TableViewerSWTBuilder columnSubstringFilter​(boolean columnSubstringFilter)
        Set whether support for users to show a simple substring-matching filter on columns is installed.
        Parameters:
        columnSubstringFilter - true to enable the substring filter; false to disable it
        Returns:
        this builder, for fluent chaining
        Since:
        1.21
      • columnRegexFilter

        public TableViewerSWTBuilder columnRegexFilter​(boolean columnRegexFilter)
        Set whether support for users to show a regular expression filter on columns is installed.
        Parameters:
        columnRegexFilter - true to enable the regex filter; false to disable it
        Returns:
        this builder, for fluent chaining
        Since:
        1.21