|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
org.argouml.cognitive.ui.ToDoPane
The lower-left pane of the main ArgoUML window, which shows the list of active critics and todo items.
This pane shows a list or tree of all the "to do" items that the designer should consider.
This class is similar to the NavigatorPane. It uses the same treemodel class and JTree implementation.
Perspectives are now built here.
Future plans may involve:
1)DecisionModelListener implementation
2)GoalListener implementation
?
possible future additions: ToDoPerspective difficulty = new ToDoByDifficulty(); ToDoPerspective skill = new ToDoBySkill();
Nested Class Summary |
Nested classes inherited from class javax.swing.JPanel |
JPanel.AccessibleJPanel |
Nested classes inherited from class javax.swing.JComponent |
JComponent.AccessibleJComponent |
Nested classes inherited from class java.awt.Container |
Container.AccessibleAWTContainer |
Nested classes inherited from class java.awt.Component |
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary | |
private static Color |
ALARM_COLOR
|
private static int |
ALARM_THRESHOLD
|
private static int |
clicksInToDoPane
|
private JComboBox |
combo
|
private JLabel |
countLabel
|
private ToDoPerspective |
curPerspective
|
private static int |
dblClicksInToDoPane
|
private char |
dir
|
private JToggleButton |
flatButton
|
private Object |
lastSel
|
private static Logger |
LOG
|
private int |
oldSize
|
private ProjectBrowser |
pb
shouldn't need this |
private Vector |
perspectives
vector of TreeModels |
private ToDoList |
root
|
private static int |
toDoPerspectivesChanged
|
private org.tigris.gef.ui.ToolBar |
toolbar
|
private JTree |
tree
|
private static Color |
WARN_COLOR
|
private static int |
WARN_THRESHOLD
|
Fields inherited from class javax.swing.JPanel |
|
Fields inherited from class javax.swing.JComponent |
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Container |
|
Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface org.argouml.application.api.QuadrantPanel |
Q_BOTTOM, Q_BOTTOM_LEFT, Q_BOTTOM_RIGHT, Q_LEFT, Q_RIGHT, Q_TOP, Q_TOP_LEFT, Q_TOP_RIGHT |
Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
ToDoPane(boolean doSplash)
The constructor. |
Method Summary | |
private static Vector |
buildPerspectives()
The perspectives to be chosen in the combobox are built here. |
private static String |
formatCountLabel(int size)
|
ToDoPerspective |
getCurPerspective()
|
Vector |
getPerspectives()
|
int |
getQuadrant()
This shall return a corner indentification. |
ToDoList |
getRoot()
|
Object |
getSelectedObject()
|
void |
itemStateChanged(ItemEvent e)
Called when the user selects a perspective from the perspective combo. |
void |
mouseClicked(MouseEvent e)
|
void |
mouseEntered(MouseEvent e)
|
void |
mouseExited(MouseEvent e)
|
void |
mousePressed(MouseEvent e)
|
void |
mouseReleased(MouseEvent e)
|
void |
myDoubleClick(int row,
TreePath path)
Called when the user clicks twice on an item in the tree. |
static void |
mySingleClick(int row,
TreePath path)
Called when the user clicks once on an item in the tree. |
void |
selectItem(ToDoItem item)
|
void |
setCurPerspective(TreeModel per)
|
void |
setPerspectives(Vector pers)
|
void |
setRoot(ToDoList r)
|
void |
toDoItemsAdded(ToDoListEvent tde)
|
void |
toDoItemsChanged(ToDoListEvent tde)
|
void |
toDoItemsRemoved(ToDoListEvent tde)
|
void |
toDoListChanged(ToDoListEvent tde)
|
void |
updateCountLabel()
Update the count label. |
protected void |
updateTree()
Update the todo tree. |
void |
valueChanged(TreeSelectionEvent e)
Called when the user selects an item in the tree, by clicking or otherwise. |
Methods inherited from class javax.swing.JPanel |
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
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 final int WARN_THRESHOLD
private static final int ALARM_THRESHOLD
private static final Color WARN_COLOR
private static final Color ALARM_COLOR
private static int clicksInToDoPane
private static int dblClicksInToDoPane
private static int toDoPerspectivesChanged
private JTree tree
private org.tigris.gef.ui.ToolBar toolbar
private JComboBox combo
private Vector perspectives
private ToDoPerspective curPerspective
private ToDoList root
private JToggleButton flatButton
private JLabel countLabel
private Object lastSel
private int oldSize
private char dir
private ProjectBrowser pb
Constructor Detail |
public ToDoPane(boolean doSplash)
doSplash
- if true, then we have to show progress in the splashMethod Detail |
public void setRoot(ToDoList r)
r
- the rootpublic ToDoList getRoot()
public Vector getPerspectives()
public void setPerspectives(Vector pers)
pers
- the perspectivespublic ToDoPerspective getCurPerspective()
public void setCurPerspective(TreeModel per)
per
- the current perspectivepublic Object getSelectedObject()
Object
in the first selected node's
TreePath
,
or null
if nothing is selectedpublic void selectItem(ToDoItem item)
item
- the item to be selectedpublic void itemStateChanged(ItemEvent e)
Param e is the event.
itemStateChanged
in interface ItemListener
ItemListener.itemStateChanged(java.awt.event.ItemEvent)
public void valueChanged(TreeSelectionEvent e)
Param e is the event.
valueChanged
in interface TreeSelectionListener
TreeSelectionListener.valueChanged(javax.swing.event.TreeSelectionEvent)
public void mousePressed(MouseEvent e)
mousePressed
in interface MouseListener
Empty implementation.
public void mouseReleased(MouseEvent e)
mouseReleased
in interface MouseListener
Empty implementation.
public void mouseEntered(MouseEvent e)
mouseEntered
in interface MouseListener
Empty implementation.
public void mouseExited(MouseEvent e)
mouseExited
in interface MouseListener
Empty implementation.
public void mouseClicked(MouseEvent e)
mouseClicked
in interface MouseListener
MouseListener.mouseClicked(java.awt.event.MouseEvent)
public void toDoItemsChanged(ToDoListEvent tde)
toDoItemsChanged
in interface ToDoListListener
tde
- the todo list eventToDoListListener.toDoItemsChanged(org.argouml.cognitive.ToDoListEvent)
public void toDoItemsAdded(ToDoListEvent tde)
toDoItemsAdded
in interface ToDoListListener
tde
- the todo list eventToDoListListener.toDoItemsAdded(org.argouml.cognitive.ToDoListEvent)
public void toDoItemsRemoved(ToDoListEvent tde)
toDoItemsRemoved
in interface ToDoListListener
tde
- the todo list eventToDoListListener.toDoItemsRemoved(org.argouml.cognitive.ToDoListEvent)
public void toDoListChanged(ToDoListEvent tde)
toDoListChanged
in interface ToDoListListener
tde
- the todo list eventToDoListListener.toDoListChanged(org.argouml.cognitive.ToDoListEvent)
private static String formatCountLabel(int size)
public void updateCountLabel()
protected void updateTree()
public int getQuadrant()
QuadrantPanel
getQuadrant
in interface QuadrantPanel
QuadrantPanel.getQuadrant()
public static void mySingleClick(int row, TreePath path)
Q: What should the difference be between a single and double click?
A: A single click selects the todo item in the tree, shows the red indication on the diagram, and selects the todo tab in the details panel. A double click additionally selects the offender in the explorer, and selects the offender in the diagram (blue selection), and selects the properties tab in the details panel. In both cases, the focus (for keyboard actions) remains in the todo tree.
row
- the selected row in the treepath
- the path in the tree of the selected itempublic void myDoubleClick(int row, TreePath path)
row
- the selected row in the treepath
- the path in the tree of the selected itemprivate static Vector buildPerspectives()
|
|||||||||||
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 |