## org.eclipse.datatools.sqltools.plan.treeplan
Class TreeExecutionPlanDocument

    java.lang.Object
      org.eclipse.datatools.sqltools.plan.treeplan.TreeExecutionPlanDocument

All Implemented Interfaces:
  IExecutionPlanDocument

    public class TreeExecutionPlanDocument

extends java.lang.Object
implements IExecutionPlanDocument

This is the model for tree-structure graphic execution plan. `TreePlanDrawer` is responsible for drawing a tree-structure graphic plan on a `Canvas`

Author:
  Dafan Yang
See Also:
  `TreePlanDrawer`

Constructor Summary
`TreeExecutionPlanDocument(TreePlanNodeComponent rootNode, java.lang.String name, java.lang.Object data)` Constructor

Method Summary
`java.lang.Object` `getData()` Returns the data of this plan document
`int` `getMaxWidth()` Returns the maximum number of child nodes at the same depth
`java.lang.String` `getName()` Returns the name of this document
`TreePlanNodeComponent` `getRootNode()` Returns the root node
`int` `getWidth(int depth)` Returns the width at the given depth
`void` `setData(java.lang.Object data)` Sets the data of this plan document
`void` `setName(java.lang.String name)` Sets the name for this document
`void` `setRootNode(TreePlanNodeComponent rootNode)` Sets the root node for this execution plan document

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

Constructor Detail

### TreeExecutionPlanDocument

    public TreeExecutionPlanDocument(TreePlanNodeComponent rootNode,
                                     java.lang.String name,
                                     java.lang.Object data)

  Constructor

  Parameters:
    `rootNode` - the root node
    `name` - the name for this document
    `data` - the arbitray data

Method Detail

### getData

    public java.lang.Object getData()

  Returns the data of this plan document

  Returns:
    the data of this plan document

### getMaxWidth

    public int getMaxWidth()

  Returns the maximum number of child nodes at the same depth

  Returns:
    the maximum number of child nodes at the same depth

### getName

    public java.lang.String getName()

  Returns the name of this document

  Specified by:
    `getName` in interface `IExecutionPlanDocument`
  Returns:
    the name of this document

### getRootNode

    public TreePlanNodeComponent getRootNode()

  Returns the root node

  Returns:
    the root node

### getWidth

    public int getWidth(int depth)

  Returns the width at the given depth

  Parameters:
    `depth` - the depth
  Returns:
    the withd at the given depth

### setData

    public void setData(java.lang.Object data)

  Sets the data of this plan document

  Parameters:
    `data` - the data

### setName

    public void setName(java.lang.String name)

  Sets the name for this document

  Parameters:
    `name` - the name for this document

### setRootNode

    public void setRootNode(TreePlanNodeComponent rootNode)

  Sets the root node for this execution plan document

  Parameters:
    `rootNode` - the root node