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 Summary
Modifier and TypeMethodDescriptionaddContextMenuHandler(Column.ContextMenuHandler<T, V> handler) Adds a new ContextMenuHandler to the list handlersbackgroundColor(Color color) Set color for the backgroundbackgroundColor(BiFunction<T, V, Accumulator<Color>> colorExtractor) Set function to get the color for the backgroundbackgroundColor(Function<T, Color> colorExtractor) Set function to get the color for the backgroundcomparator(Comparator<T> comparator) Add a comparator that is used to sort values in this columnfont(BiFunction<T, V, org.eclipse.swt.graphics.Font> fontExtractor) Set function to get the font for the columnSet function to get the font for the columnfont(org.eclipse.swt.graphics.Font font) Set font for the columnSet color for the fontfontColor(BiFunction<T, V, Color> colorExtractor) Set function to get the color for the fontSet function to get the color for the fontSet "label" for the cellformat(BiFunction<T, V, String> format) Set function to get the "label" for the cellSet function to get the "label" for the cellintCalculates and returns the current column widthReturns a function to get the color for the backgroundintCalculates and returns the current column indexorg.eclipse.jface.viewers.ColumnViewerReturns a ColumnViewerReturn comparator in this columnReturns a list context menu handlersBiConsumer<T, org.eclipse.swt.widgets.Event> Return the doubleClickHandlerBiFunction<T, V, org.eclipse.swt.graphics.Font> getFont()Returns a function to get the font for the columnReturns a function to get the color for the fontReturns a function to get the "label" for the cellBiFunction<T, V, org.eclipse.swt.graphics.Image> getIcon()Returns a function to get the icon for the cellgetName()Returns the column nameString will be used as a cell label if it equal nullorg.eclipse.swt.widgets.CompositeReturns a parent CompositeReturns a function to get the color for the pseudoHistogramReturns the tool tip for this column.Returns a function that extracts a value from a row value for a columnorg.eclipse.jface.viewers.ViewerColumnReturn the current ViewerColumn of the columnintCalculates and returns the current visual position of this column in the UI after any column reordering by the user.intgetWidth()Returns the column widthheaderIcon(org.eclipse.swt.graphics.Image icon) Set icon for the columnicon(BiFunction<T, V, org.eclipse.swt.graphics.Image> iconExtractor) Set function to get the icon for the cellSet function to get the icon for the cellicon(org.eclipse.swt.graphics.Image icon) Set icon for the cellvoidUpdates buttons created on top of the table if they existbooleanReturn boolean value.moveable(boolean moveable) Sets whether this column can be moved by the user in the UI.Set the column namenullValueText(String nullValueText) Set nullValueText will be used as a cell label if it equal nullpseudoHistogramColor(Color color) Set color for the pseudoHistogrampseudoHistogramColor(BiFunction<T, V, Color> colorExtractor) Set function to get the color for the pseudoHistogrampseudoHistogramColor(Function<T, Color> colorExtractor) Set function to get the color for the pseudoHistogramremoveContextMenuHandler(Column.ContextMenuHandler<T, V> handler) Removes a previously added ContextMenuHandler from the list handlersRemove the doubleClickHandlersetDoubleClickHandler(BiConsumer<T, org.eclipse.swt.widgets.Event> doubleClickHandler) Set the double click handlervoidsetViewerColumn(org.eclipse.jface.viewers.ViewerColumn viewerColumn) Set the new ViewerColumn to the columnSet tool tip for this columnvisible(BooleanSupplier visibility) Set the visibility functionwidth(int width) Set the column width
-
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
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
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
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
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
Set tool tip for this column- Parameters:
toolTipText-- Returns:
- this column
-
getPseudoHistogramColor
BiFunction<T,V, getPseudoHistogramColor()Color> Returns a function to get the color for the pseudoHistogram- Returns:
- function to get the color for the pseudoHistogram
-
pseudoHistogramColor
Set color for the pseudoHistogram- Parameters:
color- for the pseudoHistogram- Returns:
- this column
-
pseudoHistogramColor
Set function to get the color for the pseudoHistogram- Parameters:
colorExtractor- function to get the color for the pseudoHistogram- Returns:
- this column
-
pseudoHistogramColor
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, getBackgroundColor()Accumulator<Color>> Returns a function to get the color for the background- Returns:
- function to get the color for the background
-
backgroundColor
Set color for the background- Parameters:
color- for the background- Returns:
- this column
-
backgroundColor
Set function to get the color for the background- Parameters:
colorExtractor- function to get the color for the background- Returns:
- this column
-
backgroundColor
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, getFontColor()Color> Returns a function to get the color for the font- Returns:
- color for the font
-
fontColor
Set color for the font- Parameters:
color- for the font- Returns:
- this column
-
fontColor
Set function to get the color for the font- Parameters:
colorExtractor- function to get the color for the font- Returns:
- this column
-
fontColor
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, getFont()org.eclipse.swt.graphics.Font> Returns a function to get the font for the column- Returns:
- function to get the font for the column
-
font
Set font for the column- Parameters:
font- for the column- Returns:
- this column
-
font
Set function to get the font for the column- Parameters:
fontExtractor- function to get the font for the column- Returns:
- this column
-
font
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, getFormat()String> Returns a function to get the "label" for the cell- Returns:
- function to get the "label" for the cell
-
format
Set "label" for the cell- Returns:
- this column
-
format
Set function to get the "label" for the cell- Parameters:
format- function to get the font for the cell- Returns:
- this column
-
format
Set function to get the "label" for the cell- Parameters:
format- function to get the font for the cell- Returns:
- this column
-
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, getIcon()org.eclipse.swt.graphics.Image> Returns a function to get the icon for the cell- Returns:
- function to get the icon for the cell
-
icon
Set icon for the cell- Returns:
- this column
-
headerIcon
Set icon for the column- Returns:
- this column
-
icon
Set function to get the icon for the cell- Parameters:
iconExtractor- function to get the icon for the cell- Returns:
- this column
-
icon
Set function to get the icon for the cell- Parameters:
iconExtractor- function to get the icon for the cell- Returns:
- this column
-
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
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
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
Set the column width- Returns:
- this column
-
moveable
Sets whether this column can be moved by the user in the UI.Default value:
false(columns are fixed by default)- Parameters:
moveable-trueto enable column reordering by user,falseto make column position fixed- Returns:
- this column
- See Also:
-