Class PercentageBarDecorator
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.PercentageBarDecorator
- All Implemented Interfaces:
ICellPainter
Draws a rectangular bar in cell proportional to the value of the cell.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ConfigAttribute<org.eclipse.swt.graphics.Color>static final ConfigAttribute<org.eclipse.swt.graphics.Color>static final ConfigAttribute<org.eclipse.swt.graphics.Color> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected NumberconvertDataType(ILayerCell cell, IConfigRegistry configRegistry) Converts the data type to aNumber.voidpaintCell(ILayerCell cell, org.eclipse.swt.graphics.GC gc, org.eclipse.swt.graphics.Rectangle rectangle, IConfigRegistry configRegistry) Methods inherited from class org.eclipse.nebula.widgets.nattable.painter.cell.CellPainterWrapper
getCellPainterAt, getPreferredHeight, getPreferredWidth, getWrappedPainter, getWrappedPainterBounds, setWrappedPainter
-
Field Details
-
PERCENTAGE_BAR_COMPLETE_REGION_START_COLOR
public static final ConfigAttribute<org.eclipse.swt.graphics.Color> PERCENTAGE_BAR_COMPLETE_REGION_START_COLOR -
PERCENTAGE_BAR_COMPLETE_REGION_END_COLOR
public static final ConfigAttribute<org.eclipse.swt.graphics.Color> PERCENTAGE_BAR_COMPLETE_REGION_END_COLOR -
PERCENTAGE_BAR_INCOMPLETE_REGION_COLOR
public static final ConfigAttribute<org.eclipse.swt.graphics.Color> PERCENTAGE_BAR_INCOMPLETE_REGION_COLOR
-
-
Constructor Details
-
PercentageBarDecorator
-
-
Method Details
-
paintCell
public void paintCell(ILayerCell cell, org.eclipse.swt.graphics.GC gc, org.eclipse.swt.graphics.Rectangle rectangle, IConfigRegistry configRegistry) - Specified by:
paintCellin interfaceICellPainter- Overrides:
paintCellin classCellPainterWrapper
-
convertDataType
- Parameters:
cell- The cell for which theNumbervalue is requested.configRegistry- TheIConfigRegistryto retrieve theIDisplayConverterfor the cell.- Returns:
- The
Numbervalue to show. Should be a factor value <= 1.0 to be interpreted as a percentage. - Since:
- 2.3
-