p3j.gui.panels.projections
Interface IProjectionTree

All Known Implementing Classes:
ProjectionTreePanel, ResultTreePanel

public interface IProjectionTree

Interface for all ProjectionTreeNode entities to manipulate and notify their projection tree. Created: August 27, 2008

Author:
Christina Bohk, Roland Ewald

Method Summary
 void cleanTree()
          Cleans the tree from unnecessary leaves.
 SetNode createNewSetStructure(SetTypeNode stNode, Set set)
          Creates all substructures for displaying a set.
 JTree getTree()
          Get the actual tree component.
 DefaultTreeModel getTreeModel()
          Get the model of the tree.
 void nodeAdded(ParameterInstanceNode node, int childIndex)
          Notifies tree that the given node as a new child at the given index.
 void recursiveRefresh(ProjectionTreeNode<?> node)
          Recursively refreshes the node names of node in the sub-tree below the given node.
 void refreshNode(ProjectionTreeNode<?> node)
          Refresh a single node in the tree.
 void refreshNodeSubStructure(ProjectionTreeNode<?> node)
          Refreshed the sub-structures of the node in the tree.
 void removeNode(ProjectionTreeNode<?> node)
          Removes given node.
 void removeNodes(ProjectionTreeNode<?> node, Collection<? extends Object> repRemovObjects)
          Removes all nodes that represent the objects given in the collection.
 void selectNode(ProjectionTreeNode<?> node)
          Selects a given node.
 void totalRefresh()
          Totally refreshes the projection tree.
 

Method Detail

getTreeModel

DefaultTreeModel getTreeModel()
Get the model of the tree. Useful to propagate updates etc.

Returns:
model of the projection tree

getTree

JTree getTree()
Get the actual tree component. Useful for selection updates etc.

Returns:
actual tree component

refreshNode

void refreshNode(ProjectionTreeNode<?> node)
Refresh a single node in the tree.

Parameters:
node - the node to be refreshed

refreshNodeSubStructure

void refreshNodeSubStructure(ProjectionTreeNode<?> node)
Refreshed the sub-structures of the node in the tree.

Parameters:
node - the node of which the sub-structures shall be refreshed

nodeAdded

void nodeAdded(ParameterInstanceNode node,
               int childIndex)
Notifies tree that the given node as a new child at the given index.

Parameters:
node - node with new child
childIndex - index of the new child

selectNode

void selectNode(ProjectionTreeNode<?> node)
Selects a given node.

Parameters:
node - the node to be selected

recursiveRefresh

void recursiveRefresh(ProjectionTreeNode<?> node)
Recursively refreshes the node names of node in the sub-tree below the given node.

Parameters:
node - the node of which the subtree shall be refreshed

removeNode

void removeNode(ProjectionTreeNode<?> node)
Removes given node.

Parameters:
node - the node to be removed

removeNodes

void removeNodes(ProjectionTreeNode<?> node,
                 Collection<? extends Object> repRemovObjects)
Removes all nodes that represent the objects given in the collection.

Parameters:
node - the node from which to start looking
repRemovObjects - collection of the represented object of the nodes to be removed

cleanTree

void cleanTree()
Cleans the tree from unnecessary leaves. This could be an empty generation etc.


createNewSetStructure

SetNode createNewSetStructure(SetTypeNode stNode,
                              Set set)
Creates all substructures for displaying a set.

Parameters:
stNode - the Settype node the set belongs to
set - the set for which the structure shall be created
Returns:
the set node at the top of the subtree

totalRefresh

void totalRefresh()
Totally refreshes the projection tree. All nodes beneath the ProjectionNode are re-created and re-initialized.



Copyright © 2012. All Rights Reserved.