public class IndentedTreeImagePainter extends CellPainterWrapper
Constructor and Description |
---|
IndentedTreeImagePainter(ITreeRowModel<?> treeRowModel)
Creates an IndentedTreeImagePainter based on the given ITreeRowModel.
|
IndentedTreeImagePainter(ITreeRowModel<?> treeRowModel,
int treeIndent)
Creates an IndentedTreeImagePainter based on the given ITreeRowModel.
|
IndentedTreeImagePainter(ITreeRowModel<?> treeRowModel,
int treeIndent,
ICellPainter treeImagePainter)
Creates an IndentedTreeImagePainter based on the given ITreeRowModel, indentation per depth
and ICellPainter for painting the icons in the tree.
|
Modifier and Type | Method and Description |
---|---|
protected int |
getIndent(int depth) |
int |
getPreferredWidth(ILayerCell cell,
org.eclipse.swt.graphics.GC gc,
IConfigRegistry configRegistry)
Get the preferred width of the cell when rendered by this painter.
|
ICellPainter |
getTreeImagePainter() |
org.eclipse.swt.graphics.Rectangle |
getWrappedPainterBounds(ILayerCell cell,
org.eclipse.swt.graphics.GC gc,
org.eclipse.swt.graphics.Rectangle bounds,
IConfigRegistry configRegistry) |
void |
paintCell(ILayerCell cell,
org.eclipse.swt.graphics.GC gc,
org.eclipse.swt.graphics.Rectangle bounds,
IConfigRegistry configRegistry) |
void |
setTreeImagePainter(ICellPainter cellPainter) |
getCellPainterAt, getPreferredHeight, getWrappedPainter, setWrappedPainter
public IndentedTreeImagePainter(ITreeRowModel<?> treeRowModel)
treeRowModel
- The ITreeRowModel that is needed to get information about tree states like
depth, children and expand/collapse.public IndentedTreeImagePainter(ITreeRowModel<?> treeRowModel, int treeIndent)
treeRowModel
- The ITreeRowModel that is needed to get information about tree states like
depth, children and expand/collapse.treeIndent
- The number of pixels to indent per depth.public IndentedTreeImagePainter(ITreeRowModel<?> treeRowModel, int treeIndent, ICellPainter treeImagePainter)
treeRowModel
- The ITreeRowModel that is needed to get information about tree states like
depth, children and expand/collapse.treeIndent
- The number of pixels to indent per depth.treeImagePainter
- The ICellPainter that should be used to paint the images in the tree.
Usually it is some type of TreeImagePainter that paints expand/collapse/leaf icons regarding
the node state.public ICellPainter getTreeImagePainter()
public void setTreeImagePainter(ICellPainter cellPainter)
cellPainter
- The ICellPainter that should be used to paint the images in the tree.
Usually it is some type of TreeImagePainter that paints expand/collapse/leaf icons regarding
the node state.public org.eclipse.swt.graphics.Rectangle getWrappedPainterBounds(ILayerCell cell, org.eclipse.swt.graphics.GC gc, org.eclipse.swt.graphics.Rectangle bounds, IConfigRegistry configRegistry)
getWrappedPainterBounds
in class CellPainterWrapper
public void paintCell(ILayerCell cell, org.eclipse.swt.graphics.GC gc, org.eclipse.swt.graphics.Rectangle bounds, IConfigRegistry configRegistry)
paintCell
in interface ICellPainter
paintCell
in class CellPainterWrapper
public int getPreferredWidth(ILayerCell cell, org.eclipse.swt.graphics.GC gc, IConfigRegistry configRegistry)
ICellPainter
getPreferredWidth
in interface ICellPainter
getPreferredWidth
in class CellPainterWrapper
protected int getIndent(int depth)
depth
- The depth/level in the tree structure for which the indent is requested.Copyright © 2013. All Rights Reserved.