|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.argouml.cognitive.Designer
public final class Designer
This class models the designer who is building a complex design in some application domain and needs continuous feedback to aid in the making of good design decisions.
This area needs work, especially as it is a central idea of Argo.
Currently (almost) everything is hardcoded. What can be configurable??
The ToDoList is dependent on this class, i.e. each designer has its ToDoList.
Each designer has his own Agency, which is the only class that knows all the critics.
This class listens to property changes from ...?
A designer can create ToDo Items, just like the critics. Hence the designer implements the Poster interface.
TODO: There is a strong dependency cycle between Agency and Designer. They either need to be merged into a single class or partitioned differently, perhaps using an interface to break the cycle. The Designer singleton gets passed to almost every single part of the Critic subsystem, creating strong coupling throughout. - tfm 20070620
| Field Summary | |
|---|---|
static org.argouml.configuration.ConfigurationKey |
AUTO_CRITIQUE
The key to remember persistently the latest choice made for the menuitem Toggle Auto-Critique. |
static java.lang.String |
MODEL_TODOITEM_ADDED
Property Names. |
static java.lang.String |
MODEL_TODOITEM_DISMISSED
Property Names. |
| Method Summary | |
|---|---|
static void |
addListener(java.beans.PropertyChangeListener pcl)
Adds a property change listener. |
boolean |
canFixIt(ToDoItem item)
|
static void |
clearCritiquing()
Clear all critiquing results. |
boolean |
containsKnowledgeType(java.lang.String type)
|
void |
critique(java.lang.Object des)
Look for potential problems or open issues in the given design. |
void |
critiqueASAP(java.lang.Object dm,
java.lang.String reason)
A modelelement has been changed. |
void |
determineActiveCritics()
Ask this designer's agency to select which critics should be active. |
static void |
disableCritiquing()
Disable critiquing. |
static void |
enableCritiquing()
Enable critiquing. |
java.lang.String |
expand(java.lang.String desc,
ListSet offs)
Customize the description string just before it is displayed. |
static void |
firePropertyChange(java.lang.String property,
java.lang.Object oldValue,
java.lang.Object newValue)
|
void |
fixIt(ToDoItem item,
java.lang.Object arg)
TODO: Not implemented yet. |
Agency |
getAgency()
Reply the Agency object that is helping this Designer. |
boolean |
getAutoCritique()
autoCritique and critiquingInterval are two prameters that control how the critiquing thread operates. |
org.tigris.gef.util.ChildGenerator |
getChildGenerator()
|
javax.swing.Icon |
getClarifier()
|
int |
getCritiquingInterval()
Get the Critiquing interval. |
static java.lang.Object |
getCritiquingRoot()
|
DecisionModel |
getDecisionModel()
|
java.lang.String |
getDesignerName()
query the name of the designer. |
java.util.List<Goal> |
getGoalList()
|
GoalModel |
getGoalModel()
|
java.util.Vector<Goal> |
getGoals()
Deprecated. for 0.25.4 by tfmorris. Use getGoalList(). |
java.util.Properties |
getPrefs()
Reply the designers personal preferences. |
java.util.List<Decision> |
getSupportedDecisions()
|
java.util.List<Goal> |
getSupportedGoals()
|
ToDoList |
getToDoList()
|
boolean |
hasGoal(java.lang.String goal)
Record the extent to which the designer desires the given goal. |
void |
inform(ToDoItem item)
Inform the human designer using this system that the given ToDoItem should be considered. |
boolean |
isConsidering(Decision d)
|
static boolean |
isUserWorking()
|
void |
propertyChange(java.beans.PropertyChangeEvent pce)
|
static void |
removeListener(java.beans.PropertyChangeListener p)
Removes a property change listener. |
void |
removeToDoItems(ToDoList list)
Remove all the items in the given list from my list. |
void |
run()
Continuously select and execute critics against this designer's design. |
void |
setAutoCritique(boolean b)
|
void |
setChildGenerator(org.tigris.gef.util.ChildGenerator cg)
|
void |
setClarifier(javax.swing.Icon clar)
Get the generic clarifier for this designer/poster. |
void |
setCritiquingInterval(int i)
Set the Critiquing Interval. |
static void |
setCritiquingRoot(java.lang.Object d)
|
void |
setDecisionPriority(java.lang.String decision,
int priority)
Record the extent to which the designer is considering the given decision. |
void |
setDesignerName(java.lang.String name)
set the name of this designer. |
void |
setGoalPriority(java.lang.String goal,
int priority)
|
static void |
setSaveAction(javax.swing.Action theSaveAction)
Setter for saveAction. |
static void |
setUserWorking(boolean working)
|
void |
snooze()
Temporarily disable this Poster. |
void |
spawnCritiquer(java.lang.Object root)
Start a separate thread to continually select and execute critics that are relevant to this designer's work. |
void |
startDesiring(java.lang.String goal)
|
boolean |
stillValid(ToDoItem i,
Designer d)
This method returns true. |
void |
stopDesiring(java.lang.String goal)
|
boolean |
supports(Decision d)
|
boolean |
supports(Goal g)
|
static Designer |
theDesigner()
|
java.lang.String |
toString()
|
void |
unsnooze()
Unsnooze this Poster, it may resume posting without further delay. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final org.argouml.configuration.ConfigurationKey AUTO_CRITIQUE
public static final java.lang.String MODEL_TODOITEM_ADDED
public static final java.lang.String MODEL_TODOITEM_DISMISSED
| Method Detail |
|---|
public static Designer theDesigner()
public void spawnCritiquer(java.lang.Object root)
root - the rootobject the critiques will checkpublic void run()
spawnCritiquer(Object) is used to start a
Thread that runs this.
run in interface java.lang.Runnable
public void critiqueASAP(java.lang.Object dm,
java.lang.String reason)
dm - the design materialreason - the reasonpublic void critique(java.lang.Object des)
des - the design to be checkedpublic static void addListener(java.beans.PropertyChangeListener pcl)
pcl - The property change listener to addpublic static void removeListener(java.beans.PropertyChangeListener p)
p - The class to remove as a property change listener.public static void setSaveAction(javax.swing.Action theSaveAction)
theSaveAction - The new saveAction.
public static void firePropertyChange(java.lang.String property,
java.lang.Object oldValue,
java.lang.Object newValue)
property - the property nameoldValue - the old valuenewValue - the new valuepublic void propertyChange(java.beans.PropertyChangeEvent pce)
propertyChange in interface java.beans.PropertyChangeListenerpublic void determineActiveCritics()
public boolean getAutoCritique()
public void setAutoCritique(boolean b)
b - true to set auto critique on, false for offgetAutoCritique()public int getCritiquingInterval()
public void setCritiquingInterval(int i)
i - The new interval.public static void disableCritiquing()
public static void enableCritiquing()
public static void clearCritiquing()
public static void setCritiquingRoot(java.lang.Object d)
d - the critiquing rootpublic static java.lang.Object getCritiquingRoot()
public org.tigris.gef.util.ChildGenerator getChildGenerator()
public void setChildGenerator(org.tigris.gef.util.ChildGenerator cg)
cg - the childgeneratorpublic DecisionModel getDecisionModel()
public GoalModel getGoalModel()
@Deprecated public java.util.Vector<Goal> getGoals()
getGoalList().
public java.util.List<Goal> getGoalList()
public boolean stillValid(ToDoItem i,
Designer d)
ToDoItem's that are posted by the designer are assumed to be valid until the designer explicitly removes them. Perhaps in the future the designer could specify a condition to determine when his items expire.
stillValid in interface Posteri - the todo itemd - the designer
ToDoItem,
Critic.stillValid(org.argouml.cognitive.ToDoItem, org.argouml.cognitive.Designer),
Poster.stillValid(
org.argouml.cognitive.ToDoItem, org.argouml.cognitive.Designer)public boolean supports(Decision d)
supports in interface Posterd - the decision
public java.util.List<Decision> getSupportedDecisions()
getSupportedDecisions in interface Posterpublic boolean supports(Goal g)
supports in interface Posterg - the goal
public java.util.List<Goal> getSupportedGoals()
getSupportedGoals in interface Posterpublic boolean containsKnowledgeType(java.lang.String type)
containsKnowledgeType in interface Postertype - the knowledge type
public java.lang.String expand(java.lang.String desc,
ListSet offs)
Poster
expand in interface Posterdesc - the descriptionoffs - the offenders
public javax.swing.Icon getClarifier()
getClarifier in interface Posterpublic void setClarifier(javax.swing.Icon clar)
clar - the clarifier iconpublic ToDoList getToDoList()
ToDoListpublic void removeToDoItems(ToDoList list)
list - the items to be removedpublic java.util.Properties getPrefs()
public boolean isConsidering(Decision d)
d - the decision
public void setDecisionPriority(java.lang.String decision,
int priority)
decision - the decisionpriority - the prioritypublic boolean hasGoal(java.lang.String goal)
goal - the given goal
public void setGoalPriority(java.lang.String goal,
int priority)
goal - the given goalpriority - the prioritypublic void startDesiring(java.lang.String goal)
goal - the goal I (me, the designer) desirepublic void stopDesiring(java.lang.String goal)
goal - the goal that is not desired any morepublic void snooze()
Poster
snooze in interface Posterpublic void unsnooze()
Poster
unsnooze in interface Posterpublic Agency getAgency()
public void inform(ToDoItem item)
item - the todo itempublic void setDesignerName(java.lang.String name)
name - the designer namepublic java.lang.String getDesignerName()
public java.lang.String toString()
toString in class java.lang.Object
public void fixIt(ToDoItem item,
java.lang.Object arg)
Poster
fixIt in interface Posteritem - the todo itemarg - the design material (?)public boolean canFixIt(ToDoItem item)
canFixIt in interface Posteritem - the todo item
public static void setUserWorking(boolean working)
working - true if the user is working
(i.e. this is not the startup phase of ArgoUML)public static boolean isUserWorking()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
| ArgoUML © 1996-2006 | ArgoUML Homepage | ArgoUML Cookbook |