public class CellPainterDecorator extends Object implements ICellPainter
Constructor and Description |
---|
CellPainterDecorator(ICellPainter baseCellPainter,
CellEdgeEnum cellEdge,
ICellPainter decoratorCellPainter)
Will create a
CellPainterDecorator with the default spacing of 2 between base and
decoration painter, where the base painter is rendered dependent to the decoration. |
CellPainterDecorator(ICellPainter baseCellPainter,
CellEdgeEnum cellEdge,
ICellPainter decoratorCellPainter,
boolean paintDecorationDependent)
Will create a
CellPainterDecorator with the default spacing of 2 between base and
decoration painter. |
CellPainterDecorator(ICellPainter baseCellPainter,
CellEdgeEnum cellEdge,
int spacing,
ICellPainter decoratorCellPainter)
Will create a
CellPainterDecorator with the given amount of pixels as spacing between base and
decoration painter, where the base painter is rendered dependent to the decoration. |
CellPainterDecorator(ICellPainter baseCellPainter,
CellEdgeEnum cellEdge,
int spacing,
ICellPainter decoratorCellPainter,
boolean paintDecorationDependent)
Will create a
CellPainterDecorator with the given amount of pixels as spacing between base and
decoration painter. |
Modifier and Type | Method and Description |
---|---|
org.eclipse.swt.graphics.Rectangle |
getBaseCellPainterBounds(ILayerCell cell,
org.eclipse.swt.graphics.GC gc,
org.eclipse.swt.graphics.Rectangle adjustedCellBounds,
IConfigRegistry configRegistry) |
ICellPainter |
getCellPainterAt(int x,
int y,
ILayerCell cell,
org.eclipse.swt.graphics.GC gc,
org.eclipse.swt.graphics.Rectangle adjustedCellBounds,
IConfigRegistry configRegistry) |
org.eclipse.swt.graphics.Rectangle |
getDecoratorCellPainterBounds(ILayerCell cell,
org.eclipse.swt.graphics.GC gc,
org.eclipse.swt.graphics.Rectangle adjustedCellBounds,
IConfigRegistry configRegistry) |
int |
getPreferredHeight(ILayerCell cell,
org.eclipse.swt.graphics.GC gc,
IConfigRegistry configRegistry)
Get the preferred height of the cell when rendered by this painter.
|
int |
getPreferredWidth(ILayerCell cell,
org.eclipse.swt.graphics.GC gc,
IConfigRegistry configRegistry)
Get the preferred width of the cell when rendered by this painter.
|
void |
paintCell(ILayerCell cell,
org.eclipse.swt.graphics.GC gc,
org.eclipse.swt.graphics.Rectangle adjustedCellBounds,
IConfigRegistry configRegistry) |
void |
setBaseCellPainterSpansWholeCell(boolean interiorPainterToSpanFullWidth)
Deprecated.
use setPaintDecorationDependent() instead, note that the semantic is different
|
void |
setPaintDecorationDependent(boolean paintDecorationDependent) |
public CellPainterDecorator(ICellPainter baseCellPainter, CellEdgeEnum cellEdge, ICellPainter decoratorCellPainter)
CellPainterDecorator
with the default spacing of 2 between base and
decoration painter, where the base painter is rendered dependent to the decoration.baseCellPainter
- The base ICellPainter
that should be decoratedcellEdge
- The edge of the cell at which the decoration should be applieddecoratorCellPainter
- The ICellPainter
that should be used to render the decoration.public CellPainterDecorator(ICellPainter baseCellPainter, CellEdgeEnum cellEdge, ICellPainter decoratorCellPainter, boolean paintDecorationDependent)
CellPainterDecorator
with the default spacing of 2 between base and
decoration painter. If paintDecorationDependent is set to false
, the spacing will be ignored.baseCellPainter
- The base ICellPainter
that should be decoratedcellEdge
- The edge of the cell at which the decoration should be applieddecoratorCellPainter
- The ICellPainter
that should be used to render the decoration.paintDecorationDependent
- Flag to specify whether the base painter should render dependent to the
decoration painter or not.public CellPainterDecorator(ICellPainter baseCellPainter, CellEdgeEnum cellEdge, int spacing, ICellPainter decoratorCellPainter)
CellPainterDecorator
with the given amount of pixels as spacing between base and
decoration painter, where the base painter is rendered dependent to the decoration.baseCellPainter
- The base ICellPainter
that should be decoratedcellEdge
- The edge of the cell at which the decoration should be appliedspacing
- The amount of pixels that should be used as spacing between decoration and base painterdecoratorCellPainter
- The ICellPainter
that should be used to render the decoration.public CellPainterDecorator(ICellPainter baseCellPainter, CellEdgeEnum cellEdge, int spacing, ICellPainter decoratorCellPainter, boolean paintDecorationDependent)
CellPainterDecorator
with the given amount of pixels as spacing between base and
decoration painter. If paintDecorationDependent is set to false
, the spacing will be ignored
while the decoration is mainly rendered over the base painter.baseCellPainter
- The base ICellPainter
that should be decoratedcellEdge
- The edge of the cell at which the decoration should be applieddecoratorCellPainter
- The ICellPainter
that should be used to render the decoration.paintDecorationDependent
- Flag to specify whether the base painter should render dependent to the
decoration painter or not.public void setPaintDecorationDependent(boolean paintDecorationDependent)
paintDecorationDependent
- true
if the base painter should render dependent to
the decoration painter, false
if the decoration should be rendered over
the base painter.public void setBaseCellPainterSpansWholeCell(boolean interiorPainterToSpanFullWidth)
public int getPreferredWidth(ILayerCell cell, org.eclipse.swt.graphics.GC gc, IConfigRegistry configRegistry)
ICellPainter
getPreferredWidth
in interface ICellPainter
public int getPreferredHeight(ILayerCell cell, org.eclipse.swt.graphics.GC gc, IConfigRegistry configRegistry)
ICellPainter
getPreferredHeight
in interface ICellPainter
public void paintCell(ILayerCell cell, org.eclipse.swt.graphics.GC gc, org.eclipse.swt.graphics.Rectangle adjustedCellBounds, IConfigRegistry configRegistry)
paintCell
in interface ICellPainter
public org.eclipse.swt.graphics.Rectangle getBaseCellPainterBounds(ILayerCell cell, org.eclipse.swt.graphics.GC gc, org.eclipse.swt.graphics.Rectangle adjustedCellBounds, IConfigRegistry configRegistry)
public org.eclipse.swt.graphics.Rectangle getDecoratorCellPainterBounds(ILayerCell cell, org.eclipse.swt.graphics.GC gc, org.eclipse.swt.graphics.Rectangle adjustedCellBounds, IConfigRegistry configRegistry)
public ICellPainter getCellPainterAt(int x, int y, ILayerCell cell, org.eclipse.swt.graphics.GC gc, org.eclipse.swt.graphics.Rectangle adjustedCellBounds, IConfigRegistry configRegistry)
getCellPainterAt
in interface ICellPainter
Copyright © 2013. All Rights Reserved.