|
|||||||||||
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
Implements a list of ToDoItem's.
It spawns a "sweeper" thread that periodically goes through the list and elimiates ToDoItem's that are no longer valid.
One difficulty designers face is keeping track of all the myrid details of thier task. It is all to easy to skip a step in the design process, leave part of the design unspecified, of make a mistake that requires revision. Argo 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.
The to do lists right now are a bit unstable. Please test and let us know what you find through Issuezilla.
Items are shown under all applicable headings. The "to do" list may also be viewed as a flat list.
This class is dependent on Designer.
Designer.nondisruptivelyWarn(org.argouml.cognitive.ToDoItem)
,
Serialized FormField Summary | |
private org.tigris.gef.util.VectorSet |
allOffenders
These are computed when needed. |
private org.tigris.gef.util.VectorSet |
allPosters
These are computed when needed. |
private Designer |
designer
The designer, used in determining if a ToDoItem is still valid. |
private boolean |
isPaused
state variable for whether the validity checking thread is paused (waiting). |
private Vector |
items
Pending ToDoItems for the designer to consider. |
private EventListenerList |
listenerList
|
private static Logger |
LOG
|
private static int |
longestToDoList
|
private static int |
numNotValid
|
private static Object |
recentOffender
|
private static Vector |
recentOffenderItems
|
private Vector |
resolvedItems
ToDoItems that the designer has explicitly indicated that (s)he considers resolved. |
private static ToDoList |
theInstance
The ToDoList instance that is also the validity checking thread. |
private Thread |
validityChecker
A Thread that keeps checking if the items on the list are still valid. |
Fields inherited from class java.util.Observable |
|
Constructor Summary | |
ToDoList()
creates a new todolist. |
Method Summary | |
void |
addAll(ToDoList list)
|
private void |
addE(ToDoItem item)
needs documenting, why synchronised? |
void |
addElement(ToDoItem item)
|
private void |
addOffenders(org.tigris.gef.util.VectorSet newoffs)
|
private void |
addPosters(Poster newp)
|
void |
addToDoListListener(ToDoListListener l)
|
ToDoItem |
elementAt(int index)
|
Enumeration |
elements()
|
Vector |
elementsForOffender(Object off)
|
boolean |
explicitlyResolve(ToDoItem item,
String reason)
|
protected void |
fireToDoItemAdded(ToDoItem item)
|
protected void |
fireToDoItemChanged(ToDoItem item)
|
protected void |
fireToDoItemRemoved(ToDoItem item)
|
protected void |
fireToDoItemsAdded(Vector theItems)
|
protected void |
fireToDoItemsRemoved(Vector 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(Vector removes)
Check each ToDoItem on the list to see if it is still valid. |
static Vector |
getDecisions()
|
static Vector |
getGoals()
|
static ToDoList |
getInstance()
Returns the validity checking thread instance. |
org.tigris.gef.util.VectorSet |
getOffenders()
|
org.tigris.gef.util.VectorSet |
getPosters()
|
Vector |
getResolvedItems()
|
Vector |
getToDoItems()
|
boolean |
isPaused()
|
void |
notifyObservers()
|
void |
notifyObservers(Object o)
|
void |
notifyObservers(String action,
Object arg)
|
void |
pause()
Pause. |
protected void |
recomputeAllOffenders()
Re-compute all offenders. |
protected void |
recomputeAllPosters()
Reset all posters. |
void |
removeAll(ToDoList list)
|
void |
removeAllElements()
Remove all todo items. |
private boolean |
removeE(ToDoItem item)
|
boolean |
removeElement(ToDoItem item)
|
void |
removeToDoListListener(ToDoListListener l)
|
boolean |
resolve(ToDoItem item)
|
void |
resume()
Resume. |
void |
run()
Periodically check to see if items on the list are still valid. |
void |
setPaused(boolean paused)
sets the pause state. |
int |
size()
|
void |
spawnValidityChecker(Designer d)
Start a Thread to delete old items from the ToDoList. |
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 |
Field Detail |
private static final Logger LOG
private static Object recentOffender
private static Vector recentOffenderItems
private Vector items
private org.tigris.gef.util.VectorSet allOffenders
private org.tigris.gef.util.VectorSet allPosters
private Vector resolvedItems
TODO: generalize into a design rationale logging facility.
private Thread validityChecker
private Designer designer
private EventListenerList listenerList
private static int longestToDoList
private static int numNotValid
private static ToDoList theInstance
private boolean isPaused
Constructor Detail |
public ToDoList()
Method Detail |
public static ToDoList getInstance()
public void spawnValidityChecker(Designer d)
d
- the designerpublic void run()
run
in interface Runnable
public void forceValidityCheck()
protected void forceValidityCheck(Vector removes)
Warning: Fragile code! No method that this method calls can synchronized the Designer, otherwise there will be deadlock.
removes
- the items removedpublic void pause()
public void resume()
public boolean isPaused()
public void setPaused(boolean paused)
paused
- if set to false, calls resume() also to start workingpublic void notifyObservers(String action, Object arg)
action
- the actionarg
- the argumentpublic void notifyObservers(Object o)
Observable.notifyObservers(Object)
public void notifyObservers()
Observable.notifyObservers()
public Vector getToDoItems()
public Vector getResolvedItems()
public org.tigris.gef.util.VectorSet getOffenders()
private void addOffenders(org.tigris.gef.util.VectorSet newoffs)
public org.tigris.gef.util.VectorSet getPosters()
private void addPosters(Poster newp)
public static Vector getDecisions()
public static Vector getGoals()
private void addE(ToDoItem item)
public void addElement(ToDoItem item)
item
- the todo item to be addedpublic void addAll(ToDoList list)
list
- the todo items to be addedpublic void removeAll(ToDoList list)
list
- the todo items to be removedprivate boolean removeE(ToDoItem item)
item
- the todo item to be removed
true
if the argument was a component of this
vector; false
otherwisepublic boolean removeElement(ToDoItem item)
item
- the todo item to be removed
true
if the argument was a component of this
vector; false
otherwisepublic boolean resolve(ToDoItem item)
item
- the todo item to be resolved
true
if the argument was a component of this
vector; false
otherwisepublic boolean explicitlyResolve(ToDoItem item, String reason) throws UnresolvableException
item
- the todo itemreason
- the reason
true
if the argument was a component of this
vector; false
otherwise
UnresolvableException
- unable to resolvepublic void removeAllElements()
public Vector elementsForOffender(Object off)
off
- the offender
public int size()
public Enumeration elements()
public ToDoItem elementAt(int index)
index
- an index into the todo items list
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()
EventListenerList
protected void fireToDoItemChanged(ToDoItem item)
item
- the todo itemprotected void fireToDoItemAdded(ToDoItem item)
item
- the todo itemprotected void fireToDoItemsAdded(Vector theItems)
theItems
- the todo itemsprotected void fireToDoItemRemoved(ToDoItem item)
item
- the todo itemprotected void fireToDoItemsRemoved(Vector theItems)
theItems
- the todo itemspublic String toString()
Object.toString()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ArgoUML © 1996-2004 (20050222) | ArgoUML Homepage | ArgoUML Developers' page | ArgoUML Cookbook |