public class DefaultCellBackgroundProvider extends java.lang.Object implements CellBackgroundProvider
Constructor and Description |
---|
DefaultCellBackgroundProvider()
Constructs a DefaultGridBackgroundProvider with a null background.
|
DefaultCellBackgroundProvider(CellBackgroundProvider chain)
Constructs a DefaultGridBackgroundProvider which chains to the argument
if this instance has a null background color.
|
Modifier and Type | Method and 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.
|
public DefaultCellBackgroundProvider()
public DefaultCellBackgroundProvider(CellBackgroundProvider chain)
chain
- the provider to chain a getCellBackground(...) call to if this
instance would return null. Ignored if null.public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public org.eclipse.swt.graphics.RGB getCellBackground(int row, int column, int colspan)
getCellBackground
in interface CellBackgroundProvider
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.public org.eclipse.swt.graphics.RGB getBackground()
public void setBackground(org.eclipse.swt.graphics.RGB background)
background
- the new background color.