| 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.nebula.widgets.nattable.painter.cell.AbstractCellPainter
org.eclipse.nebula.widgets.nattable.painter.cell.CellPainterWrapper
org.eclipse.nebula.widgets.nattable.tree.painter.IndentedTreeImagePainter
public class IndentedTreeImagePainter
Implementation of CellPainterWrapper that is used to render tree structures in NatTable. It puts indentation to tree nodes to visualize the tree structure and adds expand/collapse icons corresponding to the state if a tree node has children.
| Constructor Summary | |
|---|---|
IndentedTreeImagePainter()
Creates an IndentedTreeImagePainter.  | 
|
IndentedTreeImagePainter(int treeIndent)
Creates an IndentedTreeImagePainter.  | 
|
IndentedTreeImagePainter(int treeIndent,
                         CellEdgeEnum cellEdge,
                         TreeImagePainter treeImagePainter)
 | 
|
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)
Creates a IndentedTreeImagePainter that uses the given
 ICellPainter as base ICellPainter. | 
|
IndentedTreeImagePainter(int treeIndent,
                         ICellPainter interiorPainter,
                         CellEdgeEnum cellEdge,
                         ICellPainter decoratorPainter,
                         boolean paintBg,
                         int spacing,
                         boolean paintDecorationDependent)
Creates a IndentedTreeImagePainter that uses the given
 ICellPainter as base ICellPainter. | 
|
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  | 
|
| Method Summary | |
|---|---|
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)
 | 
| Methods inherited from class org.eclipse.nebula.widgets.nattable.painter.cell.CellPainterWrapper | 
|---|
getCellPainterAt, getPreferredHeight, getWrappedPainter, setWrappedPainter | 
| Methods inherited from class java.lang.Object | 
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
|---|
@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)
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
            calculated| Method Detail | 
|---|
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 void setBaseCellPainter(ICellPainter cellPainter)
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 ICellPainterpaintCell in class CellPainterWrapper
public int getPreferredWidth(ILayerCell cell,
                             org.eclipse.swt.graphics.GC gc,
                             IConfigRegistry configRegistry)
ICellPainter
getPreferredWidth 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.
  | 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||