|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectechopointng.ui.syncpeer.TreeRenderer
public class TreeRenderer
TreeRenderer will render a Tree into a list of
table elements. This allows the rendering of the individual "tree rows" to
be broken out of the main Tree peer.
A Tree is rendered as a series of rows (know here as "tree rows"). The rows are to be line up directly on top of one another. The "TD cells" of the tree rows must line up in order for the Tree to look right. The effect looks something like this :
|------------|------------------------------------------------------------- | | | folder | Root Text | icon | |------------|------------|------------|----------------------------------- | | +/- | | | empty | expando | folder | Child Text | | icon | icon | |------------|------------|------------|----------------------------------- | | +/- | | | empty | expando | folder | Child Text | | icon | icon | |------------|------------|------------|------------|---------------------- | | | +/- | | | empty | empty | expando | folder | Grandchild Text | | | icon | icon | |------------|------------|------------|------------|---------------------- | | | +/- | | | empty | empty | expando | folder | Grandchild Text | | | icon | icon | |------------|------------|------------|------------|----------------------
One thing to remember is that the rows are table elements not rows within a single table. This allows the most flexibility for Tree and TreeTables so it really more like this :
|------------|------------|------------|------------|---------------------- | | | +/- | | | empty | empty | expando | folder | Grandchild Text | | | icon | icon | |------------|------------|------------|------------|---------------------- |------------|------------|------------|------------|---------------------- | | | +/- | | | empty | empty | expando | folder | Grandchild Text | | | icon | icon | |------------|------------|------------|------------|---------------------- |------------|------------|------------|------------|---------------------- | | | +/- | | | empty | empty | expando | folder | Grandchild Text | | | icon | icon | |------------|------------|------------|------------|----------------------
| Nested Class Summary | |
|---|---|
static interface |
TreeRenderer.EventSupportCallBack
EventSupportCallBack is a callback that is used to
call back to the caller and get it to add "event handling" code to
the renderer elements. |
| Constructor Summary | |
|---|---|
TreeRenderer(RenderingContext rc,
TreeRenderer.EventSupportCallBack eventSupportCallBack,
Tree tree,
Style fallbackStyle,
ImageManager imageManager)
Constructs a TreeRenderer |
|
| Method Summary | |
|---|---|
static java.lang.String |
createPathId(TreePath treeNodePath,
TreeModel model)
This returns a String identifier for a given TreePath. |
void |
renderTree()
This is called to render a given Tree as a series of tree rows. |
org.w3c.dom.Element |
renderTreeRow(java.lang.Object treeNode,
TreePath treeNodePath)
This is called to render a given Tree node as tree row. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TreeRenderer(RenderingContext rc,
TreeRenderer.EventSupportCallBack eventSupportCallBack,
Tree tree,
Style fallbackStyle,
ImageManager imageManager)
TreeRenderer
rc - - the RenderingContext to useeventSupportCallBack - - the call back for event handlingtree - - the Tree in questionimageManager - - the ImageManager to use to contain images.| Method Detail |
|---|
public static java.lang.String createPathId(TreePath treeNodePath,
TreeModel model)
And example is : [root][0][1][3] which is to say the 4th great grandchild child of the 2nd grandchild of the 1st child of the root node.
treeNodePath - - the TreePath to create an PathId formodel - - the model rom which to work out the child index of the nodes
public void renderTree()
public org.w3c.dom.Element renderTreeRow(java.lang.Object treeNode,
TreePath treeNodePath)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||