org.argouml.ui
Class PerspectiveSupport

java.lang.Object
  extended byorg.argouml.ui.PerspectiveSupport
Direct Known Subclasses:
TreeModelSupport

public class PerspectiveSupport
extends Object

Helper class for tree models that provides help building perspectives out of gorules.

Since:
0.13.5, Created on 15 April 2003

Field Summary
private  Vector goRules
          The go rules that this Tree model uses to build child nodes.
private  String name
          name
private static Vector rules
          list of all possible rules in the collection Todolist specific
 
Constructor Summary
private PerspectiveSupport()
           
  PerspectiveSupport(String n)
          Creates a new instance of PerspectiveSupport
  PerspectiveSupport(String n, Vector subs)
          The constructor.
 
Method Summary
 void addSubTreeModel(TreeModel tm)
          Adds a rule to the perspective that will generate child nodes for any given parent node.
protected  Vector getGoRules()
           
 String getName()
           
 Vector getSubTreeModels()
          Get the rules that together form the perspective.
static void registerRule(TreeModel rule)
          TODO: factor out
 void removeSubTreeModel(TreeModel tm)
          Remove a rule from the perspective that will generate child nodes for any given parent node.
 void setName(String s)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

goRules

private Vector goRules
The go rules that this Tree model uses to build child nodes.


name

private String name
name


rules

private static Vector rules
list of all possible rules in the collection Todolist specific

Constructor Detail

PerspectiveSupport

private PerspectiveSupport()

PerspectiveSupport

public PerspectiveSupport(String n)
Creates a new instance of PerspectiveSupport

Parameters:
n - the name to be localized

PerspectiveSupport

public PerspectiveSupport(String n,
                          Vector subs)
The constructor.

TODO: Is this constructor used? What is the purpose with it?

Parameters:
n - the name to be localized
subs - the go rules
Method Detail

addSubTreeModel

public void addSubTreeModel(TreeModel tm)
Adds a rule to the perspective that will generate child nodes for any given parent node.

Parameters:
tm - the tree model to be added

removeSubTreeModel

public void removeSubTreeModel(TreeModel tm)
Remove a rule from the perspective that will generate child nodes for any given parent node.

Parameters:
tm - the treemodel to be removed

getSubTreeModels

public Vector getSubTreeModels()
Get the rules that together form the perspective.

Returns:
the rules that form the perspecive

getName

public String getName()
Returns:
the name

setName

public void setName(String s)
Parameters:
s - the name

toString

public String toString()
See Also:
Object.toString()

registerRule

public static void registerRule(TreeModel rule)
TODO: factor out

Parameters:
rule - the rule to be added

getGoRules

protected Vector getGoRules()
Returns:
Returns the _goRules.


ArgoUML © 1996-2004 (20050222)ArgoUML HomepageArgoUML Developers' pageArgoUML Cookbook