Update of /cvsroot/jprojecttimer/jprojecttimer/de/cgarbs/apps/jprojecttimer
In directory usw-pr-cvs1:/tmp/cvs-serv12062
Modified Files:
Task.java TaskListPane.java
Log Message:
New method Task.showEditDialog() to open the TaskListEdit dialog.
Index: Task.java
===================================================================
RCS file: /cvsroot/jprojecttimer/jprojecttimer/de/cgarbs/apps/jprojecttimer/Task.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** Task.java 2002/02/03 15:35:42 1.5
--- Task.java 2002/02/04 22:53:53 1.6
***************
*** 16,19 ****
--- 16,20 ----
import java.awt.Graphics;
import java.util.Enumeration;
+ import javax.swing.JFrame;
import javax.swing.JLabel;
***************
*** 228,232 ****
}
! /** Recursively checks if a list
*
* @param parent
--- 229,233 ----
}
! /** Recursively checks if a task depends on itself
*
* @param parent
***************
*** 259,262 ****
--- 260,274 ----
}
+
+ /** Open a dialog to let the user edit this task's properties.
+ *
+ * @param owner The GUI element that the parent of the new dialog.
+ * @param dependencies The list of tasks that can be selected as
+ * dependencies (propably all tasks in project).
+ */
+ public void showEditDialog(JFrame owner, TaskList dependencies)
+ {
+ new TaskEditDialog(owner, dependencies, this);
+ }
/** */
Index: TaskListPane.java
===================================================================
RCS file: /cvsroot/jprojecttimer/jprojecttimer/de/cgarbs/apps/jprojecttimer/TaskListPane.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** TaskListPane.java 2002/02/03 15:33:22 1.7
--- TaskListPane.java 2002/02/04 22:53:53 1.8
***************
*** 120,124 ****
t.calculate(); // mustn't be dirty
! new TaskEditDialog(gui, tasks, t);
if (t.isDirty()) { // only add if edited and not cancelled
tasks.addElement(t);
--- 120,124 ----
t.calculate(); // mustn't be dirty
! t.showEditDialog(gui, tasks);
if (t.isDirty()) { // only add if edited and not cancelled
tasks.addElement(t);
***************
*** 131,135 ****
int row = table.getSelectedRow();
if (row > -1) {
! new TaskEditDialog(gui, tasks, (Task) tasks.elementAt(row));
model.fireTableRowsUpdated(row, row);
}
--- 131,135 ----
int row = table.getSelectedRow();
if (row > -1) {
! ((Task) tasks.elementAt(row)).showEditDialog(gui, tasks);
model.fireTableRowsUpdated(row, row);
}
|