Class ColumnGroupExpandCollapseImagePainter
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.ColumnGroupExpandCollapseImagePainter
- All Implemented Interfaces:
ICellPainter
Paints the triangular expand/collapse column header images. It is used to
decorate column header cells to show the current column group expand/collapse
state.
-
Field Summary
Fields inherited from class org.eclipse.nebula.widgets.nattable.painter.cell.ImagePainter
calculateByHeight, calculateByWidth -
Constructor Summary
ConstructorsConstructorDescriptionCreate a ColumnGroupExpandCollapseImagePainter that uses the default icons (black triangles) and renders the background.ColumnGroupExpandCollapseImagePainter(boolean paintBg) Create a ColumnGroupExpandCollapseImagePainter that uses the default icons (black triangles).ColumnGroupExpandCollapseImagePainter(boolean paintBg, boolean invertIcons) Create a ColumnGroupExpandCollapseImagePainter. -
Method Summary
Modifier and TypeMethodDescriptionprotected org.eclipse.swt.graphics.ImagegetImage(ILayerCell cell, IConfigRegistry configRegistry) voidsetExpandCollapseImages(org.eclipse.swt.graphics.Image expandedImage, org.eclipse.swt.graphics.Image collapsedImage) Set the images that should be used to indicate the current column group expand/collapse state.Methods inherited from class org.eclipse.nebula.widgets.nattable.painter.cell.ImagePainter
getCellPainterAt, getPreferredHeight, getPreferredWidth, isCalculateByHeight, isCalculateByWidth, paintCell, setCalculateByHeight, setCalculateByWidthMethods inherited from class org.eclipse.nebula.widgets.nattable.painter.cell.BackgroundPainter
getBackgroundColourMethods inherited from class org.eclipse.nebula.widgets.nattable.painter.cell.CellPainterWrapper
getWrappedPainter, getWrappedPainterBounds, setWrappedPainter
-
Constructor Details
-
ColumnGroupExpandCollapseImagePainter
public ColumnGroupExpandCollapseImagePainter()Create a ColumnGroupExpandCollapseImagePainter that uses the default icons (black triangles) and renders the background. -
ColumnGroupExpandCollapseImagePainter
public ColumnGroupExpandCollapseImagePainter(boolean paintBg) Create a ColumnGroupExpandCollapseImagePainter that uses the default icons (black triangles).- Parameters:
paintBg-trueif it should render the background itself,falseif the background rendering should be skipped in here.
-
ColumnGroupExpandCollapseImagePainter
public ColumnGroupExpandCollapseImagePainter(boolean paintBg, boolean invertIcons) Create a ColumnGroupExpandCollapseImagePainter.- Parameters:
paintBg-trueif it should render the background itself,falseif 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 Details
-
getImage
- Overrides:
getImagein classImagePainter- Parameters:
cell- TheILayerCellfor which thisImagePainteris called.configRegistry- The currentIConfigRegistryto retrieve the cell style information from.- Returns:
- The
Imagethat 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 column group expand/collapse state.- Parameters:
expandedImage- Image to be used to indicate that a column group is expanded.collapsedImage- Image to be used to indicate that a column group is collapsed.
-