Spent time field BLD200402151900
authorlebedkov@netbeans.org
Sun, 15 Feb 2004 17:32:11 +0000
changeset 4149b5f9f899840a
parent 4148 8c7e621bfb72
child 4150 a07860fccf38
Spent time field
tasklist.usertasks/src/org/netbeans/modules/tasklist/usertasks/Bundle.properties
tasklist.usertasks/src/org/netbeans/modules/tasklist/usertasks/DurationPanel.java
tasklist.usertasks/src/org/netbeans/modules/tasklist/usertasks/EditTaskPanel.form
tasklist.usertasks/src/org/netbeans/modules/tasklist/usertasks/EditTaskPanel.java
tasklist.usertasks/src/org/netbeans/modules/tasklist/usertasks/UserTaskNode.java
tasklist.usertasks/src/org/netbeans/modules/tasklist/usertasks/UserTaskView.java
tasklist.usertasks/src/org/netbeans/modules/tasklist/usertasks/translators/usertasks-1_0.dtd
     1.1 --- a/tasklist.usertasks/src/org/netbeans/modules/tasklist/usertasks/Bundle.properties	Fri Feb 13 09:38:10 2004 +0000
     1.2 +++ b/tasklist.usertasks/src/org/netbeans/modules/tasklist/usertasks/Bundle.properties	Sun Feb 15 17:32:11 2004 +0000
     1.3 @@ -165,13 +165,16 @@
     1.4  DueDateCb=D&ue:
     1.5  Brief_Description=&Summary:
     1.6  AssociatedFile=Associated &File:
     1.7 +ComputeSpentTkme=Compute automatically as a sum of the subtask values
     1.8  
     1.9  ## UserTaskNode
    1.10  Effort2=Effort
    1.11  EffortHint=Effort
    1.12  EffortFormat={0,choice,0#|1#1 day|1<{0} days}{1,choice,0#|1# 1 hour|1< {1} hours}{2,choice,0#|1# 1 minute|1< {2} minutes}
    1.13 -RestEffort=Rest Effort
    1.14 -RestEffortHint=Remaining Effort
    1.15 +RemainingEffort=Rem. Effort
    1.16 +RemainingEffortHint=Remaining effort
    1.17 +SpentTime=Spent Time
    1.18 +SpentTimeHint=Time spent for this task
    1.19  
    1.20  ## DurationPanel
    1.21  Minutes=Minutes
    1.22 @@ -188,3 +191,9 @@
    1.23  
    1.24  ## ShowTaskAction
    1.25  TITLE_edit_todo=Show Task
    1.26 +
    1.27 +## StartTaskAction
    1.28 +StartTask=Start
    1.29 +
    1.30 +## PauseAction
    1.31 +Pause=Pause
    1.32 \ No newline at end of file
     2.1 --- a/tasklist.usertasks/src/org/netbeans/modules/tasklist/usertasks/DurationPanel.java	Fri Feb 13 09:38:10 2004 +0000
     2.2 +++ b/tasklist.usertasks/src/org/netbeans/modules/tasklist/usertasks/DurationPanel.java	Sun Feb 15 17:32:11 2004 +0000
     2.3 @@ -103,44 +103,46 @@
     2.4      add(jLabel1, gridBagConstraints);
     2.5  
     2.6      gridBagConstraints = new java.awt.GridBagConstraints();
     2.7 +    gridBagConstraints.gridx = 0;
     2.8 +    gridBagConstraints.gridy = 1;
     2.9 +    gridBagConstraints.insets = new java.awt.Insets(0, 0, 0, 12);
    2.10      gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
    2.11 -    gridBagConstraints.insets = new java.awt.Insets(0, 0, 0, 12);
    2.12      add(jSpinnerDays, gridBagConstraints);
    2.13  
    2.14      org.openide.awt.Mnemonics.setLocalizedText(jLabel2, org.openide.util.NbBundle.getMessage(DurationPanel.class, "Hours")); // NOI18N);
    2.15      gridBagConstraints = new java.awt.GridBagConstraints();
    2.16 -    gridBagConstraints.gridx = 0;
    2.17 -    gridBagConstraints.gridy = 1;
    2.18 +    gridBagConstraints.gridx = 1;
    2.19 +    gridBagConstraints.gridy = 0;
    2.20      gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
    2.21 -    gridBagConstraints.insets = new java.awt.Insets(11, 0, 0, 12);
    2.22 +    gridBagConstraints.insets = new java.awt.Insets(0, 0, 0, 12);
    2.23      add(jLabel2, gridBagConstraints);
    2.24  
    2.25      gridBagConstraints = new java.awt.GridBagConstraints();
    2.26      gridBagConstraints.gridx = 1;
    2.27      gridBagConstraints.gridy = 1;
    2.28 +    gridBagConstraints.insets = new java.awt.Insets(0, 0, 0, 12);
    2.29      gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
    2.30 -    gridBagConstraints.insets = new java.awt.Insets(11, 0, 0, 12);
    2.31      add(jSpinnerHours, gridBagConstraints);
    2.32  
    2.33      org.openide.awt.Mnemonics.setLocalizedText(jLabel3, org.openide.util.NbBundle.getMessage(DurationPanel.class, "Minutes")); // NOI18N);
    2.34      gridBagConstraints = new java.awt.GridBagConstraints();
    2.35 -    gridBagConstraints.gridx = 0;
    2.36 -    gridBagConstraints.gridy = 2;
    2.37 +    gridBagConstraints.gridx = 2;
    2.38 +    gridBagConstraints.gridy = 0;
    2.39      gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
    2.40 -    gridBagConstraints.insets = new java.awt.Insets(11, 0, 0, 12);
    2.41 +    gridBagConstraints.insets = new java.awt.Insets(0, 0, 0, 12);
    2.42      add(jLabel3, gridBagConstraints);
    2.43  
    2.44      gridBagConstraints = new java.awt.GridBagConstraints();
    2.45 -    gridBagConstraints.gridx = 1;
    2.46 -    gridBagConstraints.gridy = 2;
    2.47 +    gridBagConstraints.gridx = 2;
    2.48 +    gridBagConstraints.gridy = 1;
    2.49 +    gridBagConstraints.insets = new java.awt.Insets(0, 0, 0, 12);
    2.50      gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
    2.51 -    gridBagConstraints.insets = new java.awt.Insets(11, 0, 0, 12);
    2.52      add(jSpinnerMinutes, gridBagConstraints);
    2.53  
    2.54      jPanelPlaceholder.setPreferredSize(new java.awt.Dimension(0, 0));
    2.55      gridBagConstraints = new java.awt.GridBagConstraints();
    2.56 -    gridBagConstraints.gridx = 2;
    2.57 -    gridBagConstraints.gridy = 3;
    2.58 +    gridBagConstraints.gridx = 3;
    2.59 +    gridBagConstraints.gridy = 2;
    2.60      gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    2.61      gridBagConstraints.weightx = 1.0;
    2.62      gridBagConstraints.weighty = 1.0;
     3.1 --- a/tasklist.usertasks/src/org/netbeans/modules/tasklist/usertasks/EditTaskPanel.form	Fri Feb 13 09:38:10 2004 +0000
     3.2 +++ b/tasklist.usertasks/src/org/netbeans/modules/tasklist/usertasks/EditTaskPanel.form	Sun Feb 15 17:32:11 2004 +0000
     3.3 @@ -8,6 +8,8 @@
     3.4      </Component>
     3.5      <Component class="javax.swing.ButtonGroup" name="buttonGroupProgress">
     3.6      </Component>
     3.7 +    <Component class="javax.swing.ButtonGroup" name="buttonGroupSpent">
     3.8 +    </Component>
     3.9    </NonVisualComponents>
    3.10    <Properties>
    3.11      <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
    3.12 @@ -365,7 +367,7 @@
    3.13                </Properties>
    3.14                <Constraints>
    3.15                  <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
    3.16 -                  <GridBagConstraints gridX="0" gridY="3" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="11" insetsLeft="0" insetsBottom="0" insetsRight="12" anchor="17" weightX="0.0" weightY="0.0"/>
    3.17 +                  <GridBagConstraints gridX="0" gridY="4" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="11" insetsLeft="0" insetsBottom="0" insetsRight="12" anchor="17" weightX="0.0" weightY="0.0"/>
    3.18                  </Constraint>
    3.19                </Constraints>
    3.20              </Component>
    3.21 @@ -377,21 +379,21 @@
    3.22                </Properties>
    3.23                <Constraints>
    3.24                  <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
    3.25 -                  <GridBagConstraints gridX="0" gridY="4" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="11" insetsLeft="0" insetsBottom="0" insetsRight="12" anchor="17" weightX="0.0" weightY="0.0"/>
    3.26 +                  <GridBagConstraints gridX="0" gridY="6" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="11" insetsLeft="0" insetsBottom="0" insetsRight="12" anchor="17" weightX="0.0" weightY="0.0"/>
    3.27                  </Constraint>
    3.28                </Constraints>
    3.29              </Component>
    3.30              <Component class="javax.swing.JLabel" name="jLabelLastEdited">
    3.31                <Constraints>
    3.32                  <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
    3.33 -                  <GridBagConstraints gridX="1" gridY="3" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="11" insetsLeft="0" insetsBottom="0" insetsRight="12" anchor="17" weightX="0.0" weightY="0.0"/>
    3.34 +                  <GridBagConstraints gridX="1" gridY="4" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="11" insetsLeft="0" insetsBottom="0" insetsRight="12" anchor="17" weightX="0.0" weightY="0.0"/>
    3.35                  </Constraint>
    3.36                </Constraints>
    3.37              </Component>
    3.38              <Component class="javax.swing.JLabel" name="jLabelCreated">
    3.39                <Constraints>
    3.40                  <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
    3.41 -                  <GridBagConstraints gridX="1" gridY="4" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="11" insetsLeft="0" insetsBottom="0" insetsRight="12" anchor="17" weightX="0.0" weightY="0.0"/>
    3.42 +                  <GridBagConstraints gridX="1" gridY="6" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="11" insetsLeft="0" insetsBottom="0" insetsRight="12" anchor="17" weightX="0.0" weightY="0.0"/>
    3.43                  </Constraint>
    3.44                </Constraints>
    3.45              </Component>
    3.46 @@ -449,7 +451,7 @@
    3.47                    </AuxValues>
    3.48                    <Constraints>
    3.49                      <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
    3.50 -                      <GridBagConstraints gridX="0" gridY="1" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="17" weightX="0.0" weightY="0.0"/>
    3.51 +                      <GridBagConstraints gridX="0" gridY="1" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="12" anchor="18" weightX="0.0" weightY="0.0"/>
    3.52                      </Constraint>
    3.53                    </Constraints>
    3.54                  </Component>
    3.55 @@ -534,7 +536,7 @@
    3.56                    </AuxValues>
    3.57                    <Constraints>
    3.58                      <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
    3.59 -                      <GridBagConstraints gridX="0" gridY="1" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="17" weightX="0.0" weightY="0.0"/>
    3.60 +                      <GridBagConstraints gridX="0" gridY="1" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="12" anchor="17" weightX="0.0" weightY="0.0"/>
    3.61                      </Constraint>
    3.62                    </Constraints>
    3.63                  </Component>
    3.64 @@ -554,6 +556,74 @@
    3.65                  </Container>
    3.66                </SubComponents>
    3.67              </Container>
    3.68 +            <Container class="javax.swing.JPanel" name="jPanel7">
    3.69 +              <Properties>
    3.70 +                <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
    3.71 +                  <Border info="org.netbeans.modules.form.compat2.border.TitledBorderInfo">
    3.72 +                    <TitledBorder title="Spent time"/>
    3.73 +                  </Border>
    3.74 +                </Property>
    3.75 +              </Properties>
    3.76 +              <Constraints>
    3.77 +                <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
    3.78 +                  <GridBagConstraints gridX="0" gridY="3" gridWidth="3" gridHeight="1" fill="1" ipadX="0" ipadY="0" insetsTop="11" insetsLeft="0" insetsBottom="0" insetsRight="12" anchor="10" weightX="0.0" weightY="0.0"/>
    3.79 +                </Constraint>
    3.80 +              </Constraints>
    3.81 +
    3.82 +              <Layout class="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout"/>
    3.83 +              <SubComponents>
    3.84 +                <Component class="javax.swing.JRadioButton" name="jRadioButtonComputeSpent">
    3.85 +                  <Properties>
    3.86 +                    <Property name="selected" type="boolean" value="true"/>
    3.87 +                    <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
    3.88 +                      <ResourceString bundle="org/netbeans/modules/tasklist/usertasks/Bundle.properties" key="ComputeSpentTkme" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
    3.89 +                    </Property>
    3.90 +                    <Property name="buttonGroup" type="javax.swing.ButtonGroup" editor="org.netbeans.modules.form.RADComponent$ButtonGroupPropertyEditor">
    3.91 +                      <ComponentRef name="buttonGroupSpent"/>
    3.92 +                    </Property>
    3.93 +                  </Properties>
    3.94 +                  <AuxValues>
    3.95 +                    <AuxValue name="generateMnemonicsCode" type="java.lang.Boolean" value="true"/>
    3.96 +                  </AuxValues>
    3.97 +                  <Constraints>
    3.98 +                    <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
    3.99 +                      <GridBagConstraints gridX="-1" gridY="-1" gridWidth="2" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="17" weightX="0.0" weightY="0.0"/>
   3.100 +                    </Constraint>
   3.101 +                  </Constraints>
   3.102 +                </Component>
   3.103 +                <Component class="javax.swing.JRadioButton" name="jRadioButtonSpent">
   3.104 +                  <Properties>
   3.105 +                    <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
   3.106 +                      <ResourceString bundle="org/netbeans/modules/tasklist/usertasks/Bundle.properties" key="UseThisValue" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
   3.107 +                    </Property>
   3.108 +                    <Property name="buttonGroup" type="javax.swing.ButtonGroup" editor="org.netbeans.modules.form.RADComponent$ButtonGroupPropertyEditor">
   3.109 +                      <ComponentRef name="buttonGroupSpent"/>
   3.110 +                    </Property>
   3.111 +                  </Properties>
   3.112 +                  <Events>
   3.113 +                    <EventHandler event="itemStateChanged" listener="java.awt.event.ItemListener" parameters="java.awt.event.ItemEvent" handler="jRadioButtonSpentItemStateChanged"/>
   3.114 +                  </Events>
   3.115 +                  <AuxValues>
   3.116 +                    <AuxValue name="generateMnemonicsCode" type="java.lang.Boolean" value="true"/>
   3.117 +                  </AuxValues>
   3.118 +                  <Constraints>
   3.119 +                    <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
   3.120 +                      <GridBagConstraints gridX="0" gridY="1" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="12" anchor="18" weightX="0.0" weightY="0.0"/>
   3.121 +                    </Constraint>
   3.122 +                  </Constraints>
   3.123 +                </Component>
   3.124 +                <Component class="org.netbeans.modules.tasklist.usertasks.DurationPanel" name="durationPanelSpent">
   3.125 +                  <Properties>
   3.126 +                    <Property name="enabled" type="boolean" value="false"/>
   3.127 +                  </Properties>
   3.128 +                  <Constraints>
   3.129 +                    <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
   3.130 +                      <GridBagConstraints gridX="1" gridY="1" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="17" weightX="1.0" weightY="0.0"/>
   3.131 +                    </Constraint>
   3.132 +                  </Constraints>
   3.133 +                </Component>
   3.134 +              </SubComponents>
   3.135 +            </Container>
   3.136            </SubComponents>
   3.137          </Container>
   3.138        </SubComponents>
     4.1 --- a/tasklist.usertasks/src/org/netbeans/modules/tasklist/usertasks/EditTaskPanel.java	Fri Feb 13 09:38:10 2004 +0000
     4.2 +++ b/tasklist.usertasks/src/org/netbeans/modules/tasklist/usertasks/EditTaskPanel.java	Sun Feb 15 17:32:11 2004 +0000
     4.3 @@ -220,6 +220,12 @@
     4.4              DateFormat.LONG, DateFormat.LONG);
     4.5          jLabelCreated.setText(df.format(new Date(item.getCreatedDate())));
     4.6          jLabelLastEdited.setText(df.format(new Date(item.getLastEditedDate())));
     4.7 +        
     4.8 +        durationPanelSpent.setDuration(item.getSpentTime());
     4.9 +        if (item.isSpentTimeComputed())
    4.10 +            jRadioButtonComputeSpent.setSelected(true);
    4.11 +        else
    4.12 +            jRadioButtonSpent.setSelected(true);
    4.13      }
    4.14      
    4.15      /**
    4.16 @@ -258,6 +264,11 @@
    4.17          if (!task.isEffortComputed()) {
    4.18              task.setEffort(durationPanel.getDuration());
    4.19          }
    4.20 +
    4.21 +        task.setSpentTimeComputed(jRadioButtonComputeSpent.isSelected());
    4.22 +        if (!task.isSpentTimeComputed()) {
    4.23 +            task.setSpentTime(durationPanelSpent.getDuration());
    4.24 +        }
    4.25      }
    4.26      
    4.27      /**
    4.28 @@ -378,6 +389,7 @@
    4.29          addButtonGroup = new javax.swing.ButtonGroup();
    4.30          effortButtonGroup = new javax.swing.ButtonGroup();
    4.31          buttonGroupProgress = new javax.swing.ButtonGroup();
    4.32 +        buttonGroupSpent = new javax.swing.ButtonGroup();
    4.33          jTabbedPane1 = new javax.swing.JTabbedPane();
    4.34          jPanelGeneral = new javax.swing.JPanel();
    4.35          descLabel = new javax.swing.JLabel();
    4.36 @@ -416,6 +428,10 @@
    4.37          jRadioButtonComputeProgress = new javax.swing.JRadioButton();
    4.38          jRadioButtonProgress = new javax.swing.JRadioButton();
    4.39          jPanel6 = new javax.swing.JPanel();
    4.40 +        jPanel7 = new javax.swing.JPanel();
    4.41 +        jRadioButtonComputeSpent = new javax.swing.JRadioButton();
    4.42 +        jRadioButtonSpent = new javax.swing.JRadioButton();
    4.43 +        durationPanelSpent = new org.netbeans.modules.tasklist.usertasks.DurationPanel();
    4.44  
    4.45          setLayout(new java.awt.BorderLayout());
    4.46  
    4.47 @@ -675,7 +691,7 @@
    4.48      jLabel6.setText(org.openide.util.NbBundle.getMessage(EditTaskPanel.class, "LastEditedLabel")); // NOI18N);
    4.49      gridBagConstraints = new java.awt.GridBagConstraints();
    4.50      gridBagConstraints.gridx = 0;
    4.51 -    gridBagConstraints.gridy = 3;
    4.52 +    gridBagConstraints.gridy = 4;
    4.53      gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
    4.54      gridBagConstraints.insets = new java.awt.Insets(11, 0, 0, 12);
    4.55      jPanel3.add(jLabel6, gridBagConstraints);
    4.56 @@ -683,21 +699,21 @@
    4.57      jLabel5.setText(org.openide.util.NbBundle.getMessage(EditTaskPanel.class, "CreatedLabel")); // NOI18N);
    4.58      gridBagConstraints = new java.awt.GridBagConstraints();
    4.59      gridBagConstraints.gridx = 0;
    4.60 -    gridBagConstraints.gridy = 4;
    4.61 +    gridBagConstraints.gridy = 6;
    4.62      gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
    4.63      gridBagConstraints.insets = new java.awt.Insets(11, 0, 0, 12);
    4.64      jPanel3.add(jLabel5, gridBagConstraints);
    4.65  
    4.66      gridBagConstraints = new java.awt.GridBagConstraints();
    4.67      gridBagConstraints.gridx = 1;
    4.68 -    gridBagConstraints.gridy = 3;
    4.69 +    gridBagConstraints.gridy = 4;
    4.70      gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
    4.71      gridBagConstraints.insets = new java.awt.Insets(11, 0, 0, 12);
    4.72      jPanel3.add(jLabelLastEdited, gridBagConstraints);
    4.73  
    4.74      gridBagConstraints = new java.awt.GridBagConstraints();
    4.75      gridBagConstraints.gridx = 1;
    4.76 -    gridBagConstraints.gridy = 4;
    4.77 +    gridBagConstraints.gridy = 6;
    4.78      gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
    4.79      gridBagConstraints.insets = new java.awt.Insets(11, 0, 0, 12);
    4.80      jPanel3.add(jLabelCreated, gridBagConstraints);
    4.81 @@ -724,7 +740,8 @@
    4.82      gridBagConstraints = new java.awt.GridBagConstraints();
    4.83      gridBagConstraints.gridx = 0;
    4.84      gridBagConstraints.gridy = 1;
    4.85 -    gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
    4.86 +    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    4.87 +    gridBagConstraints.insets = new java.awt.Insets(0, 0, 0, 12);
    4.88      jPanel4.add(jRadioButtonEffort, gridBagConstraints);
    4.89  
    4.90      jPanelEffort.setLayout(new java.awt.BorderLayout());
    4.91 @@ -779,6 +796,7 @@
    4.92      gridBagConstraints.gridx = 0;
    4.93      gridBagConstraints.gridy = 1;
    4.94      gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
    4.95 +    gridBagConstraints.insets = new java.awt.Insets(0, 0, 0, 12);
    4.96      jPanel5.add(jRadioButtonProgress, gridBagConstraints);
    4.97  
    4.98      jPanel6.setPreferredSize(new java.awt.Dimension(0, 0));
    4.99 @@ -799,12 +817,58 @@
   4.100      gridBagConstraints.insets = new java.awt.Insets(11, 0, 0, 12);
   4.101      jPanel3.add(jPanel5, gridBagConstraints);
   4.102  
   4.103 +    jPanel7.setLayout(new java.awt.GridBagLayout());
   4.104 +
   4.105 +    jPanel7.setBorder(new javax.swing.border.TitledBorder("Spent time"));
   4.106 +    jRadioButtonComputeSpent.setSelected(true);
   4.107 +    org.openide.awt.Mnemonics.setLocalizedText(jRadioButtonComputeSpent, org.openide.util.NbBundle.getMessage(EditTaskPanel.class, "ComputeSpentTkme"));
   4.108 +    buttonGroupSpent.add(jRadioButtonComputeSpent);
   4.109 +    gridBagConstraints = new java.awt.GridBagConstraints();
   4.110 +    gridBagConstraints.gridwidth = 2;
   4.111 +    gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
   4.112 +    jPanel7.add(jRadioButtonComputeSpent, gridBagConstraints);
   4.113 +
   4.114 +    org.openide.awt.Mnemonics.setLocalizedText(jRadioButtonSpent, org.openide.util.NbBundle.getMessage(EditTaskPanel.class, "UseThisValue"));
   4.115 +    buttonGroupSpent.add(jRadioButtonSpent);
   4.116 +    jRadioButtonSpent.addItemListener(new java.awt.event.ItemListener() {
   4.117 +        public void itemStateChanged(java.awt.event.ItemEvent evt) {
   4.118 +            jRadioButtonSpentItemStateChanged(evt);
   4.119 +        }
   4.120 +    });
   4.121 +
   4.122 +    gridBagConstraints = new java.awt.GridBagConstraints();
   4.123 +    gridBagConstraints.gridx = 0;
   4.124 +    gridBagConstraints.gridy = 1;
   4.125 +    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
   4.126 +    gridBagConstraints.insets = new java.awt.Insets(0, 0, 0, 12);
   4.127 +    jPanel7.add(jRadioButtonSpent, gridBagConstraints);
   4.128 +
   4.129 +    durationPanelSpent.setEnabled(false);
   4.130 +    gridBagConstraints = new java.awt.GridBagConstraints();
   4.131 +    gridBagConstraints.gridx = 1;
   4.132 +    gridBagConstraints.gridy = 1;
   4.133 +    gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
   4.134 +    gridBagConstraints.weightx = 1.0;
   4.135 +    jPanel7.add(durationPanelSpent, gridBagConstraints);
   4.136 +
   4.137 +    gridBagConstraints = new java.awt.GridBagConstraints();
   4.138 +    gridBagConstraints.gridx = 0;
   4.139 +    gridBagConstraints.gridy = 3;
   4.140 +    gridBagConstraints.gridwidth = 3;
   4.141 +    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
   4.142 +    gridBagConstraints.insets = new java.awt.Insets(11, 0, 0, 12);
   4.143 +    jPanel3.add(jPanel7, gridBagConstraints);
   4.144 +
   4.145      jTabbedPane1.addTab(org.openide.util.NbBundle.getMessage(EditTaskPanel.class, "TimeRelated"), jPanel3);
   4.146  
   4.147      add(jTabbedPane1, java.awt.BorderLayout.CENTER);
   4.148  
   4.149      }//GEN-END:initComponents
   4.150  
   4.151 +    private void jRadioButtonSpentItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_jRadioButtonSpentItemStateChanged
   4.152 +        durationPanelSpent.setEnabled(jRadioButtonSpent.isSelected());
   4.153 +    }//GEN-LAST:event_jRadioButtonSpentItemStateChanged
   4.154 +
   4.155      private void jRadioButtonProgressItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_jRadioButtonProgressItemStateChanged
   4.156          jComboBoxProgress.setEnabled(jRadioButtonProgress.isSelected());
   4.157      }//GEN-LAST:event_jRadioButtonProgressItemStateChanged
   4.158 @@ -952,6 +1016,7 @@
   4.159      private javax.swing.JButton addSourceButton;
   4.160      private javax.swing.JRadioButton beginningToggle;
   4.161      private javax.swing.ButtonGroup buttonGroupProgress;
   4.162 +    private javax.swing.ButtonGroup buttonGroupSpent;
   4.163      private javax.swing.JComboBox categoryCombo;
   4.164      private javax.swing.JLabel categoryLabel;
   4.165      private javax.swing.JLabel descLabel;
   4.166 @@ -962,6 +1027,7 @@
   4.167      private javax.swing.JCheckBox dueCheckBox;
   4.168      private javax.swing.JButton dueDateBrowseButton;
   4.169      private javax.swing.JTextField dueDateTextField;
   4.170 +    private org.netbeans.modules.tasklist.usertasks.DurationPanel durationPanelSpent;
   4.171      private javax.swing.ButtonGroup effortButtonGroup;
   4.172      private javax.swing.JRadioButton endToggle;
   4.173      private javax.swing.JCheckBox fileCheckBox;
   4.174 @@ -977,12 +1043,15 @@
   4.175      private javax.swing.JPanel jPanel4;
   4.176      private javax.swing.JPanel jPanel5;
   4.177      private javax.swing.JPanel jPanel6;
   4.178 +    private javax.swing.JPanel jPanel7;
   4.179      private javax.swing.JPanel jPanelEffort;
   4.180      private javax.swing.JPanel jPanelGeneral;
   4.181      private javax.swing.JRadioButton jRadioButtonComputeEffort;
   4.182      private javax.swing.JRadioButton jRadioButtonComputeProgress;
   4.183 +    private javax.swing.JRadioButton jRadioButtonComputeSpent;
   4.184      private javax.swing.JRadioButton jRadioButtonEffort;
   4.185      private javax.swing.JRadioButton jRadioButtonProgress;
   4.186 +    private javax.swing.JRadioButton jRadioButtonSpent;
   4.187      private javax.swing.JTabbedPane jTabbedPane1;
   4.188      private javax.swing.JLabel lineLabel;
   4.189      private javax.swing.JTextField lineTextField;
     5.1 --- a/tasklist.usertasks/src/org/netbeans/modules/tasklist/usertasks/UserTaskNode.java	Fri Feb 13 09:38:10 2004 +0000
     5.2 +++ b/tasklist.usertasks/src/org/netbeans/modules/tasklist/usertasks/UserTaskNode.java	Sun Feb 15 17:32:11 2004 +0000
     5.3 @@ -137,6 +137,8 @@
     5.4                  SystemAction.get(NewTaskAction.class),
     5.5                  SystemAction.get(NewTaskListAction.class),
     5.6                  null,
     5.7 +                SystemAction.get(PauseAction.class),
     5.8 +                null,
     5.9                  SystemAction.get(PasteAction.class),
    5.10                  null,
    5.11                  SystemAction.get(FilterAction.class),
    5.12 @@ -151,6 +153,9 @@
    5.13                  SystemAction.get(NewTaskAction.class),
    5.14                  SystemAction.get(NewTaskListAction.class),
    5.15                  null,
    5.16 +                SystemAction.get(PauseAction.class),
    5.17 +                null,
    5.18 +                SystemAction.get(StartTaskAction.class),
    5.19                  SystemAction.get(ShowTaskAction.class),
    5.20                  SystemAction.get(GoToTaskAction.class),
    5.21                  null,
    5.22 @@ -238,10 +243,18 @@
    5.23              p.setPropertyEditorClass(DurationPropertyEditor.class);
    5.24              ss.put(p);
    5.25  
    5.26 -            p = new Reflection(item, Integer.TYPE, "getRestEffort", null);
    5.27 -            p.setName("restEffort");
    5.28 -            p.setDisplayName(NbBundle.getMessage(UserTaskNode.class, "RestEffort")); // NOI18N
    5.29 -            p.setShortDescription(NbBundle.getMessage(UserTaskNode.class, "RestEffortHint")); // NOI18N
    5.30 +            p = new Reflection(item, Integer.TYPE, "getRemainingEffort", null);
    5.31 +            p.setName("remainingEffort");
    5.32 +            p.setDisplayName(NbBundle.getMessage(UserTaskNode.class, "RemainingEffort")); // NOI18N
    5.33 +            p.setShortDescription(NbBundle.getMessage(UserTaskNode.class, "RemainingEffortHint")); // NOI18N
    5.34 +            p.setValue("suppressCustomEditor", Boolean.TRUE);
    5.35 +            p.setPropertyEditorClass(DurationPropertyEditor.class);
    5.36 +            ss.put(p);
    5.37 +
    5.38 +            p = new Reflection(item, Integer.TYPE, "getSpentTime", null);
    5.39 +            p.setName("spentTime");
    5.40 +            p.setDisplayName(NbBundle.getMessage(UserTaskNode.class, "SpentTime")); // NOI18N
    5.41 +            p.setShortDescription(NbBundle.getMessage(UserTaskNode.class, "SpentTimeHint")); // NOI18N
    5.42              p.setValue("suppressCustomEditor", Boolean.TRUE);
    5.43              p.setPropertyEditorClass(DurationPropertyEditor.class);
    5.44              ss.put(p);
     6.1 --- a/tasklist.usertasks/src/org/netbeans/modules/tasklist/usertasks/UserTaskView.java	Fri Feb 13 09:38:10 2004 +0000
     6.2 +++ b/tasklist.usertasks/src/org/netbeans/modules/tasklist/usertasks/UserTaskView.java	Sun Feb 15 17:32:11 2004 +0000
     6.3 @@ -67,8 +67,6 @@
     6.4          LOGGER.setLevel(Level.OFF);
     6.5      }
     6.6      
     6.7 -    private static final Timer TIMER = new Timer(true);
     6.8 -    
     6.9      /** Construct a new UserTaskView. Most work is deferred to
    6.10  	componentOpened. NOTE: this is only for use by the window
    6.11  	system when deserializing windows. Client code should not call
    6.12 @@ -106,28 +104,16 @@
    6.13  	    }
    6.14  	    views.add(this);
    6.15  	}
    6.16 -        
    6.17 -        TIMER.scheduleAtFixedRate(new TimerTask() {
    6.18 -            public void run() {
    6.19 -                timer();
    6.20 -            }
    6.21 -        }, 0, 1000);
    6.22      }
    6.23  
    6.24 -    /**
    6.25 -     * Executed once per second
    6.26 -     */
    6.27 -    private void timer() {
    6.28 -        // TODO
    6.29 -    }
    6.30 -    
    6.31      public SystemAction[] getToolBarActions() {
    6.32          return new SystemAction[] {
    6.33              SystemAction.get(NewTaskAction.class),
    6.34              SystemAction.get(DeleteAction.class),
    6.35              SystemAction.get(GoToTaskAction.class),
    6.36              SystemAction.get(FilterAction.class),
    6.37 -            SystemAction.get(RemoveFilterAction.class)
    6.38 +            SystemAction.get(RemoveFilterAction.class),
    6.39 +            SystemAction.get(StartTaskAction.class)
    6.40          };
    6.41      }
    6.42      
    6.43 @@ -241,7 +227,8 @@
    6.44      public static final String PROP_TASK_EDITED = "edited"; // NOI18N
    6.45      public static final String PROP_TASK_PERCENT = "percentComplete"; // NOI18N
    6.46      public static final String PROP_EFFORT = "effort"; // NOI18N
    6.47 -    public static final String PROP_REST_EFFORT = "restEffort"; // NOI18N
    6.48 +    public static final String PROP_REMAINING_EFFORT = "remainingEffort"; // NOI18N
    6.49 +    public static final String PROP_SPENT_TIME = "spentTime"; // NOI18N
    6.50      
    6.51      protected ColumnProperty[] createColumns() {
    6.52          return new ColumnProperty[] {
    6.53 @@ -257,7 +244,8 @@
    6.54              getDoneColumn(true, 40),
    6.55              getPercentColumn(false, 100),
    6.56              getEffortColumn(false, 50),
    6.57 -            getRestEffortColumn(false, 50)
    6.58 +            getRemainingEffortColumn(false, 50),
    6.59 +            getSpentTimeColumn(false, 50)
    6.60              
    6.61              // When adding more columns here, also remember to go to the 
    6.62              // constructor and add a column width setting 
    6.63 @@ -415,13 +403,26 @@
    6.64              );
    6.65      }
    6.66      
    6.67 -    public ColumnProperty getRestEffortColumn(boolean visible, int width) {
    6.68 +    public ColumnProperty getRemainingEffortColumn(boolean visible, int width) {
    6.69          return new ColumnProperty(
    6.70 -    	    11, // UID -- never change (part of serialization
    6.71 -            PROP_REST_EFFORT,
    6.72 +    	    12, // UID -- never change (part of serialization
    6.73 +            PROP_REMAINING_EFFORT,
    6.74              Integer.TYPE,
    6.75 -            NbBundle.getMessage(UserTaskView.class, "RestEffort"), // NOI18N
    6.76 -            NbBundle.getMessage(UserTaskView.class, "RestEffortHint"), // NOI18N
    6.77 +            NbBundle.getMessage(UserTaskView.class, "RemainingEffort"), // NOI18N
    6.78 +            NbBundle.getMessage(UserTaskView.class, "RemainingEffortHint"), // NOI18N
    6.79 +            true,
    6.80 +            visible,
    6.81 +            width
    6.82 +            );
    6.83 +    }
    6.84 +    
    6.85 +    public ColumnProperty getSpentTimeColumn(boolean visible, int width) {
    6.86 +        return new ColumnProperty(
    6.87 +    	    13, // UID -- never change (part of serialization
    6.88 +            PROP_SPENT_TIME,
    6.89 +            Integer.TYPE,
    6.90 +            NbBundle.getMessage(UserTaskView.class, "SpentTime"), // NOI18N
    6.91 +            NbBundle.getMessage(UserTaskView.class, "SpentTimeHint"), // NOI18N
    6.92              true,
    6.93              visible,
    6.94              width
     7.1 --- a/tasklist.usertasks/src/org/netbeans/modules/tasklist/usertasks/translators/usertasks-1_0.dtd	Fri Feb 13 09:38:10 2004 +0000
     7.2 +++ b/tasklist.usertasks/src/org/netbeans/modules/tasklist/usertasks/translators/usertasks-1_0.dtd	Sun Feb 15 17:32:11 2004 +0000
     7.3 @@ -25,6 +25,7 @@
     7.4          (see http://www.w3.org/TR/NOTE-datetime)
     7.5      line - 1 = the first line in a file
     7.6      effort - effort in minutes
     7.7 +    spent - spent time in minutes
     7.8  -->
     7.9  <!ELEMENT task (summary, details?, (task)*)>
    7.10  <!ATTLIST task 
    7.11 @@ -39,6 +40,8 @@
    7.12      line CDATA #IMPLIED
    7.13      created CDATA #REQUIRED
    7.14      modified CDATA #REQUIRED
    7.15 +    spent-time CDATA #REQUIRED
    7.16 +    spent-time-computed (yes|no) "no"
    7.17  >
    7.18  
    7.19  <!ELEMENT details (#PCDATA)>