Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.tonbeller.wcf.tree
Class TreeComponent

    java.lang.Object
      com.tonbeller.wcf.component.ComponentSupport
          com.tonbeller.wcf.component.NestableComponentSupport
              com.tonbeller.wcf.tree.TreeComponent

All Implemented Interfaces:
  Bookmarkable, Component, java.util.EventListener, Form, FormListener, javax.servlet.http.HttpSessionBindingListener, LifeCycle, NestableComponent, Renderable, RequestListener, RoleExprHolder, Visible

public class TreeComponent
extends NestableComponentSupport

Tree Component

Author:
  av

Field Summary

Fields inherited from interface com.tonbeller.wcf.bookmarks.Bookmarkable
`EXTENSIONAL, INTENSIONAL`

Constructor Summary
`TreeComponent(java.lang.String id, Component parent)` Constructor for TreeComponent.
`TreeComponent(java.lang.String id, Component parent, TreeModel model)` Constructor for TreeComponent.

Method Summary
`void` | `collapse(java.lang.Object node)` collapses a node
`void` | `collapseAll()` collapses all nodes
`void` | `expand(java.lang.Object node)` expands a node
`void` | `expandSelected()` Deprecated. use expandSelected(boolean) instead
`void` | `expandSelected(boolean expandSelected)` expands the parents of the selected nodes.
`java.lang.String` | `getBorder()` gets the border attribute of the generated table.
`TreeBounding` | `getBounding()`
`ChangeOrderModel` | `getChangeOrderModel()` Returns the changeOrderModel.
`DeleteNodeModel` | `getDeleteNodeModel()`
`java.lang.String` | `getError()`
`TreeModel` | `getModel()` Returns the model.
`NodeRenderer` | `getNodeRenderer()` Returns the nodeRenderer.
`java.lang.String` | `getRenderId()` gets the renderId attribute of the generated table.
`SelectionModel` | `getSelectionModel()` returns the current selection
`java.lang.String` | `getTreeElementName()` Returns the treeElementName.
`java.lang.String` | `getWidth()`
`org.w3c.dom.Element` | `render(RequestContext context, org.w3c.dom.Document factory)` returns an Element with ownerDocument == `factory`.
`void` | `selectVisible()` sets the selection to the currently visible nodes
`void` | `setBorder(java.lang.String border)` sets the border attribute of the generated table.
`void` | `setBounding(TreeBounding bounding)`
`void` | `setChangeOrderModel(ChangeOrderModel changeOrderModel)` Sets the changeOrderModel.
`void` | `setComparator(java.util.Comparator comp)` comparator fuer die expanded nodes
`void` | `setCutPasteMode(boolean b)` sets the UI style for moving nodes (for TreeModels that implement ChangeOrderModel)
`void` | `setDeleteNodeModel(DeleteNodeModel model)`
`void` | `setError(java.lang.String string)`
`void` | `setModel(TreeModel newModel)` set the model to use
`void` | `setNodeRenderer(NodeRenderer nodeRenderer)` Sets the nodeRenderer.
`void` | `setRenderId(java.lang.String renderId)` sets the renderId attribute of the generated table.
`void` | `setSelectionModel(SelectionModel selectionModel)` changes the selection.
`void` | `setTreeElementName(java.lang.String treeElementName)` Sets the treeElementName.
`void` | `setWidth(java.lang.String string)`

Methods inherited from class com.tonbeller.wcf.component.NestableComponentSupport
`render`

Methods inherited from class com.tonbeller.wcf.component.ComponentSupport
`addFormListener, destroy, getBookmarkState, getDispatcher, getForm, getId, getLocale, getNextView, getParent, getRoleExpr, initialize, isAutoValidate, isListeningTo, isVisible, removeFormListener, request, revert, setAutoValidate, setBookmarkState, setId, setNextView, setParent, setRoleExpr, setVisible, validate, valueBound, valueUnbound`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface com.tonbeller.wcf.component.Component
`getParent, isListeningTo, setNextView`

Methods inherited from interface com.tonbeller.wcf.controller.RequestListener
`request`

Methods inherited from interface com.tonbeller.wcf.component.FormListener
`revert, validate`

Methods inherited from interface com.tonbeller.wcf.component.Visible
`isVisible, setVisible`

Methods inherited from interface com.tonbeller.wcf.component.LifeCycle
`destroy, initialize`

Constructor Detail

### TreeComponent

    public TreeComponent(java.lang.String id,
                         Component parent)

  Constructor for TreeComponent.

### TreeComponent

    public TreeComponent(java.lang.String id,
                         Component parent,
                         TreeModel model)

  Constructor for TreeComponent.

Method Detail

### setComparator

    public void setComparator(java.util.Comparator comp)

  comparator fuer die expanded nodes

### setModel

    public void setModel(TreeModel newModel)

  set the model to use

### render

    public org.w3c.dom.Element render(RequestContext context,
                                      org.w3c.dom.Document factory)
                               throws java.lang.Exception

  Description copied from interface: `NestableComponent`
  returns an Element with ownerDocument == `factory`.

  Throws:
    `java.lang.Exception`

### getSelectionModel

    public SelectionModel getSelectionModel()

  returns the current selection

### setSelectionModel

    public void setSelectionModel(SelectionModel selectionModel)

  changes the selection. Must call initialize() first.

### collapse

    public void collapse(java.lang.Object node)

  collapses a node

### expand

    public void expand(java.lang.Object node)

  expands a node

### collapseAll

    public void collapseAll()

  collapses all nodes

### expandSelected

    public void expandSelected()

  Deprecated. use expandSelected(boolean) instead

  expands the parents of the selected nodes. So all selected nodes will be visible

### expandSelected

    public void expandSelected(boolean expandSelected)

  expands the parents of the selected nodes. So all selected nodes will be visible

  Parameters:
    `expandSelected` - true, if the selected nodes should be expanded too (in case they have children)

### selectVisible

    public void selectVisible()

  sets the selection to the currently visible nodes

### getModel

    public TreeModel getModel()

  Returns the model.

  Returns:
    TreeModel

### getNodeRenderer

    public NodeRenderer getNodeRenderer()

  Returns the nodeRenderer.

  Returns:
    NodeRenderer

### getTreeElementName

    public java.lang.String getTreeElementName()

  Returns the treeElementName.

  Returns:
    String

### setNodeRenderer

    public void setNodeRenderer(NodeRenderer nodeRenderer)

  Sets the nodeRenderer. If NodeRenderer is a RequestListener it will be registered as a default listener (i.e. receives all requests).

  If NodeRenderer is a RenderListener, it will be informed when rendering starts and stops (e.g. to clear RequestListeners that corresponds to buttons)

  Parameters:
    `nodeRenderer` - The nodeRenderer to set
  See Also:
    `RequestListeningNodeRenderer`

### setTreeElementName

    public void setTreeElementName(java.lang.String treeElementName)

  Sets the treeElementName.

  Parameters:
    `treeElementName` - The treeElementName to set

### getChangeOrderModel

    public ChangeOrderModel getChangeOrderModel()

  Returns the changeOrderModel.

  Returns:
    ChangeOrderModel

### setChangeOrderModel

    public void setChangeOrderModel(ChangeOrderModel changeOrderModel)

  Sets the changeOrderModel.

  Parameters:
    `changeOrderModel` - The changeOrderModel to set

### setCutPasteMode

    public void setCutPasteMode(boolean b)

  sets the UI style for moving nodes (for TreeModels that implement ChangeOrderModel)

  See Also:
    `ChangeOrderModel`

### getBorder

    public java.lang.String getBorder()

  gets the border attribute of the generated table. Overrides the global stylesheet parameter "border".

  Returns:
    the border attribute or null

### setBorder

    public void setBorder(java.lang.String border)

  sets the border attribute of the generated table. Overrides the global stylesheet parameter "border".

  Parameters:
    `border` - the border attribute or null to use the stylesheet parameter

### setRenderId

    public void setRenderId(java.lang.String renderId)

  sets the renderId attribute of the generated table. Overrides the global stylesheet parameter "renderId".

  Parameters:
    `renderId` - the renderId attribute or null to use the stylesheet parameter

### getRenderId

    public java.lang.String getRenderId()

  gets the renderId attribute of the generated table. Overrides the global stylesheet parameter "renderId".

  Returns:
    the renderId attribute or null

### getWidth

    public java.lang.String getWidth()

### setWidth

    public void setWidth(java.lang.String string)

### getDeleteNodeModel

    public DeleteNodeModel getDeleteNodeModel()

### setDeleteNodeModel

    public void setDeleteNodeModel(DeleteNodeModel model)

### getError

    public java.lang.String getError()

### setError

    public void setError(java.lang.String string)

### getBounding

    public TreeBounding getBounding()

### setBounding

    public void setBounding(TreeBounding bounding)

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD