Interface ColumnConfiguration

  • All Known Implementing Classes:
    ColumnConfigurationImpl

    public interface ColumnConfiguration
    A ColumnConfiguration is used to configure how a viewer column shall be created and how it behaves during runtime.
    Author:
    Johannes Faltermeier, Mat Hansen
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      Optional<org.eclipse.jface.viewers.EditingSupport> createEditingSupport​(org.eclipse.jface.viewers.AbstractTableViewer columnViewer)
      Called to setup the EditingSupport for the viewer.
      org.eclipse.jface.viewers.CellLabelProvider createLabelProvider​(org.eclipse.jface.viewers.AbstractTableViewer columnViewer)
      The cell label provider which will be set on the column.
      void dispose()
      Dispose this configuration and all its properties.
      Optional<org.eclipse.swt.graphics.Image> getColumnImage()
      The image of the column.
      org.eclipse.core.databinding.observable.value.IObservableValue getColumnText()
      The header text for the column.
      org.eclipse.core.databinding.observable.value.IObservableValue getColumnTooltip()
      The column header tooltip text.
      java.util.List<ConfigurationCallback<org.eclipse.jface.viewers.AbstractTableViewer,​org.eclipse.jface.viewers.ViewerColumn>> getConfigurationCallbacks()
      Get the list of additional ConfigurationCallbacks.
      java.util.Map<java.lang.String,​java.lang.Object> getData()
      Get the underlying data map.
      java.lang.Object getData​(java.lang.String key)
      Get an arbitrary element from the data map.
      java.util.Set<Feature> getEnabledFeatures()
      Returns a static array of enabled features.
      int getMinWidth()
      The minimal width of the column.
      int getStyleBits()
      The SWT style bits which will be used to create the column.
      int getWeight()
      The weight of the column.
      boolean isMoveable()
      true if moveable, false otherwise.
      boolean isResizeable()
      true if resizeable, false otherwise.
      Property<java.lang.Object> matchFilter()
      Set a filter on the current column.
      void setData​(java.util.Map<java.lang.String,​java.lang.Object> data)
      Add the contents of the given map to the data map.
      Property<java.lang.Boolean> showFilterControl()
      Toggle the visible state of the filter control.
      Property<java.lang.Boolean> visible()
      Toggle the visible state of the column.
    • Field Detail

      • FEATURE_COLUMN_HIDE_SHOW

        static final Feature FEATURE_COLUMN_HIDE_SHOW
        Feature toggle for column hide/show support. Can be enabled on a per-column basis.
      • FEATURE_COLUMN_FILTER

        static final Feature FEATURE_COLUMN_FILTER
        Feature toggle for column filter support.
      • FEATURE_COLUMN_REGEX_FILTER

        static final Feature FEATURE_COLUMN_REGEX_FILTER
        Feature toggle for column filter support.
      • ALL_FEATURES

        static final java.util.Set<Feature> ALL_FEATURES
        All configurable features.
        Since:
        1.21
      • FEATURES

        @Deprecated
        static final Feature[] FEATURES
        Deprecated.
        Since 1.21, use the immutable ALL_FEATURES set instead of this, which can be modified in place.
        All configurable features.
      • RESIZABLE

        static final java.lang.String RESIZABLE
        Data key for resizable columns.
        See Also:
        Constant Field Values
      • WEIGHT

        static final java.lang.String WEIGHT
        Data key for column weight.
        See Also:
        Constant Field Values
      • MIN_WIDTH

        static final java.lang.String MIN_WIDTH
        Data key for the minimum width of the column.
        See Also:
        Constant Field Values
      • COLUMN_ID

        static final java.lang.String COLUMN_ID
        Data key for column id.
        See Also:
        Constant Field Values
      • DMR

        static final java.lang.String DMR
        Data key for a domain model reference.
        See Also:
        Constant Field Values
    • Method Detail

      • getEnabledFeatures

        java.util.Set<Feature> getEnabledFeatures()
        Returns a static array of enabled features.
        Returns:
        array of enabled features.
      • isResizeable

        boolean isResizeable()
        true if resizeable, false otherwise.
        Returns:
        whether the column is resizeable
      • isMoveable

        boolean isMoveable()
        true if moveable, false otherwise.
        Returns:
        whether the column is moveable
      • getStyleBits

        int getStyleBits()
        The SWT style bits which will be used to create the column.
        Returns:
        the SWT style bits for the column
      • getWeight

        int getWeight()
        The weight of the column.
        Returns:
        the weight of the column
      • getMinWidth

        int getMinWidth()
        The minimal width of the column.
        Returns:
        the min width of the column in pixels
      • getColumnText

        org.eclipse.core.databinding.observable.value.IObservableValue getColumnText()
        The header text for the column.
        Returns:
        the column header text
      • getColumnTooltip

        org.eclipse.core.databinding.observable.value.IObservableValue getColumnTooltip()
        The column header tooltip text.
        Returns:
        the column header tooltip
      • createLabelProvider

        org.eclipse.jface.viewers.CellLabelProvider createLabelProvider​(org.eclipse.jface.viewers.AbstractTableViewer columnViewer)
        The cell label provider which will be set on the column.
        Parameters:
        columnViewer - the column viewer
        Returns:
        the label provider
      • createEditingSupport

        Optional<org.eclipse.jface.viewers.EditingSupport> createEditingSupport​(org.eclipse.jface.viewers.AbstractTableViewer columnViewer)
        Called to setup the EditingSupport for the viewer.
        Parameters:
        columnViewer - the AbstractTableViewer
        Returns:
        the editing support for the column, if present
      • getColumnImage

        Optional<org.eclipse.swt.graphics.Image> getColumnImage()
        The image of the column.
        Returns:
        the column image, if present
      • getData

        java.lang.Object getData​(java.lang.String key)
        Get an arbitrary element from the data map.
        Parameters:
        key - (see constants)
        Returns:
        object
      • setData

        void setData​(java.util.Map<java.lang.String,​java.lang.Object> data)
        Add the contents of the given map to the data map.
        Parameters:
        data - object
      • getData

        java.util.Map<java.lang.String,​java.lang.Object> getData()
        Get the underlying data map.
        Returns:
        data map object
      • getConfigurationCallbacks

        java.util.List<ConfigurationCallback<org.eclipse.jface.viewers.AbstractTableViewer,​org.eclipse.jface.viewers.ViewerColumn>> getConfigurationCallbacks()
        Get the list of additional ConfigurationCallbacks.
        Returns:
        list of ConfigurationCallbacks.
      • visible

        Property<java.lang.Boolean> visible()
        Toggle the visible state of the column.
        Returns:
        visible property
      • showFilterControl

        Property<java.lang.Boolean> showFilterControl()
        Toggle the visible state of the filter control.
        Returns:
        visible property
      • matchFilter

        Property<java.lang.Object> matchFilter()
        Set a filter on the current column.
        Returns:
        visible property
      • dispose

        void dispose()
        Dispose this configuration and all its properties.