|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjavax.swing.tree.DefaultMutableTreeNode
eu.beesoft.gaia.swing.ExplorableTreeNode
eu.beesoft.gaia.swing.TreeTableNode
eu.beesoft.gantt.treetable.GanttNode
public final class GanttNode
A GanttNode is a general-purpose node in a gantt tree data structure.
A TimelineObject is used as an user object in tree node. Each user
object must implement this interface.
Instances of GanttNode are exploited by ChartComponent and
Layer instances for painting. These methods are designated for this
purpose:
| Field Summary |
|---|
| Fields inherited from class javax.swing.tree.DefaultMutableTreeNode |
|---|
allowsChildren, EMPTY_ENUMERATION, children, parent, userObject |
| Fields inherited from interface javax.swing.undo.StateEditable |
|---|
RCSID |
| Constructor Summary | |
|---|---|
GanttNode(GanttModel model,
TimelineObject userObject)
Creates new instance of GanttNode. |
|
| Method Summary | |
|---|---|
void |
add(javax.swing.tree.MutableTreeNode child)
Adds given child to node children. |
protected void |
exploreImpl()
Implementation of method exploreImpl() from TreeTableNode. |
java.awt.Rectangle |
getBounds()
Returns bounds of this node in
ChartComponent coordinates. |
GanttModel |
getModel()
Returns instance of GanttModel to which this node belongs. |
TimelineObject |
getTimelineObject()
Returns user object from this node. |
java.lang.Object |
getValueAt(int column)
Returns value for given column. |
void |
insert(javax.swing.tree.MutableTreeNode child,
int index)
Inserts given child into a node children. |
boolean |
isVisible()
Returns visibility state of this node. |
void |
propertyChange(java.beans.PropertyChangeEvent event)
Implementation of PropertyChangeListener interface. |
void |
remove(int childIndex)
Removes the child at the specified index from this node's children and sets that node's parent to null. |
void |
remove(javax.swing.tree.MutableTreeNode aChild)
Removes aChild from this node's child array, giving it a null parent. |
void |
removeAllChildren()
Removes all of this node's children, setting their parents to null. |
void |
restoreState(java.util.Hashtable<?,?> state)
Extracts any relevant state out of state. |
void |
setTimelineObject(TimelineObject object)
Sets user object for this node. |
void |
setUserObject(java.lang.Object object)
Sets user object for this node. |
void |
setVisible(boolean isVisible)
Sets value for the isVisible property. |
void |
storeState(java.util.Hashtable<java.lang.Object,java.lang.Object> state)
Places any relevant state into a state. |
| Methods inherited from class eu.beesoft.gaia.swing.TreeTableNode |
|---|
setValueAt, toString |
| Methods inherited from class eu.beesoft.gaia.swing.ExplorableTreeNode |
|---|
explore, getAllowsChildren, isExplorable, isExplored, isLeaf, setExplorable |
| Methods inherited from class javax.swing.tree.DefaultMutableTreeNode |
|---|
breadthFirstEnumeration, clone, depthFirstEnumeration, getDepth, getFirstChild, getFirstLeaf, getChildAfter, getChildAt, getChildBefore, getChildCount, getIndex, getLastChild, getLastLeaf, getLeafCount, getLevel, getNextLeaf, getNextNode, getNextSibling, getParent, getPath, getPathToRoot, getPreviousLeaf, getPreviousNode, getPreviousSibling, getRoot, getSharedAncestor, getSiblingCount, getUserObject, getUserObjectPath, children, isNodeAncestor, isNodeDescendant, isNodeChild, isNodeRelated, isNodeSibling, isRoot, pathFromAncestorEnumeration, postorderEnumeration, preorderEnumeration, removeFromParent, setAllowsChildren, setParent |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public GanttNode(GanttModel model,
TimelineObject userObject)
model - Model to which this node belongsuserObject - | Method Detail |
|---|
public GanttModel getModel()
public void setUserObject(java.lang.Object object)
setUserObject in interface javax.swing.tree.MutableTreeNodesetUserObject in class javax.swing.tree.DefaultMutableTreeNodeobject - new user object for nodepublic TimelineObject getTimelineObject()
public void setTimelineObject(TimelineObject object)
object - new user object for nodepublic void add(javax.swing.tree.MutableTreeNode child)
ChartComponent.
add in class javax.swing.tree.DefaultMutableTreeNodechild - Node to add. This node can be instance of GanttNode only.
public void insert(javax.swing.tree.MutableTreeNode child,
int index)
ChartComponent.
insert in interface javax.swing.tree.MutableTreeNodeinsert in class javax.swing.tree.DefaultMutableTreeNodechild - Node to insert. This node can be instance of GanttNode only.index - the index in this node's child array where this node is to be
insertedpublic void remove(int childIndex)
ChartComponent.
remove in interface javax.swing.tree.MutableTreeNoderemove in class javax.swing.tree.DefaultMutableTreeNodechildIndex - the index in this node's child array of the child to removepublic void remove(javax.swing.tree.MutableTreeNode aChild)
ChartComponent.
remove in interface javax.swing.tree.MutableTreeNoderemove in class javax.swing.tree.DefaultMutableTreeNodeaChild - a child of this node to removepublic void removeAllChildren()
ChartComponent.
removeAllChildren in class javax.swing.tree.DefaultMutableTreeNodepublic java.lang.Object getValueAt(int column)
TreeTableNode. Redirects
to method getValueAt() in GanttModel.
getValueAt in class TreeTableNodecolumn - the column whose value is to be queried
protected void exploreImpl()
TreeTableNode. Redirects to
method explore()
in GanttModel.
exploreImpl in class ExplorableTreeNodepublic java.awt.Rectangle getBounds()
bounds of this node in
ChartComponent coordinates.
This method should be called from Layer instances only.
public boolean isVisible()
public void setVisible(boolean isVisible)
ChartComponent only.
isVisible - new value for the isVisible propertypublic void restoreState(java.util.Hashtable<?,?> state)
StateEditable interface for undo / redo
functionality.
restoreState in interface javax.swing.undo.StateEditablestate - Hashtable with values for restorepublic void storeState(java.util.Hashtable<java.lang.Object,java.lang.Object> state)
StateEditable interface for undo / redo
functionality.
storeState in interface javax.swing.undo.StateEditablestate - Hashtable to store valuesspublic void propertyChange(java.beans.PropertyChangeEvent event)
propertyChange in interface java.beans.PropertyChangeListener
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||