public class IndentedTreeImagePainter extends CellPainterWrapper
| Constructor and Description |
|---|
IndentedTreeImagePainter()
Creates an IndentedTreeImagePainter.
|
IndentedTreeImagePainter(int treeIndent)
Creates an IndentedTreeImagePainter.
|
IndentedTreeImagePainter(int treeIndent,
CellEdgeEnum cellEdge,
TreeImagePainter treeImagePainter)
Creates an IndentedTreeImagePainter using the given indentation per depth
and ICellPainter for painting the icons in the tree to the specified cell
edge.
|
IndentedTreeImagePainter(int treeIndent,
ICellPainter interiorPainter,
boolean paintBg,
boolean interiorPainterToSpanFullWidth)
Creates a
IndentedTreeImagePainter that uses the given
ICellPainter as base ICellPainter and decorate it with
the TreeImagePainter on the right edge of the cell. |
IndentedTreeImagePainter(int treeIndent,
ICellPainter interiorPainter,
CellEdgeEnum cellEdge,
boolean paintBg,
int spacing,
boolean paintDecorationDependent)
|
IndentedTreeImagePainter(int treeIndent,
ICellPainter interiorPainter,
CellEdgeEnum cellEdge,
ICellPainter decoratorPainter,
boolean paintBg,
int spacing,
boolean paintDecorationDependent)
|
IndentedTreeImagePainter(int treeIndent,
TreeImagePainter treeImagePainter)
Creates an IndentedTreeImagePainter using the given indentation per depth
and ICellPainter for painting the icons in the tree.
|
IndentedTreeImagePainter(ITreeRowModel<?> treeRowModel)
Deprecated.
Use constructor without ITreeRowModel parameter
|
IndentedTreeImagePainter(ITreeRowModel<?> treeRowModel,
int treeIndent)
Deprecated.
Use constructor without ITreeRowModel parameter
|
IndentedTreeImagePainter(ITreeRowModel<?> treeRowModel,
int treeIndent,
TreeImagePainter treeImagePainter)
Deprecated.
Use constructor without ITreeRowModel parameter
|
| Modifier and Type | Method and Description |
|---|---|
protected int |
getDepth(ILayerCell cell) |
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 |
setBaseCellPainter(ICellPainter cellPainter) |
void |
setTreeImagePainter(ICellPainter cellPainter) |
getCellPainterAt, getPreferredHeight, getWrappedPainter, setWrappedPainter@Deprecated public IndentedTreeImagePainter(ITreeRowModel<?> treeRowModel)
treeRowModel - The ITreeRowModel that is needed to get information about tree
states like depth, children and expand/collapse.@Deprecated 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.@Deprecated public IndentedTreeImagePainter(ITreeRowModel<?> treeRowModel, int treeIndent, TreeImagePainter 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 TreeImagePainter that should be used to paint the images
in the tree. It needs to be of type of TreeImagePainter that
paints expand/collapse/leaf icons regarding the node state,
because the ui bindings for expand/collapse are registered
against that type.public IndentedTreeImagePainter()
public IndentedTreeImagePainter(int treeIndent)
treeIndent - The number of pixels to indent per depth.public IndentedTreeImagePainter(int treeIndent,
TreeImagePainter treeImagePainter)
treeIndent - The number of pixels to indent per depth.treeImagePainter - The ICellPainter that should be used to paint the images in
the tree. It needs to be of type of TreeImagePainter that
paints expand/collapse/leaf icons regarding the node state,
because the ui bindings for expand/collapse are registered
against that type.public IndentedTreeImagePainter(int treeIndent,
CellEdgeEnum cellEdge,
TreeImagePainter treeImagePainter)
treeIndent - The number of pixels to indent per depth.cellEdge - the edge of the cell on which the tree state indicator
decoration should be appliedtreeImagePainter - The ICellPainter that should be used to paint the images in
the tree. It needs to be of type of TreeImagePainter that
paints expand/collapse/leaf icons regarding the node state,
because the ui bindings for expand/collapse are registered
against that type.public IndentedTreeImagePainter(int treeIndent,
ICellPainter interiorPainter,
CellEdgeEnum cellEdge,
boolean paintBg,
int spacing,
boolean paintDecorationDependent)
IndentedTreeImagePainter that uses the given
ICellPainter as base ICellPainter. It will use the
TreeImagePainter as decorator for tree state related decorations
at the specified cell edge, which can be configured to render the
background or not via method parameter. With the additional parameters,
the behaviour of the created CellPainterDecorator can be
configured in terms of rendering.treeIndent - The number of pixels to indent per depth.interiorPainter - the base ICellPainter to usecellEdge - the edge of the cell on which the tree state indicator
decoration should be appliedpaintBg - flag to configure whether the TreeImagePainter should
paint the background or notspacing - the number of pixels that should be used as spacing between
cell edge and decorationpaintDecorationDependent - flag to configure if the base ICellPainter should
render decoration dependent or not. If it is set to
false, the base painter will always paint at the
same coordinates, using the whole cell bounds,
true will cause the bounds of the cell to shrink
for the base painter.public IndentedTreeImagePainter(int treeIndent,
ICellPainter interiorPainter,
CellEdgeEnum cellEdge,
ICellPainter decoratorPainter,
boolean paintBg,
int spacing,
boolean paintDecorationDependent)
IndentedTreeImagePainter that uses the given
ICellPainter as base ICellPainter. It will use the given
ICellPainter as decorator for tree state related decorations at
the specified cell edge, which can be configured to render the background
or not via method parameter. With the additional parameters, the
behaviour of the created CellPainterDecorator can be configured
in terms of rendering.treeIndent - The number of pixels to indent per depth.interiorPainter - the base ICellPainter to usecellEdge - the edge of the cell on which the tree state indicator
decoration should be applieddecoratorPainter - the ICellPainter that should be used to paint the tree
state related decorationpaintBg - flag to configure whether the CellPainterDecorator
should paint the background or notspacing - the number of pixels that should be used as spacing between
cell edge and decorationpaintDecorationDependent - flag to configure if the base ICellPainter should
render decoration dependent or not. If it is set to
false, the base painter will always paint at the
same coordinates, using the whole cell bounds,
true will cause the bounds of the cell to shrink
for the base painter.public IndentedTreeImagePainter(int treeIndent,
ICellPainter interiorPainter,
boolean paintBg,
boolean interiorPainterToSpanFullWidth)
IndentedTreeImagePainter that uses the given
ICellPainter as base ICellPainter and decorate it with
the TreeImagePainter on the right edge of the cell. This
constructor gives the opportunity to configure the behaviour of the
TreeImagePainter and the CellPainterDecorator for some
attributes. Remains because of downwards compatibility.treeIndent - The number of pixels to indent per depth.interiorPainter - the base ICellPainter to usepaintBg - flag to configure whether the TreeImagePainter should
paint the background or notinteriorPainterToSpanFullWidth - flag to configure how the bounds of the base painter should be
calculatedpublic 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 void setBaseCellPainter(ICellPainter cellPainter)
cellPainter - The base ICellPainter that should be used to render
the cell content.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 CellPainterWrapperpublic void paintCell(ILayerCell cell, org.eclipse.swt.graphics.GC gc, org.eclipse.swt.graphics.Rectangle bounds, IConfigRegistry configRegistry)
paintCell in interface ICellPainterpaintCell in class CellPainterWrapperpublic int getPreferredWidth(ILayerCell cell, org.eclipse.swt.graphics.GC gc, IConfigRegistry configRegistry)
ICellPaintergetPreferredWidth in interface ICellPaintergetPreferredWidth in class CellPainterWrappercell - The cell for which the preferred width is requested.gc - The GC that is used for rendering.configRegistry - The IConfigRegistry that contains the configuration used for
rendering.protected int getIndent(int depth)
depth - The depth/level in the tree structure for which the indent is
requested.protected int getDepth(ILayerCell cell)
cell - The cell for which the depth/level in the tree structure is
requested.Copyright © 2016. All rights reserved.