org.argouml.cognitive
Class Design

java.lang.Object
  extended byjava.util.Observable
      extended byorg.argouml.cognitive.DesignMaterial
          extended byorg.argouml.cognitive.Design
All Implemented Interfaces:
org.tigris.gef.ui.Highlightable, Serializable

public class Design
extends DesignMaterial

A composite DesignMaterial that contains other DesignMaterial's.

See Also:
Serialized Form

Field Summary
private  Vector subdesigns
          The contained DesignMaterial's (including other Design's).
 
Fields inherited from class org.argouml.cognitive.DesignMaterial
 
Fields inherited from class java.util.Observable
 
Constructor Summary
Design()
          Construct a new Design.
 
Method Summary
 void addElement(DesignMaterial dm)
          Add the given DesignMaterial to this Design, if it is not already.
 void critique(Designer d)
          Critique a Design by critiquing each contained DesignMaterial.
 Enumeration elements()
          Enumerate all contained DesignMaterial's.
 Vector getSubdesigns()
          Reply a vector of contained DesignMaterial's.
 Iterator iterator()
          Iterate through all contained DesignMaterial's.
 void removeElement(DesignMaterial dm)
          Remove the given DesignMaterial from this Design.
 void setSubdesigns(Vector subs)
          Set the vector of contained DesignMaterial's.
 String toString()
          Reply a string that describes this Design.
 boolean transativelyIncludes(DesignMaterial dm)
          Reply true if the given DesignMaterial is part of this design.
 
Methods inherited from class org.argouml.cognitive.DesignMaterial
addParent, addPersistantObserver, addPropertyChangeListener, canPut, changedProperty, define, define, define, dispose, firePropertyChange, firePropertyChange, firePropertyChange, get, get, getBoolean, getBoolProperty, getBoolProperty, getHighlight, getIntProperty, getIntProperty, getProperty, getProperty, inform, keysIn, notifyObservers, notifyPersistantObservers, parents, put, put, put, put, removeParent, removePendingItems, removePersistObserver, removeProperty, removePropertyChangeListener, setHighlight, setProperty, setProperty, setProperty
 
Methods inherited from class java.util.Observable
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, setChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

subdesigns

private Vector subdesigns
The contained DesignMaterial's (including other Design's).

Constructor Detail

Design

public Design()
Construct a new Design. This method is currently empty. The _subdesigns instance variable is set through an initializer.

Method Detail

getSubdesigns

public Vector getSubdesigns()
Reply a vector of contained DesignMaterial's.

Returns:
the contained design material

setSubdesigns

public void setSubdesigns(Vector subs)
Set the vector of contained DesignMaterial's.

Parameters:
subs - replace the complete list of dm

elements

public Enumeration elements()
Enumerate all contained DesignMaterial's.

Returns:
an enumeration for all dm

iterator

public Iterator iterator()
Iterate through all contained DesignMaterial's.

Returns:
an iterator for the subdesigns

transativelyIncludes

public boolean transativelyIncludes(DesignMaterial dm)
Reply true if the given DesignMaterial is part of this design.

Parameters:
dm - the design material
Returns:
true if the dm is included

addElement

public void addElement(DesignMaterial dm)
Add the given DesignMaterial to this Design, if it is not already.

Parameters:
dm - the design material

removeElement

public void removeElement(DesignMaterial dm)
Remove the given DesignMaterial from this Design.

Parameters:
dm - the design material

critique

public void critique(Designer d)
Critique a Design by critiquing each contained DesignMaterial.

TODO: in the future Argo will use less tree walking and more trigger-driven critiquing. I.e., critiquing will be done in response to specific manipulations in the editor.

Overrides:
critique in class DesignMaterial
Parameters:
d - the designer
See Also:
DesignMaterial.critique(org.argouml.cognitive.Designer)

toString

public String toString()
Reply a string that describes this Design. Inteneded for debugging.

See Also:
Object.toString()


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