Class CustomSelectionColorCellRenderer

  • All Implemented Interfaces:
    org.eclipse.nebula.widgets.grid.IInternalWidget, org.eclipse.nebula.widgets.grid.IRenderer

    public class CustomSelectionColorCellRenderer
    extends org.eclipse.nebula.widgets.grid.GridCellRenderer
    Copy of the Nebula Grid DefaultCellRenderer (temporary fix to be able to set the selection colors)
    • Field Summary

      • Fields inherited from class org.eclipse.nebula.widgets.grid.GridCellRenderer

        truncationStyle
      • Fields inherited from interface org.eclipse.nebula.widgets.grid.IInternalWidget

        LeftMouseButtonDown, MouseMove
    • Constructor Summary

      Constructors 
      Constructor Description
      CustomSelectionColorCellRenderer​(org.eclipse.swt.graphics.Color selectionForegroundColor, org.eclipse.swt.graphics.Color selectionBackgroundColor)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.eclipse.swt.graphics.Point computeSize​(org.eclipse.swt.graphics.GC gc, int wHint, int hHint, java.lang.Object value)
      org.eclipse.swt.graphics.Rectangle getTextBounds​(org.eclipse.nebula.widgets.grid.GridItem item, boolean preferred)
      boolean notify​(int event, org.eclipse.swt.graphics.Point point, java.lang.Object value)
      void paint​(org.eclipse.swt.graphics.GC gc, java.lang.Object value)
      void setCheck​(boolean check)
      void setSelectionBackgroundColor​(org.eclipse.swt.graphics.Color selectionBackgroundColor)  
      void setSelectionForegroundColor​(org.eclipse.swt.graphics.Color selectionForegroundColor)  
      void setTree​(boolean tree)
      • Methods inherited from class org.eclipse.nebula.widgets.grid.GridCellRenderer

        getAlignment, getColumn, getRow, getTruncationStyle, getVerticalAlignment, isCellFocus, isCellSelected, isCheck, isColumnHover, isDragging, isRowFocus, isRowHover, isTree, isWordWrap, setAlignment, setCellFocus, setCellSelected, setColumn, setColumnHover, setDragging, setRow, setRowFocus, setRowHover, setTruncationStyle, setVerticalAlignment, setWordWrap
      • Methods inherited from class org.eclipse.nebula.widgets.grid.AbstractInternalWidget

        getHoverDetail, setHoverDetail
      • Methods inherited from class org.eclipse.nebula.widgets.grid.AbstractRenderer

        getBounds, getDisplay, getSize, isExpanded, isFocus, isHover, isMouseDown, isSelected, setBounds, setBounds, setDisplay, setExpanded, setFocus, setHover, setLocation, setLocation, setMouseDown, setSelected, setSize, setSize
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface org.eclipse.nebula.widgets.grid.IRenderer

        setBounds, setBounds, setDisplay, setExpanded, setFocus, setHover, setLocation, setLocation, setMouseDown, setSelected, setSize, setSize
    • Constructor Detail

      • CustomSelectionColorCellRenderer

        public CustomSelectionColorCellRenderer​(org.eclipse.swt.graphics.Color selectionForegroundColor,
                                                org.eclipse.swt.graphics.Color selectionBackgroundColor)
    • Method Detail

      • paint

        public void paint​(org.eclipse.swt.graphics.GC gc,
                          java.lang.Object value)
      • computeSize

        public org.eclipse.swt.graphics.Point computeSize​(org.eclipse.swt.graphics.GC gc,
                                                          int wHint,
                                                          int hHint,
                                                          java.lang.Object value)
      • notify

        public boolean notify​(int event,
                              org.eclipse.swt.graphics.Point point,
                              java.lang.Object value)
      • setTree

        public void setTree​(boolean tree)
        Overrides:
        setTree in class org.eclipse.nebula.widgets.grid.GridCellRenderer
      • setCheck

        public void setCheck​(boolean check)
        Overrides:
        setCheck in class org.eclipse.nebula.widgets.grid.GridCellRenderer
      • getTextBounds

        public org.eclipse.swt.graphics.Rectangle getTextBounds​(org.eclipse.nebula.widgets.grid.GridItem item,
                                                                boolean preferred)
        Overrides:
        getTextBounds in class org.eclipse.nebula.widgets.grid.GridCellRenderer
      • setSelectionForegroundColor

        public void setSelectionForegroundColor​(org.eclipse.swt.graphics.Color selectionForegroundColor)
        Parameters:
        selectionForegroundColor - the selectionForegroundColor to set
      • setSelectionBackgroundColor

        public void setSelectionBackgroundColor​(org.eclipse.swt.graphics.Color selectionBackgroundColor)
        Parameters:
        selectionBackgroundColor - the selectionBackgroundColor to set