|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.Observable
org.argouml.cognitive.ToDoList
public class ToDoList
Implements a list of ToDoItem's.
It spawns a "sweeper" thread that periodically goes through the list and eliminates ToDoItem's that are no longer valid.
One difficulty designers face is keeping track of all the myriad details of their task. It is all too easy to skip a step in the design process, leave part of the design unspecified, or make a mistake that requires revision. ArgoUML provides the designer with a "to do" list user interface that presents action items in an organized form. These items can be suggestions from critics, reminders to finish steps in the process model, or personal notes entered by the designer. The choice control at the top of the "to do" list pane allow the designer to organize items in different ways: by priority, by decision supported, by offending design element, etc.
Items are shown under all applicable headings.
This class is dependent on Designer.
Designer.inform(org.argouml.cognitive.ToDoItem)| Method Summary | |
|---|---|
void |
addElement(ToDoItem item)
|
boolean |
addResolvedCritic(ResolvedCritic rc)
Add the given resolved critic to the list of resolved critics. |
void |
addToDoListListener(ToDoListListener l)
|
java.util.List<ToDoItem> |
elementListForOffender(java.lang.Object offender)
|
boolean |
explicitlyResolve(ToDoItem item,
java.lang.String reason)
|
protected void |
fireToDoItemChanged(ToDoItem item)
Deprecated. in 0.27.2 by Bob Tarling. ToDoList is not designed to be extended so protected is not required. This method is not used with the package so scope will become private in future. |
void |
forceValidityCheck()
Check each ToDoItem on the list to see if it is still valid. |
ToDoItem |
get(int index)
|
static java.util.List<Decision> |
getDecisionList()
|
static java.util.List<Goal> |
getGoalList()
|
ListSet |
getOffenders()
|
ListSet<Poster> |
getPosters()
|
java.util.Set<ResolvedCritic> |
getResolvedItems()
Returns the set of ResolvedCritics. |
java.util.List<ToDoItem> |
getToDoItemList()
Returns the List of the ToDoItems. |
boolean |
isPaused()
|
void |
notifyObservers()
|
void |
notifyObservers(java.lang.Object o)
|
void |
notifyObservers(java.lang.String action,
java.lang.Object arg)
|
void |
pause()
Pause the validity checking thread. |
void |
removeAll(ToDoList list)
|
void |
removeAllElements()
Remove all todo items. |
boolean |
removeElement(ToDoItem item)
|
void |
removeToDoListListener(ToDoListListener l)
|
boolean |
resolve(ToDoItem item)
|
void |
resume()
Resume the validity checking thread. |
void |
run()
Entry point for validity checker thread. |
void |
setPaused(boolean paused)
sets the pause state. |
int |
size()
|
void |
spawnValidityChecker(Designer d)
Start a Thread to delete old items from the ToDoList. |
java.lang.String |
toString()
|
| Methods inherited from class java.util.Observable |
|---|
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, setChanged |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
public void spawnValidityChecker(Designer d)
d - the designerpublic void run()
run in interface java.lang.Runnablepublic void forceValidityCheck()
public void pause()
public void resume()
public boolean isPaused()
public void setPaused(boolean paused)
paused - if set to false, calls resume() also to start working
public void notifyObservers(java.lang.String action,
java.lang.Object arg)
action - the actionarg - the argumentpublic void notifyObservers(java.lang.Object o)
notifyObservers in class java.util.Observablepublic void notifyObservers()
notifyObservers in class java.util.Observablepublic java.util.List<ToDoItem> getToDoItemList()
Collections.synchronizedList(List).
Listlist = toDoList.getToDoItemList(); ... synchronized(list) { for (ToDoItem item : list ) { // Must be in synchronized block .... }
Collections.synchronizedList(List)public java.util.Set<ResolvedCritic> getResolvedItems()
Collections.synchronizedSet(Set).
Setset = toDoList.getResolvedItems(); ... synchronized(set) { for (ResolvedCritic item : set ) { // Must be in synchronized block .... }
Collections.synchronizedSet(Set)public ListSet getOffenders()
public ListSet<Poster> getPosters()
public static java.util.List<Decision> getDecisionList()
public static java.util.List<Goal> getGoalList()
public void addElement(ToDoItem item)
item - the todo item to be addedpublic void removeAll(ToDoList list)
list - the todo items to be removedpublic boolean removeElement(ToDoItem item)
item - the todo item to be removed
true if the argument was a component of this list;
false otherwisepublic boolean resolve(ToDoItem item)
item - the todo item to be resolved
true if the argument was a component of this list;
false otherwise
public boolean explicitlyResolve(ToDoItem item,
java.lang.String reason)
throws UnresolvableException
item - the todo itemreason - the reason TODO: Use it!
true if the argument was a component of this list;
false otherwise
UnresolvableException - unable to resolvepublic boolean addResolvedCritic(ResolvedCritic rc)
rc - the resolved critic
true if successfully added; false
otherwisepublic void removeAllElements()
public java.util.List<ToDoItem> elementListForOffender(java.lang.Object offender)
offender - the offender
Note: the previous implementation returned an internal static (global) list which could be modified at any point, requiring the caller to copy the list before using it (negating the value of caching the static copy). The current implementation returns a private copy which will not change, so callers don't need to copy it.
public int size()
public ToDoItem get(int index)
index - 0-based index to retrieve ToDoItem from
public void addToDoListListener(ToDoListListener l)
l - the listener to be addedpublic void removeToDoListListener(ToDoListListener l)
l - the listener to be removed@Deprecated protected void fireToDoItemChanged(ToDoItem item)
item - the todo itempublic java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
| ArgoUML © 1996-2006 | ArgoUML Homepage | ArgoUML Developers' page | ArgoUML Cookbook |