Class RowGroupExpandCollapseImagePainter
- 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.BackgroundPainter
-
- org.eclipse.nebula.widgets.nattable.painter.cell.ImagePainter
-
- org.eclipse.nebula.widgets.nattable.group.painter.RowGroupExpandCollapseImagePainter
-
- All Implemented Interfaces:
ICellPainter
public class RowGroupExpandCollapseImagePainter extends ImagePainter
Paints the triangular expand/collapse row header images. It is used to decorate row header cells to show the current row group expand/collapse state.
-
-
Field Summary
-
Fields inherited from class org.eclipse.nebula.widgets.nattable.painter.cell.ImagePainter
calculateByHeight, calculateByWidth
-
-
Constructor Summary
Constructors Constructor Description RowGroupExpandCollapseImagePainter()
Create a RowGroupExpandCollapseImagePainter that uses the default icons (black triangles) and renders the background.RowGroupExpandCollapseImagePainter(boolean paintBg)
Create a RowGroupExpandCollapseImagePainter that uses the default icons (black triangles).RowGroupExpandCollapseImagePainter(boolean paintBg, boolean invertIcons)
Create a RowGroupExpandCollapseImagePainter.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.eclipse.swt.graphics.Image
getImage(ILayerCell cell, IConfigRegistry configRegistry)
void
setExpandCollapseImages(org.eclipse.swt.graphics.Image expandedImage, org.eclipse.swt.graphics.Image collapsedImage)
Set the images that should be used to indicate the current row group expand/collapse state.-
Methods inherited from class org.eclipse.nebula.widgets.nattable.painter.cell.ImagePainter
getCellPainterAt, getPreferredHeight, getPreferredWidth, isCalculateByHeight, isCalculateByWidth, paintCell, setCalculateByHeight, setCalculateByWidth
-
Methods inherited from class org.eclipse.nebula.widgets.nattable.painter.cell.BackgroundPainter
getBackgroundColour
-
Methods inherited from class org.eclipse.nebula.widgets.nattable.painter.cell.CellPainterWrapper
getWrappedPainter, getWrappedPainterBounds, setWrappedPainter
-
-
-
-
Constructor Detail
-
RowGroupExpandCollapseImagePainter
public RowGroupExpandCollapseImagePainter()
Create a RowGroupExpandCollapseImagePainter that uses the default icons (black triangles) and renders the background.
-
RowGroupExpandCollapseImagePainter
public RowGroupExpandCollapseImagePainter(boolean paintBg)
Create a RowGroupExpandCollapseImagePainter that uses the default icons (black triangles).- Parameters:
paintBg
-true
if it should render the background itself,false
if the background rendering should be skipped in here.
-
RowGroupExpandCollapseImagePainter
public RowGroupExpandCollapseImagePainter(boolean paintBg, boolean invertIcons)
Create a RowGroupExpandCollapseImagePainter.- Parameters:
paintBg
-true
if it should render the background itself,false
if the background rendering should be skipped in here.invertIcons
- Specify whether the default icons should be used (black triangles) or if inverted icons should be used (white triangles).
-
-
Method Detail
-
getImage
protected org.eclipse.swt.graphics.Image getImage(ILayerCell cell, IConfigRegistry configRegistry)
- Overrides:
getImage
in classImagePainter
- Parameters:
cell
- TheILayerCell
for which thisImagePainter
is called.configRegistry
- The currentIConfigRegistry
to retrieve the cell style information from.- Returns:
- The
Image
that should be painted by thisImagePainter
.
-
setExpandCollapseImages
public void setExpandCollapseImages(org.eclipse.swt.graphics.Image expandedImage, org.eclipse.swt.graphics.Image collapsedImage)
Set the images that should be used to indicate the current row group expand/collapse state.- Parameters:
expandedImage
- Image to be used to indicate that a row group is expanded.collapsedImage
- Image to be used to indicate that a row group is collapsed.
-
-