org.argouml.cognitive
Class ToDoItem

java.lang.Object
  extended byorg.argouml.cognitive.ToDoItem
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
UMLToDoItem

public class ToDoItem
extends java.lang.Object
implements java.io.Serializable

This class defines the feedback items that can be placed on the Designer's ToDoList. The main point of a ToDoItem is to inform the Designer of some problem or open design issue. Additional information in the ToDoItem helps put the designer in a mental context suitable for resolving the issue: ToDoItem's are well tied into the design and design process so that the Designer can see which design material's are the subject of this ToDoItem, and which Critic raised it. The expert email address helps connect the designer with the organizational context. The more info URL helps provide background knowledge of the domain. In the future ToDoItems will include ties back to the design rationale log. Also the run-time system needs to know who posted each ToDoItem so that it can automatically remove it if it is no longer valid.

See Also:
Serialized Form

Field Summary
private  java.lang.String _cachedExpandedDescription
           
private  java.lang.String _cachedExpandedHeadline
           
private  javax.swing.Icon _clarifier
           
private  java.lang.String _description
          One paragraph description of the issue.
private  java.lang.String _headline
          One line description of issue.
private  java.lang.String _moreInfoURL
          URL for background (textbook?) knowledge about the domain.
private  org.tigris.gef.util.VectorSet _offenders
          Which part of the design this issue affects This is set by the constructor and cannot change.
private  Poster _poster
          Who posted this item (e.g., a Critic, or the designer)?
private  int _priority
          How important is this issue? Enough to interrupt the designer?
private  Wizard _wizard
           
static int HIGH_PRIORITY
           
static int LOW_PRIORITY
           
static int MED_PRIORITY
           
 
Constructor Summary
ToDoItem(Critic c)
           
ToDoItem(Critic c, java.lang.Object dm, Designer dsgr)
           
ToDoItem(Critic c, org.tigris.gef.util.VectorSet offs, Designer dsgr)
           
ToDoItem(Poster poster, java.lang.String h, int p, java.lang.String d, java.lang.String m)
           
ToDoItem(Poster poster, java.lang.String h, int p, java.lang.String d, java.lang.String m, org.tigris.gef.util.VectorSet offs)
           
 
Method Summary
 void action()
          The user has double-clicked or otherwise indicated that they want to do something active with this item.
 boolean canFixIt()
          Some problems can be automatically fixed, ask the Critic to do it if it can.
 void changed()
          Notify the user interface that this ToDoItem has changed.
 boolean containsKnowledgeType(java.lang.String type)
           
 void deselect()
          When a ToDoItem is deselected in the UiToDoList window, unhighlight the "offending" design material's.
 boolean equals(java.lang.Object o)
          Is this item a copy?
 void fixIt()
          Some problems can be automatically fixed, ask the Critic to do it if it can.
 javax.swing.Icon getClarifier()
          Return a clarifier object that can graphical highlight this error in a design diagram.
 java.lang.String getDescription()
           
 java.lang.String getExpertEmail()
          Find the email address of the poster.
 java.lang.String getHeadline()
           
 java.lang.String getMoreInfoURL()
           
 org.tigris.gef.util.VectorSet getOffenders()
          Reply a Set of design material's that are the subject of this ToDoItem.
 Poster getPoster()
          Reply the Critic or Designer that posted this ToDoItem.
 int getPriority()
           
 int getProgress()
           
 Wizard getWizard()
           
 void select()
          When a ToDoItem is selected in the UiToDoList window, highlight the "offending" design material's.
 void setDescription(java.lang.String d)
           
 void setHeadline(java.lang.String h)
           
 void setMoreInfoURL(java.lang.String m)
           
 void setOffenders(org.tigris.gef.util.VectorSet offenders)
          Set the designmatial that is subject of this ToDoItem
 void setPriority(int p)
           
 boolean stillValid(Designer d)
          Reply true iff this ToDoItem should be kept on the Designer's ToDoList.
 boolean supports(Decision d)
           
 boolean supports(Goal g)
           
 java.lang.String toString()
          Reply a string for debugging.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

HIGH_PRIORITY

public static final int HIGH_PRIORITY
See Also:
Constant Field Values

MED_PRIORITY

public static final int MED_PRIORITY
See Also:
Constant Field Values

LOW_PRIORITY

public static final int LOW_PRIORITY
See Also:
Constant Field Values

_poster

private Poster _poster
Who posted this item (e.g., a Critic, or the designer)?


_headline

private java.lang.String _headline
One line description of issue.


_priority

private int _priority
How important is this issue? Enough to interrupt the designer?


_description

private java.lang.String _description
One paragraph description of the issue.


_moreInfoURL

private java.lang.String _moreInfoURL
URL for background (textbook?) knowledge about the domain.


_offenders

private org.tigris.gef.util.VectorSet _offenders
Which part of the design this issue affects This is set by the constructor and cannot change.


_clarifier

private javax.swing.Icon _clarifier

_wizard

private Wizard _wizard

_cachedExpandedHeadline

private java.lang.String _cachedExpandedHeadline

_cachedExpandedDescription

private java.lang.String _cachedExpandedDescription
Constructor Detail

ToDoItem

public ToDoItem(Poster poster,
                java.lang.String h,
                int p,
                java.lang.String d,
                java.lang.String m,
                org.tigris.gef.util.VectorSet offs)

ToDoItem

public ToDoItem(Poster poster,
                java.lang.String h,
                int p,
                java.lang.String d,
                java.lang.String m)

ToDoItem

public ToDoItem(Critic c,
                java.lang.Object dm,
                Designer dsgr)

ToDoItem

public ToDoItem(Critic c,
                org.tigris.gef.util.VectorSet offs,
                Designer dsgr)

ToDoItem

public ToDoItem(Critic c)
Method Detail

getHeadline

public java.lang.String getHeadline()

setHeadline

public void setHeadline(java.lang.String h)

getDescription

public java.lang.String getDescription()

setDescription

public void setDescription(java.lang.String d)

getMoreInfoURL

public java.lang.String getMoreInfoURL()

setMoreInfoURL

public void setMoreInfoURL(java.lang.String m)

getPriority

public int getPriority()

setPriority

public void setPriority(int p)

getProgress

public int getProgress()

getOffenders

public org.tigris.gef.util.VectorSet getOffenders()
Reply a Set of design material's that are the subject of this ToDoItem.


setOffenders

public void setOffenders(org.tigris.gef.util.VectorSet offenders)
Set the designmatial that is subject of this ToDoItem


getPoster

public Poster getPoster()
Reply the Critic or Designer that posted this ToDoItem.


getExpertEmail

public java.lang.String getExpertEmail()
Find the email address of the poster.


getClarifier

public javax.swing.Icon getClarifier()
Return a clarifier object that can graphical highlight this error in a design diagram. Return a clarifier for this todoitem, if not found by the poster, or null.

Returns:
an Icon or null if none found.

getWizard

public Wizard getWizard()

containsKnowledgeType

public boolean containsKnowledgeType(java.lang.String type)

supports

public boolean supports(Decision d)

supports

public boolean supports(Goal g)

equals

public boolean equals(java.lang.Object o)
Is this item a copy?


select

public void select()
When a ToDoItem is selected in the UiToDoList window, highlight the "offending" design material's.


deselect

public void deselect()
When a ToDoItem is deselected in the UiToDoList window, unhighlight the "offending" design material's.


action

public void action()
The user has double-clicked or otherwise indicated that they want to do something active with this item. By default, just re-select it, subclasses may choose to do more (e.g., navigate to the offending item if it is not visible).


changed

public void changed()
Notify the user interface that this ToDoItem has changed. Currently, this is used to update the progress bar.


fixIt

public void fixIt()
Some problems can be automatically fixed, ask the Critic to do it if it can.


canFixIt

public boolean canFixIt()
Some problems can be automatically fixed, ask the Critic to do it if it can.


stillValid

public boolean stillValid(Designer d)
Reply true iff this ToDoItem should be kept on the Designer's ToDoList. This should return false if the poster has been deactivated, or if it can be determined that the problem that raised this issue is no longer present.


toString

public java.lang.String toString()
Reply a string for debugging.



ArgoUML © 1996-2004 (20040316)ArgoUML HomepageArgoUML Developers' pageArgoUML Cookbook