org.graffiti.plugin
Class PluginPathNode

java.lang.Object
  extended by org.graffiti.plugin.PluginPathNode

public class PluginPathNode
extends Object

A PluginPathNode represents a node in the plug-in tree. It has a label and leaves (i.e. algorithms) and/or child nodes. PluginPathNodes are used to construct e.g. a plug-in menu with submenus.

Version:
$Revision$ $Date$
Author:
Kathrin Hanauer

Constructor Summary
PluginPathNode(String pathLabel, Algorithm[] algorithms, PluginPathNode[] children)
          Constructs a new PluginPathNode and its subtree.
 
Method Summary
 Algorithm[] getAlgorithms()
          Returns the node's algorithms (i.e.
 PluginPathNode[] getChildren()
          Returns the node's child nodes (i.e.
 String getPathLabel()
          Returns a label for the node.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PluginPathNode

public PluginPathNode(String pathLabel,
                      Algorithm[] algorithms,
                      PluginPathNode[] children)
Constructs a new PluginPathNode and its subtree. If you don't want to have any algorithms on this level, simply give an empty array or null for the 'algorithms' parameter. The same applies to the 'children' parameter.

Parameters:
pathLabel - the node's label
algorithms - the algorithms that belong directly to this node (its leaves)
children - the children/subnodes of this node
Method Detail

getChildren

public PluginPathNode[] getChildren()
Returns the node's child nodes (i.e. its subnodes) or null if there are none.

Returns:
the node's children or null.

getAlgorithms

public Algorithm[] getAlgorithms()
Returns the node's algorithms (i.e. its leaves) or null if there are none.

Returns:
the node's algorithms or null.

getPathLabel

public String getPathLabel()
Returns a label for the node.

Returns:
the node's label.


Generated at 2012-05-30 11:00:14 PM CEST