|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.util.Observable | +--org.argouml.cognitive.DesignMaterial
Abstract class to represent the materials being used in design. The nature of these materials is domain-dependent. For example, in the domain of software architecture the design materials are software components and connectors. There is not much that can be said about generic design materials at this level of abstraction. But the Argo kernel provides for all DesignMaterials to (1) be Observable, (2) have Properties (in addition to instance variables supplied in subclasses) that can be shown in a property sheet, (3) ask Agency to critique them, (4) keep a list of the ToDoItem's that are generated from that critiquing, (5) be notified when the user selects them in an editor, (6) highlight themselves to draw the designer's attention.
TODO: should I implement virtual copying? or instance-based inheritiance of properties? How are properties shared (it at all)? For examples of subclasing see the package jargo.softarch. For instructions on how to define subclasses for DesignMaterials in your domain, see the Argo cookbook entry for define_design_material
Design
, Serialized FormField Summary | |
protected boolean |
_highlight
|
protected java.util.Vector |
_parents
Other DesignMaterial's that contain this one. |
protected ToDoList |
_pendingItems
ToDoList items that are on the designers ToDoList because of this material. |
protected java.util.Vector |
_persistObservers
Observers of this object that should be saved and loaded with this object. |
protected java.util.Vector |
_propertyListeners
|
protected java.util.Hashtable |
_props
"Soft" Properties that this DesignMaterial may have, but we do not want to allocate an instance variable to them. |
Constructor Summary | |
DesignMaterial()
Construct a new DesignMaterial with empty Properties. |
|
DesignMaterial(java.util.Hashtable ht)
Construct a new DesignMaterial with the given Properties. |
Method Summary | |
void |
addPersistantObserver(java.util.Observer o)
|
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener)
|
boolean |
canPut(java.lang.String key)
|
void |
changedProperty(java.lang.String key)
|
void |
critique(Designer dsgr)
Critique this DesignMaterial and post ToDoItem's to the Designer's list. |
void |
define(java.lang.String k,
boolean v)
Set the value of a property iff it is not already set. |
void |
define(java.lang.String k,
int v)
Set the value of a property iff it is not already set. |
boolean |
define(java.lang.String k,
java.lang.Object v)
|
void |
dispose()
Remove this DesignMaterial from the design document and free up memory and other resources as much as possible. |
void |
firePropertyChange(java.lang.String propertyName,
boolean oldValue,
boolean newValue)
|
void |
firePropertyChange(java.lang.String propertyName,
int oldValue,
int newValue)
|
void |
firePropertyChange(java.lang.String propertyName,
java.lang.Object oldValue,
java.lang.Object newValue)
|
java.lang.Object |
get(java.lang.String k)
|
java.lang.Object |
get(java.lang.String key,
java.lang.Object defaultValue)
|
boolean |
getBoolean(java.lang.String k)
Convenient function for getting the value of boolean properties. |
boolean |
getBoolProperty(java.lang.String k)
Reply the value an boolean property, if not found reply false. |
boolean |
getBoolProperty(java.lang.String k,
boolean defaultValue)
Reply the value an int property, if not found reply defaultValue. |
boolean |
getHighlight()
|
int |
getIntProperty(java.lang.String k)
Reply the value an int property, if not found reply 0. |
int |
getIntProperty(java.lang.String k,
int defaultValue)
Reply the value an int property, if not found reply defaultValue. |
java.lang.Object |
getProperty(java.lang.String k)
Reply the value of one property, if not found reply null. |
java.lang.Object |
getProperty(java.lang.String key,
java.lang.Object defaultValue)
Reply the value of one property, if not found reply defaultValue. |
void |
inform(ToDoItem item)
When a critic produces a ToDoItem, both the Designer and the "offending" DesignMaterial's are notified. |
java.util.Enumeration |
keysIn(java.lang.String cat)
|
void |
notifyObservers(java.lang.Object arg)
|
void |
notifyPersistantObservers(java.lang.Object arg)
|
java.util.Enumeration |
parents()
Enumerate over all my parents. |
void |
put(java.util.Hashtable ht)
|
boolean |
put(java.lang.String k,
boolean v)
Convenient function for setting the value of boolean properties. |
boolean |
put(java.lang.String k,
int v)
Convenient function for setting the value of boolean properties. |
boolean |
put(java.lang.String k,
java.lang.Object v)
Set the value of a property. |
void |
removePendingItems(Designer dsgr)
Remove all the ToDoItem's generated by this DesignMaterial from the ToDoList of the given Designer. |
void |
removePersistObserver(java.util.Observer o)
|
java.lang.Object |
removeProperty(java.lang.String k)
Make the given property undefined. |
void |
removePropertyChangeListener(java.beans.PropertyChangeListener listener)
|
void |
setHighlight(boolean h)
Draw the Designer's attention to this DesignMaterial in all views. |
void |
setProperty(java.lang.String k,
boolean v)
|
void |
setProperty(java.lang.String k,
int v)
|
void |
setProperty(java.lang.String k,
java.lang.Object v)
|
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, toString, wait, wait, wait |
Field Detail |
protected java.util.Vector _persistObservers
protected transient java.util.Vector _propertyListeners
protected ToDoList _pendingItems
protected java.util.Vector _parents
protected java.util.Hashtable _props
protected boolean _highlight
Constructor Detail |
public DesignMaterial()
public DesignMaterial(java.util.Hashtable ht)
Method Detail |
public java.util.Enumeration parents()
public java.lang.Object getProperty(java.lang.String key, java.lang.Object defaultValue)
public java.lang.Object getProperty(java.lang.String k)
public java.lang.Object get(java.lang.String k)
public java.lang.Object get(java.lang.String key, java.lang.Object defaultValue)
public int getIntProperty(java.lang.String k)
public int getIntProperty(java.lang.String k, int defaultValue)
public boolean getBoolProperty(java.lang.String k)
public boolean getBoolProperty(java.lang.String k, boolean defaultValue)
public boolean put(java.lang.String k, java.lang.Object v)
public void put(java.util.Hashtable ht)
public boolean put(java.lang.String k, boolean v)
public boolean put(java.lang.String k, int v)
public void setProperty(java.lang.String k, java.lang.Object v)
public void setProperty(java.lang.String k, int v)
public void setProperty(java.lang.String k, boolean v)
public boolean define(java.lang.String k, java.lang.Object v)
public boolean canPut(java.lang.String key)
public java.util.Enumeration keysIn(java.lang.String cat)
public void define(java.lang.String k, boolean v)
public void define(java.lang.String k, int v)
public java.lang.Object removeProperty(java.lang.String k)
public boolean getBoolean(java.lang.String k)
public void critique(Designer dsgr)
public void removePendingItems(Designer dsgr)
public void dispose()
public void inform(ToDoItem item)
TODO: do I need a Clarifier object in the framework?
public void setHighlight(boolean h)
setHighlight
in interface org.tigris.gef.ui.Highlightable
public boolean getHighlight()
getHighlight
in interface org.tigris.gef.ui.Highlightable
public void changedProperty(java.lang.String key)
public void addPersistantObserver(java.util.Observer o)
public void removePersistObserver(java.util.Observer o)
public void notifyPersistantObservers(java.lang.Object arg)
public void notifyObservers(java.lang.Object arg)
notifyObservers
in class java.util.Observable
public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
addPropertyChangeListener
in interface org.tigris.gef.ui.Highlightable
public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
removePropertyChangeListener
in interface org.tigris.gef.ui.Highlightable
public void firePropertyChange(java.lang.String propertyName, boolean oldValue, boolean newValue)
public void firePropertyChange(java.lang.String propertyName, int oldValue, int newValue)
public void firePropertyChange(java.lang.String propertyName, java.lang.Object oldValue, java.lang.Object newValue)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ArgoUML (c) 1996-2002 |