|
||||||||||
| 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)
|
ToDoItem |
elementAt(int index)
Deprecated. for 0.25.4 by tfmorris. Use get(int). |
java.util.List<ToDoItem> |
elementListForOffender(java.lang.Object offender)
|
java.util.Enumeration<ToDoItem> |
elements()
Deprecated. for 0.25.4 by tfmorris. Use getToDoItemList(). |
java.util.Vector<ToDoItem> |
elementsForOffender(java.lang.Object off)
Deprecated. for 0.25.4 by tfmorris. Use elementListForOffender(Object). |
boolean |
explicitlyResolve(ToDoItem item,
java.lang.String reason)
|
protected void |
fireToDoItemAdded(ToDoItem item)
|
protected void |
fireToDoItemChanged(ToDoItem item)
|
protected void |
fireToDoItemRemoved(ToDoItem item)
|
protected void |
fireToDoItemsAdded(java.util.List<ToDoItem> theItems)
|
protected void |
fireToDoItemsRemoved(java.util.List<ToDoItem> theItems)
|
protected void |
fireToDoListChanged()
Notify all listeners that have registered interest for notification on this event type. |
void |
forceValidityCheck()
Check each ToDoItem on the list to see if it is still valid. |
protected void |
forceValidityCheck(java.util.List<ToDoItem> removes)
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.Vector |
getDecisions()
Deprecated. by tfmorris for 0.25.4. Use getDecisionList(). |
static java.util.List<Goal> |
getGoalList()
|
static java.util.Vector |
getGoals()
Deprecated. for 0.25.4 by tfmorris. Use 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. |
java.util.Vector<ToDoItem> |
getToDoItems()
Deprecated. for 0.25.4 by tfmorris. Use getToDoItemList(). |
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. |
protected void |
recomputeAllOffenders()
Re-compute all offenders. |
protected void |
recomputeAllPosters()
Reset all posters. |
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()
protected void forceValidityCheck(java.util.List<ToDoItem> removes)
Warning: Fragile code! No method that this method calls can synchronized the Designer, otherwise there will be deadlock.
removes - a synchronized list containing the items to be removedpublic 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.Observable@Deprecated public java.util.Vector<ToDoItem> getToDoItems()
getToDoItemList().
public java.util.List<ToDoItem> getToDoItemList()
Collections.synchronizedList(List).
Listlist = toDoList.getToDoItemList(); ... synchronized(list) { for (ToDoItem item : list ) { // Must be in synchronized block .... }
Collections.synchronizedList(java.util.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()
@Deprecated public static java.util.Vector getDecisions()
getDecisionList().
public static java.util.List<Decision> getDecisionList()
@Deprecated public static java.util.Vector getGoals()
getGoalList().
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()
@Deprecated public java.util.Vector<ToDoItem> elementsForOffender(java.lang.Object off)
elementListForOffender(Object).
off - the offender
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()
@Deprecated public java.util.Enumeration<ToDoItem> elements()
getToDoItemList().
@Deprecated public ToDoItem elementAt(int index)
get(int).
index - an index into the todo items list
public ToDoItem get(int index)
index - 0-based index to retrieve ToDoItem from
protected void recomputeAllOffenders()
protected void recomputeAllPosters()
public void addToDoListListener(ToDoListListener l)
l - the listener to be addedpublic void removeToDoListListener(ToDoListListener l)
l - the listener to be removedprotected void fireToDoListChanged()
EventListenerListprotected void fireToDoItemChanged(ToDoItem item)
item - the todo itemprotected void fireToDoItemAdded(ToDoItem item)
item - the todo itemprotected void fireToDoItemsAdded(java.util.List<ToDoItem> theItems)
theItems - the todo itemsprotected void fireToDoItemRemoved(ToDoItem item)
item - the todo itemprotected void fireToDoItemsRemoved(java.util.List<ToDoItem> theItems)
theItems - the todo itemspublic 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 Cookbook |