Class BeveledBorderDecorator
java.lang.Object
org.eclipse.nebula.widgets.nattable.painter.cell.AbstractCellPainter
org.eclipse.nebula.widgets.nattable.painter.cell.CellPainterWrapper
org.eclipse.nebula.widgets.nattable.painter.cell.decorator.BeveledBorderDecorator
- All Implemented Interfaces:
ICellPainter
Decorator for rendering the cell with beveled borders (button look). It is
possible to render the beveled borders to look like the cell is uplifted or
sunk. The default is to render it uplifted.
-
Constructor Summary
ConstructorsConstructorDescriptionBeveledBorderDecorator(ICellPainter interiorPainter) BeveledBorderDecorator(ICellPainter interiorPainter, boolean uplift) -
Method Summary
Modifier and TypeMethodDescriptionintgetPreferredHeight(ILayerCell cell, org.eclipse.swt.graphics.GC gc, IConfigRegistry configRegistry) Get the preferred height of the cell when rendered by this painter.intgetPreferredWidth(ILayerCell cell, org.eclipse.swt.graphics.GC gc, IConfigRegistry configRegistry) Get the preferred width of the cell when rendered by this painter.org.eclipse.swt.graphics.RectanglegetWrappedPainterBounds(ILayerCell cell, org.eclipse.swt.graphics.GC gc, org.eclipse.swt.graphics.Rectangle bounds, IConfigRegistry configRegistry) voidpaintCell(ILayerCell cell, org.eclipse.swt.graphics.GC gc, org.eclipse.swt.graphics.Rectangle adjustedCellBounds, IConfigRegistry configRegistry) Methods inherited from class org.eclipse.nebula.widgets.nattable.painter.cell.CellPainterWrapper
getCellPainterAt, getWrappedPainter, setWrappedPainter
-
Constructor Details
-
BeveledBorderDecorator
- Parameters:
interiorPainter- The painter which should be wrapped by this decorator.
-
BeveledBorderDecorator
- Parameters:
interiorPainter- The painter which should be wrapped by this decorator.uplift- Flag to determine whether the cell borders should be painted uplift or sunk. By default this flag is set totrue. Set it tofalseif the cell should be rendered sunk.
-
-
Method Details
-
getPreferredWidth
public int getPreferredWidth(ILayerCell cell, org.eclipse.swt.graphics.GC gc, IConfigRegistry configRegistry) Description copied from interface:ICellPainterGet the preferred width of the cell when rendered by this painter. Used for auto-resize.- Specified by:
getPreferredWidthin interfaceICellPainter- Overrides:
getPreferredWidthin classCellPainterWrapper- Parameters:
cell- The cell for which the preferred width is requested.gc- The GC that is used for rendering.configRegistry- The IConfigRegistry that contains the configuration used for rendering.- Returns:
- The preferred width of the given cell when rendered by this painter.
-
getPreferredHeight
public int getPreferredHeight(ILayerCell cell, org.eclipse.swt.graphics.GC gc, IConfigRegistry configRegistry) Description copied from interface:ICellPainterGet the preferred height of the cell when rendered by this painter. Used for auto-resize.- Specified by:
getPreferredHeightin interfaceICellPainter- Overrides:
getPreferredHeightin classCellPainterWrapper- Parameters:
cell- The cell for which the preferred height is requested.gc- The GC that is used for rendering.configRegistry- The IConfigRegistry that contains the configuration used for rendering.- Returns:
- The preferred height of the given cell when rendered by this painter.
-
getWrappedPainterBounds
public org.eclipse.swt.graphics.Rectangle getWrappedPainterBounds(ILayerCell cell, org.eclipse.swt.graphics.GC gc, org.eclipse.swt.graphics.Rectangle bounds, IConfigRegistry configRegistry) - Overrides:
getWrappedPainterBoundsin classCellPainterWrapper
-
paintCell
public void paintCell(ILayerCell cell, org.eclipse.swt.graphics.GC gc, org.eclipse.swt.graphics.Rectangle adjustedCellBounds, IConfigRegistry configRegistry) - Specified by:
paintCellin interfaceICellPainter- Overrides:
paintCellin classCellPainterWrapper
-