Class GridItemDataVisualizer

java.lang.Object
org.eclipse.nebula.widgets.grid.GridItemDataVisualizer
All Implemented Interfaces:
DataVisualizer

public class GridItemDataVisualizer
extends java.lang.Object
implements DataVisualizer
This implementation of DataVisualizer is the default for Grid when no custom implementation has been provided. This class is used to provide general visualization values for various aspects of the GridItem like background, font and text. Your own subclass of this class could be used in combination with the JFace LabelProvider if you use the GridViewer. This implementation is preferable in the case where there are more rows than columns.
  • Constructor Summary

    Constructors 
    Constructor Description
    GridItemDataVisualizer​(org.eclipse.swt.graphics.Color defaultBackground, org.eclipse.swt.graphics.Color defaultForeground, org.eclipse.swt.graphics.Font defaultFont)
    Create GridItemDataVisualizer with default value
  • Method Summary

    Modifier and Type Method Description
    void addColumn​(int column)
    Inserts a column on DataVisualizer
    void clearAll()
    Clear all data on DataVisualizer
    void clearColumn​(int column)
    Clear column dataVisualizer values
    void clearRow​(GridItem gridItem)
    In this implementation is too much expensive...
    org.eclipse.swt.graphics.Color getBackground​(GridItem gridItem, int column)
    Method substitute GridItem method
    boolean getCheckable​(GridItem gridItem, int column)
    Method substitute GridItem method
    boolean getChecked​(GridItem gridItem, int column)
    Method substitute GridItem method
    int getColumnSpan​(GridItem gridItem, int column)
    Method substitute GridItem method
    org.eclipse.swt.graphics.Color getDefaultBackground()  
    org.eclipse.swt.graphics.Font getDefaultFont()  
    org.eclipse.swt.graphics.Color getDefaultForeground()  
    org.eclipse.swt.graphics.Font getFont​(GridItem gridItem, int column)
    Method substitute GridItem method
    org.eclipse.swt.graphics.Color getForeground​(GridItem gridItem, int column)
    Method substitute GridItem method
    boolean getGrayed​(GridItem gridItem, int column)
    Method substitute GridItem method
    org.eclipse.swt.graphics.Image getImage​(GridItem gridItem, int column)
    Method substitute GridItem method
    int getRowSpan​(GridItem gridItem, int column)
    Method substitute GridItem method
    java.lang.String getText​(GridItem gridItem, int column)
    Method substitute GridItem method
    java.lang.String getToolTipText​(GridItem gridItem, int column)
    Method substitute GridItem method
    protected <T> T getValueOrDefault​(java.util.Map<GridItem,​java.util.List<T>> map, GridItem gridItem, int column, T defaultValue)
    get value or default
    protected <T> void put​(java.util.Map<GridItem,​java.util.List<T>> map, GridItem gridItem, int column, T value)
    put value on maps
    protected <T> void removeInvertIndex​(java.util.Map<GridItem,​java.util.List<T>> map, int column)
    Remove in revertIndex
    void setBackground​(GridItem gridItem, int column, org.eclipse.swt.graphics.Color color)
    Method substitute GridItem method
    void setCheckable​(GridItem gridItem, int column, boolean checked)
    Method substitute GridItem method
    void setChecked​(GridItem gridItem, int column, boolean checked)
    Method substitute GridItem method
    void setColumnSpan​(GridItem gridItem, int column, int span)
    Method substitute GridItem method
    void setDefaultBackground​(org.eclipse.swt.graphics.Color defaultBackground)
    set default background
    void setDefaultFont​(org.eclipse.swt.graphics.Font defaultFont)
    set default font
    void setDefaultForeground​(org.eclipse.swt.graphics.Color defaultForeground)
    set default foreground
    void setFont​(GridItem gridItem, int column, org.eclipse.swt.graphics.Font font)
    Method substitute GridItem method
    void setForeground​(GridItem gridItem, int column, org.eclipse.swt.graphics.Color foreground)
    Method substitute GridItem method
    void setGrayed​(GridItem gridItem, int column, boolean grayed)
    Method substitute GridItem method
    void setImage​(GridItem gridItem, int column, org.eclipse.swt.graphics.Image image)
    Method substitute GridItem method
    void setRowSpan​(GridItem gridItem, int column, int span)
    Method substitute GridItem method
    void setText​(GridItem gridItem, int column, java.lang.String text)
    Method substitute GridItem method
    void setToolTipText​(GridItem gridItem, int column, java.lang.String tooltip)
    Method substitute GridItem method

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait