de.jaret.util.ui.timebars.model
Class DefaultHierarchicalTimeBarModel

java.lang.Object
  extended by de.jaret.util.ui.timebars.model.DefaultHierarchicalTimeBarModel
All Implemented Interfaces:
HierarchicalTimeBarModel

public class DefaultHierarchicalTimeBarModel
extends java.lang.Object
implements HierarchicalTimeBarModel

Default implementation of t a HIerarchicalTimeBarModel.

Version:
$Id: DefaultHierarchicalTimeBarModel.java 800 2008-12-27 22:27:33Z kliem $
Author:
Peter Kliem

Field Summary
protected  int _depth
          current depth of the model tree.
protected  TimeBarNode _rootNode
          root node of the tree.
 
Constructor Summary
DefaultHierarchicalTimeBarModel(TimeBarNode root)
          Construct the model.
 
Method Summary
 int getDepth()
          Retrieve the depth of the hierarchy.
 TimeBarNode getRootNode()
          Retrieve the root node of the hierarchy.
 void setDepth(int depth)
          Little helper.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_rootNode

protected TimeBarNode _rootNode
root node of the tree.


_depth

protected int _depth
current depth of the model tree.

Constructor Detail

DefaultHierarchicalTimeBarModel

public DefaultHierarchicalTimeBarModel(TimeBarNode root)
Construct the model.

Parameters:
root - root node
Method Detail

getDepth

public int getDepth()
Retrieve the depth of the hierarchy.

Specified by:
getDepth in interface HierarchicalTimeBarModel
Returns:
depth of the hierarchy

setDepth

public void setDepth(int depth)
Little helper. May be removed in future revisions.

Specified by:
setDepth in interface HierarchicalTimeBarModel
Parameters:
depth - the depth to set

getRootNode

public TimeBarNode getRootNode()
Retrieve the root node of the hierarchy.

Specified by:
getRootNode in interface HierarchicalTimeBarModel
Returns:
the root node


Copyright © 2012. All Rights Reserved.