Interface IColumn<T,V,R extends IColumn<T,V,R>>

All Known Subinterfaces:
IEditableColumn<T,V,R>, IEMFColumn<T,V,R>
All Known Implementing Classes:
Column, EditableColumn, EmfColumn, TableColumn, TableViewerColumnDescriptor, TreeColumn, TreeViewerColumnDescriptor, ViewerColumnDescriptor

public interface IColumn<T,V,R extends IColumn<T,V,R>>
Column interface for displaying data. Provides a set of methods for displaying data
Author:
Ionov Ivan
  • Method Details

    • getViewerColumn

      org.eclipse.jface.viewers.ViewerColumn getViewerColumn()
      Return the current ViewerColumn of the column
      Returns:
      the current ViewerColumn of the column
    • setViewerColumn

      void setViewerColumn(org.eclipse.jface.viewers.ViewerColumn viewerColumn)
      Set the new ViewerColumn to the column
      Parameters:
      viewerColumn - new ViewerColumn
    • addContextMenuHandler

      R addContextMenuHandler(Column.ContextMenuHandler<T,V> handler)
      Adds a new ContextMenuHandler to the list handlers
      Parameters:
      handler - Provides an API for creating a pop-up menu item for a column
      Returns:
      this column
    • removeContextMenuHandler

      R removeContextMenuHandler(Column.ContextMenuHandler<T,V> handler)
      Removes a previously added ContextMenuHandler from the list handlers
      Parameters:
      handler - Provides an API for creating a pop-up menu item for a column
      Returns:
      this column
    • getContextMenuHandlers

      List<Column.ContextMenuHandler<T,V>> getContextMenuHandlers()
      Returns a list context menu handlers
      Returns:
      list of ContextMenuHandler
    • setDoubleClickHandler

      R setDoubleClickHandler(BiConsumer<T,org.eclipse.swt.widgets.Event> doubleClickHandler)
      Set the double click handler
      Parameters:
      doubleClickHandler - Provides API for handling double click on a column
      Returns:
      this column
    • removeDoubleClickHandler

      R removeDoubleClickHandler()
      Remove the doubleClickHandler
      Returns:
      this column
    • getDoubleClickHandler

      BiConsumer<T,org.eclipse.swt.widgets.Event> getDoubleClickHandler()
      Return the doubleClickHandler
      Returns:
      doubleClickHandler
    • visible

      R visible(BooleanSupplier visibility)
      Set the visibility function
      Parameters:
      visibility - Provides an API to control column visibility
    • isVisible

      boolean isVisible()
      Return boolean value.
      Returns:
      boolean
    • getToolTipText

      String getToolTipText()
      Returns the tool tip for this column.
      Returns:
      string tool tip for this column
    • tooltip

      R tooltip(String toolTipText)
      Set tool tip for this column
      Parameters:
      toolTipText -
      Returns:
      this column
    • getPseudoHistogramColor

      BiFunction<T,V,Color> getPseudoHistogramColor()
      Returns a function to get the color for the pseudoHistogram
      Returns:
      function to get the color for the pseudoHistogram
    • pseudoHistogramColor

      R pseudoHistogramColor(Color color)
      Set color for the pseudoHistogram
      Parameters:
      color - for the pseudoHistogram
      Returns:
      this column
    • pseudoHistogramColor

      R pseudoHistogramColor(Function<T,Color> colorExtractor)
      Set function to get the color for the pseudoHistogram
      Parameters:
      colorExtractor - function to get the color for the pseudoHistogram
      Returns:
      this column
    • pseudoHistogramColor

      R pseudoHistogramColor(BiFunction<T,V,Color> colorExtractor)
      Set function to get the color for the pseudoHistogram
      Parameters:
      colorExtractor - function to get the color for the pseudoHistogram
      Returns:
      this column
    • getBackgroundColor

      BiFunction<T,V,Accumulator<Color>> getBackgroundColor()
      Returns a function to get the color for the background
      Returns:
      function to get the color for the background
    • backgroundColor

      R backgroundColor(Color color)
      Set color for the background
      Parameters:
      color - for the background
      Returns:
      this column
    • backgroundColor

      R backgroundColor(Function<T,Color> colorExtractor)
      Set function to get the color for the background
      Parameters:
      colorExtractor - function to get the color for the background
      Returns:
      this column
    • backgroundColor

      R backgroundColor(BiFunction<T,V,Accumulator<Color>> colorExtractor)
      Set function to get the color for the background
      Parameters:
      colorExtractor - function to get the color for the background
      Returns:
      this column
    • getFontColor

      BiFunction<T,V,Color> getFontColor()
      Returns a function to get the color for the font
      Returns:
      color for the font
    • fontColor

      R fontColor(Color color)
      Set color for the font
      Parameters:
      color - for the font
      Returns:
      this column
    • fontColor

      R fontColor(Function<T,Color> colorExtractor)
      Set function to get the color for the font
      Parameters:
      colorExtractor - function to get the color for the font
      Returns:
      this column
    • fontColor

      R fontColor(BiFunction<T,V,Color> colorExtractor)
      Set function to get the color for the font
      Parameters:
      colorExtractor - function to get the color for the font
      Returns:
      this column
    • getFont

      BiFunction<T,V,org.eclipse.swt.graphics.Font> getFont()
      Returns a function to get the font for the column
      Returns:
      function to get the font for the column
    • font

      R font(org.eclipse.swt.graphics.Font font)
      Set font for the column
      Parameters:
      font - for the column
      Returns:
      this column
    • font

      R font(Function<T,org.eclipse.swt.graphics.Font> fontExtractor)
      Set function to get the font for the column
      Parameters:
      fontExtractor - function to get the font for the column
      Returns:
      this column
    • font

      R font(BiFunction<T,V,org.eclipse.swt.graphics.Font> fontExtractor)
      Set function to get the font for the column
      Parameters:
      fontExtractor - function to get the font for the column
      Returns:
      this column
    • getFormat

      BiFunction<T,V,String> getFormat()
      Returns a function to get the "label" for the cell
      Returns:
      function to get the "label" for the cell
    • format

      R format(String value)
      Set "label" for the cell
      Returns:
      this column
    • format

      R format(Function<V,String> format)
      Set function to get the "label" for the cell
      Parameters:
      format - function to get the font for the cell
      Returns:
      this column
    • format

      R format(BiFunction<T,V,String> format)
      Set function to get the "label" for the cell
      Parameters:
      format - function to get the font for the cell
      Returns:
      this column
    • nullValueText

      R nullValueText(String nullValueText)
      Set nullValueText will be used as a cell label if it equal null
      Parameters:
      nullValueText - String will be used as a cell label if it equal null
      Returns:
      this column
    • getNullValueText

      String getNullValueText()
      String will be used as a cell label if it equal null
      Returns:
      nullValueText String will be used as a cell label if it equal null
    • getIcon

      BiFunction<T,V,org.eclipse.swt.graphics.Image> getIcon()
      Returns a function to get the icon for the cell
      Returns:
      function to get the icon for the cell
    • icon

      R icon(org.eclipse.swt.graphics.Image icon)
      Set icon for the cell
      Returns:
      this column
    • headerIcon

      R headerIcon(org.eclipse.swt.graphics.Image icon)
      Set icon for the column
      Returns:
      this column
    • icon

      R icon(Function<T,org.eclipse.swt.graphics.Image> iconExtractor)
      Set function to get the icon for the cell
      Parameters:
      iconExtractor - function to get the icon for the cell
      Returns:
      this column
    • icon

      R icon(BiFunction<T,V,org.eclipse.swt.graphics.Image> iconExtractor)
      Set function to get the icon for the cell
      Parameters:
      iconExtractor - function to get the icon for the cell
      Returns:
      this column
    • comparator

      R comparator(Comparator<T> comparator)
      Add a comparator that is used to sort values in this column
      Returns:
      this column
    • getComparator

      Comparator<T> getComparator()
      Return comparator in this column
    • getValueExtractor

      Function<T,V> getValueExtractor()
      Returns a function that extracts a value from a row value for a column
    • getColumnViewer

      org.eclipse.jface.viewers.ColumnViewer getColumnViewer()
      Returns a ColumnViewer
    • getParent

      org.eclipse.swt.widgets.Composite getParent()
      Returns a parent Composite
    • invalidateEditors

      void invalidateEditors()
      Updates buttons created on top of the table if they exist
    • getColumnIndex

      int getColumnIndex()
      Calculates and returns the current column index
    • getVisibleColumnIndex

      int getVisibleColumnIndex()
      Calculates and returns the current visual position of this column in the UI after any column reordering by the user.

      This index reflects the visual position after any column reordering by the user, unlike the logical index returned by getColumnIndex().

      Returns:
      the visible column index
      See Also:
    • getName

      String getName()
      Returns the column name
    • name

      R name(String name)
      Set the column name
      Returns:
      this column
    • getWidth

      int getWidth()
      Returns the column width
    • getActualWidth

      int getActualWidth()
      Calculates and returns the current column width
    • width

      R width(int width)
      Set the column width
      Returns:
      this column
    • moveable

      R moveable(boolean moveable)
      Sets whether this column can be moved by the user in the UI.

      Default value: false (columns are fixed by default)

      Parameters:
      moveable - true to enable column reordering by user, false to make column position fixed
      Returns:
      this column
      See Also: