Class DefaultCellBackgroundProvider

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object obj)  
      org.eclipse.swt.graphics.RGB getBackground()
      Returns the background color.
      org.eclipse.swt.graphics.RGB getCellBackground​(int row, int column, int colspan)
      Returns the value in the background property.
      int hashCode()  
      void setBackground​(org.eclipse.swt.graphics.RGB background)
      Sets the background color to the argument.
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DefaultCellBackgroundProvider

        public DefaultCellBackgroundProvider()
        Constructs a DefaultGridBackgroundProvider with a null background.
      • DefaultCellBackgroundProvider

        public DefaultCellBackgroundProvider​(CellBackgroundProvider chain)
        Constructs a DefaultGridBackgroundProvider which chains to the argument if this instance has a null background color. (DefaultGridLook uses this constructor to cause header and footer background colors to default to the body background color.)
        Parameters:
        chain - the provider to chain a getCellBackground(...) call to if this instance would return null. Ignored if null.
    • Method Detail

      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • getCellBackground

        public org.eclipse.swt.graphics.RGB getCellBackground​(int row,
                                                              int column,
                                                              int colspan)
        Returns the value in the background property. If the background property is null, the chained provider will be consulted to obtain a background color.
        Specified by:
        getCellBackground in interface CellBackgroundProvider
        Parameters:
        row - the row index (zero-based)
        column - the column index (zero-based). This is the grid column index, not the cell index within the row.
        colspan - the number of grid columns that the cell occupies.
        Returns:
        the background color to display for the given header cell.
      • getBackground

        public org.eclipse.swt.graphics.RGB getBackground()
        Returns the background color.
        Returns:
        the background color.
      • setBackground

        public void setBackground​(org.eclipse.swt.graphics.RGB background)
        Sets the background color to the argument.
        Parameters:
        background - the new background color.