org.argouml.cognitive
Class ToDoList

java.lang.Object
  extended byjava.util.Observable
      extended byorg.argouml.cognitive.ToDoList
All Implemented Interfaces:
java.lang.Runnable, java.io.Serializable

public class ToDoList
extends java.util.Observable
implements java.lang.Runnable, java.io.Serializable

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.

See Also:
Designer.nondisruptivelyWarn(org.argouml.cognitive.ToDoItem), Serialized Form

Field Summary
protected  Designer _designer
          The designer, used in determining if a ToDoItem is still valid.
protected  java.util.Vector _items
          Pending ToDoItems for the designer to consider.
protected  javax.swing.event.EventListenerList _listenerList
          needs documenting
static int _longestToDoList
          needs documenting
static int _numNotValid
          needs documenting
protected static java.lang.Object _RecentOffender
          needs documenting
protected static java.util.Vector _RecentOffenderItems
          needs documenting
protected  java.util.Vector _resolvedItems
          ToDoItems that the designer has explicitly indicated that (s)he considers resolved.
protected  java.lang.Thread _validityChecker
          A Thread that keeps checking if the items on the list are still valid.
protected static org.apache.log4j.Category cat
           
 
Constructor Summary
ToDoList()
          needs documenting
 
Method Summary
 void addAll(ToDoList list)
          needs documenting
 void addElement(ToDoItem item)
          needs documenting
 void addToDoListListener(ToDoListListener l)
          needs documenting
 ToDoItem elementAt(int index)
          needs documenting
 java.util.Enumeration elements()
          needs documenting
 java.util.Vector elementsForOffender(java.lang.Object off)
          needs documenting
 boolean explicitlyResolve(ToDoItem item, java.lang.String reason)
          needs documenting
protected  void fireToDoItemAdded(ToDoItem item)
          needs documenting
protected  void fireToDoItemChanged(ToDoItem item)
          needs documenting
protected  void fireToDoItemRemoved(ToDoItem item)
          needs documenting
protected  void fireToDoItemsAdded(java.util.Vector items)
          needs documenting
protected  void fireToDoItemsRemoved(java.util.Vector items)
          needs documenting
protected  void fireToDoListChanged()
          Notify all listeners that have registered interest for notification on this event type.
 void forceValidityCheck()
          needs documenting
protected  void forceValidityCheck(java.util.Vector removes)
          Check each ToDoItem on the list to see if it is still valid.
 java.util.Vector getDecisions()
          needs documenting
 java.util.Vector getGoals()
          needs documenting
 org.tigris.gef.util.VectorSet getOffenders()
           
 org.tigris.gef.util.VectorSet getPosters()
           
 java.util.Vector getResolvedItems()
          needs documenting
 java.util.Vector getToDoItems()
          needs documenting
 void notifyObservers()
          needs documenting
 void notifyObservers(java.lang.Object o)
          needs documenting
 void notifyObservers(java.lang.String action, java.lang.Object arg)
          needs documenting
protected  void recomputeAllOffenders()
          needs documenting
protected  void recomputeAllPosters()
          needs documenting
 void removeAll(ToDoList list)
          needs documenting
 void removeAllElements()
          needs documenting
 boolean removeElement(ToDoItem item)
          needs documenting
 void removeToDoListListener(ToDoListListener l)
          needs documenting
 boolean resolve(ToDoItem item)
          needs documenting
 void run()
          Periodically check to see if items on the list are still valid.
 int size()
          needs documenting
 void spawnValidityChecker(Designer d)
          Start a Thread to delete old items from the ToDoList.
 java.lang.String toString()
          needs documenting
 
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

cat

protected static org.apache.log4j.Category cat

_RecentOffender

protected static java.lang.Object _RecentOffender
needs documenting


_RecentOffenderItems

protected static java.util.Vector _RecentOffenderItems
needs documenting


_items

protected java.util.Vector _items
Pending ToDoItems for the designer to consider.


_resolvedItems

protected java.util.Vector _resolvedItems
ToDoItems that the designer has explicitly indicated that (s)he considers resolved.

TODO: generalize into a design rationale logging facility.


_validityChecker

protected java.lang.Thread _validityChecker
A Thread that keeps checking if the items on the list are still valid.


_designer

protected Designer _designer
The designer, used in determining if a ToDoItem is still valid.


_listenerList

protected javax.swing.event.EventListenerList _listenerList
needs documenting


_longestToDoList

public static int _longestToDoList
needs documenting


_numNotValid

public static int _numNotValid
needs documenting

Constructor Detail

ToDoList

public ToDoList()
needs documenting

Method Detail

spawnValidityChecker

public void spawnValidityChecker(Designer d)
Start a Thread to delete old items from the ToDoList.


run

public void run()
Periodically check to see if items on the list are still valid.

Specified by:
run in interface java.lang.Runnable

forceValidityCheck

public void forceValidityCheck()
needs documenting


forceValidityCheck

protected void forceValidityCheck(java.util.Vector removes)
Check each ToDoItem on the list to see if it is still valid. If not, then remove that item. This is called automatically by the ValidityCheckingThread, and it can be called by the user pressing a button via forceValidityCheck().

Warning: Fragile code! No method that this method calls can synchronized the Designer, otherwise there will be deadlock.


notifyObservers

public void notifyObservers(java.lang.String action,
                            java.lang.Object arg)
needs documenting


notifyObservers

public void notifyObservers(java.lang.Object o)
needs documenting


notifyObservers

public void notifyObservers()
needs documenting


getToDoItems

public java.util.Vector getToDoItems()
needs documenting


getResolvedItems

public java.util.Vector getResolvedItems()
needs documenting


getOffenders

public org.tigris.gef.util.VectorSet getOffenders()
Returns:
the set of offenders

getPosters

public org.tigris.gef.util.VectorSet getPosters()
Returns:
the set of all the posters

getDecisions

public java.util.Vector getDecisions()
needs documenting


getGoals

public java.util.Vector getGoals()
needs documenting


addElement

public void addElement(ToDoItem item)
needs documenting


addAll

public void addAll(ToDoList list)
needs documenting


removeAll

public void removeAll(ToDoList list)
needs documenting


removeElement

public boolean removeElement(ToDoItem item)
needs documenting


resolve

public boolean resolve(ToDoItem item)
needs documenting


explicitlyResolve

public boolean explicitlyResolve(ToDoItem item,
                                 java.lang.String reason)
                          throws UnresolvableException
needs documenting

Throws:
UnresolvableException

removeAllElements

public void removeAllElements()
needs documenting


elementsForOffender

public java.util.Vector elementsForOffender(java.lang.Object off)
needs documenting


size

public int size()
needs documenting


elements

public java.util.Enumeration elements()
needs documenting


elementAt

public ToDoItem elementAt(int index)
needs documenting


recomputeAllOffenders

protected void recomputeAllOffenders()
needs documenting


recomputeAllPosters

protected void recomputeAllPosters()
needs documenting


addToDoListListener

public void addToDoListListener(ToDoListListener l)
needs documenting


removeToDoListListener

public void removeToDoListListener(ToDoListListener l)
needs documenting


fireToDoListChanged

protected void fireToDoListChanged()
Notify all listeners that have registered interest for notification on this event type. The event instance is lazily created using the parameters passed into the fire method.

See Also:
EventListenerList

fireToDoItemChanged

protected void fireToDoItemChanged(ToDoItem item)
needs documenting


fireToDoItemAdded

protected void fireToDoItemAdded(ToDoItem item)
needs documenting


fireToDoItemsAdded

protected void fireToDoItemsAdded(java.util.Vector items)
needs documenting


fireToDoItemRemoved

protected void fireToDoItemRemoved(ToDoItem item)
needs documenting


fireToDoItemsRemoved

protected void fireToDoItemsRemoved(java.util.Vector items)
needs documenting


toString

public java.lang.String toString()
needs documenting



ArgoUML © 1996-2003 (20040125)ArgoUML Project HomeArgoUML Cookbook