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
ConstructorsConstructorDescriptionCreate 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.ImagegetImage(ILayerCell cell, IConfigRegistry configRegistry) org.eclipse.swt.graphics.Imageorg.eclipse.swt.graphics.Imageorg.eclipse.swt.graphics.ImagevoidsetExpandCollapseImages(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, 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
-
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-trueif it should render the background itself,falseif 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-trueif it should render the background itself,falseif 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:
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 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.
-