Class TreeImagePainter
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.tree.painter.TreeImagePainter
- All Implemented Interfaces:
ICellPainter
-
Field Summary
Fields inherited from class org.eclipse.nebula.widgets.nattable.painter.cell.ImagePainter
calculateByHeight, calculateByWidth
-
Constructor Summary
ConstructorDescriptionCreate a TreeImagePainter that uses the default icons to show the tree state and renders the background.TreeImagePainter
(boolean paintBg) Create a TreeImagePainter that uses the default icons to show the tree state.TreeImagePainter
(boolean paintBg, org.eclipse.swt.graphics.Image plusImage, org.eclipse.swt.graphics.Image minusImage, org.eclipse.swt.graphics.Image leafImage) Create a TreeImagePainter that uses the given icons to show the tree state.TreeImagePainter
(org.eclipse.swt.graphics.Image plusImage, org.eclipse.swt.graphics.Image minusImage, org.eclipse.swt.graphics.Image leafImage) Create a TreeImagePainter that uses the given icons to show the tree state and renders the background. -
Method Summary
Modifier and TypeMethodDescriptionprotected org.eclipse.swt.graphics.Image
getImage
(ILayerCell cell, IConfigRegistry configRegistry) org.eclipse.swt.graphics.Image
org.eclipse.swt.graphics.Image
org.eclipse.swt.graphics.Image
void
setExpandCollapseImages
(org.eclipse.swt.graphics.Image collapsedImage, org.eclipse.swt.graphics.Image expandedImage, org.eclipse.swt.graphics.Image leafImage) Set the images that should be used to indicate the current tree 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 Details
-
TreeImagePainter
public TreeImagePainter()Create a TreeImagePainter that uses the default icons to show the tree state and renders the background. -
TreeImagePainter
public TreeImagePainter(boolean paintBg) Create a TreeImagePainter that uses the default icons to show the tree state.- Parameters:
paintBg
-true
if it should render the background itself,false
if the background rendering should be skipped in here.
-
TreeImagePainter
public TreeImagePainter(org.eclipse.swt.graphics.Image plusImage, org.eclipse.swt.graphics.Image minusImage, org.eclipse.swt.graphics.Image leafImage) Create a TreeImagePainter that uses the given icons to show the tree state and renders the background.- Parameters:
plusImage
- The image that should be shown for collapsed tree nodes.minusImage
- The image that should be shown for expanded tree nodes.leafImage
- The image that should be shown for leafs without children.
-
TreeImagePainter
public TreeImagePainter(boolean paintBg, org.eclipse.swt.graphics.Image plusImage, org.eclipse.swt.graphics.Image minusImage, org.eclipse.swt.graphics.Image leafImage) Create a TreeImagePainter that uses the given icons to show the tree state.- Parameters:
paintBg
-true
if it should render the background itself,false
if the background rendering should be skipped in here.plusImage
- The image that should be shown for collapsed tree nodes.minusImage
- The image that should be shown for expanded tree nodes.leafImage
- The image that should be shown for leafs without children.
-
-
Method Details
-
getPlusImage
public org.eclipse.swt.graphics.Image getPlusImage() -
getMinusImage
public org.eclipse.swt.graphics.Image getMinusImage() -
getLeafImage
public org.eclipse.swt.graphics.Image getLeafImage() -
getImage
- 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 collapsedImage, org.eclipse.swt.graphics.Image expandedImage, org.eclipse.swt.graphics.Image leafImage) Set the images that should be used to indicate the current tree state.- Parameters:
collapsedImage
- The image that should be shown for collapsed tree nodes.expandedImage
- The image that should be shown for expanded tree nodes.leafImage
- The image that should be shown for leafs without children.
-