1.1 --- a/tasklist.usertasks/build.xml Wed Oct 04 17:03:04 2006 +0000
1.2 +++ b/tasklist.usertasks/build.xml Sat Oct 07 12:43:26 2006 +0000
1.3 @@ -53,7 +53,7 @@
1.4 <copy todir="${cluster}/modules/ext">
1.5 <fileset dir="../external/">
1.6 <include name="jcalendar*.jar"/>
1.7 - <include name="ical4j.jar"/>
1.8 + <include name="ical4j*.jar"/>
1.9 </fileset>
1.10 </copy>
1.11 </target>
2.1 --- a/tasklist.usertasks/doc/plans.ics Wed Oct 04 17:03:04 2006 +0000
2.2 +++ b/tasklist.usertasks/doc/plans.ics Sat Oct 07 12:43:26 2006 +0000
2.3 @@ -5,27 +5,58 @@
2.4 UID:nb1145554971896.272@timpc/127.0.0.1
2.5 CREATED:20060420T174251Z
2.6 SUMMARY:NetBeans 6.0+ (1.30.?????)
2.7 -PERCENT-COMPLETE:100
2.8 -X-NETBEANS-EFFORT:0
2.9 +PERCENT-COMPLETE:0
2.10 +X-NETBEANS-EFFORT:5760
2.11 X-NETBEANS-SPENT-TIME:0
2.12 -LAST-MODIFIED:20060704T221124Z
2.13 +LAST-MODIFIED:20061007T104711Z
2.14 X-NETBEANS-PROGRESS-COMPUTED:yes
2.15 X-NETBEANS-EFFORT-COMPUTED:yes
2.16 X-NETBEANS-SPENT-TIME-COMPUTED:yes
2.17 COMPLETED:20060428T145235Z
2.18 END:VTODO
2.19 BEGIN:VTODO
2.20 +UID:nb1160217983753.213@timpc2/127.0.0.1
2.21 +CREATED:20061007T104623Z
2.22 +SUMMARY:Gantt diagrams
2.23 +PERCENT-COMPLETE:0
2.24 +X-NETBEANS-EFFORT:4800
2.25 +X-NETBEANS-SPENT-TIME:0
2.26 +LAST-MODIFIED:20061007T104711Z
2.27 +RELATED-TO:nb1145554971896.272@timpc/127.0.0.1
2.28 +END:VTODO
2.29 +BEGIN:VTODO
2.30 +UID:nb1160217958638.212@timpc2/127.0.0.1
2.31 +CREATED:20061007T104558Z
2.32 +SUMMARY:Integration with projects module
2.33 +PERCENT-COMPLETE:0
2.34 +X-NETBEANS-EFFORT:960
2.35 +X-NETBEANS-SPENT-TIME:0
2.36 +LAST-MODIFIED:20061007T104617Z
2.37 +RELATED-TO:nb1145554971896.272@timpc/127.0.0.1
2.38 +END:VTODO
2.39 +BEGIN:VTODO
2.40 UID:nb1137857799682.30@timpc/127.0.0.1
2.41 CREATED:20060121T153639Z
2.42 SUMMARY:NetBeans 6.0/promo-H (1.29.?????)
2.43 -PERCENT-COMPLETE:74
2.44 -X-NETBEANS-EFFORT:9750
2.45 -X-NETBEANS-SPENT-TIME:6578
2.46 -LAST-MODIFIED:20060704T223814Z
2.47 +PERCENT-COMPLETE:78
2.48 +X-NETBEANS-EFFORT:10020
2.49 +X-NETBEANS-SPENT-TIME:6818
2.50 +LAST-MODIFIED:20061007T124141Z
2.51 X-NETBEANS-PROGRESS-COMPUTED:yes
2.52 X-NETBEANS-EFFORT-COMPUTED:yes
2.53 X-NETBEANS-SPENT-TIME-COMPUTED:yes
2.54 X-NETBEANS-DUETIME:1159488000000
2.55 +X-NETBEANS-DUE-SIGNALED:yes
2.56 +END:VTODO
2.57 +BEGIN:VTODO
2.58 +UID:nb1159871250097.150@timpc2/127.0.0.1
2.59 +CREATED:20061003T102730Z
2.60 +SUMMARY:use .awt.Mnemonics
2.61 +PERCENT-COMPLETE:0
2.62 +X-NETBEANS-EFFORT:60
2.63 +X-NETBEANS-SPENT-TIME:0
2.64 +LAST-MODIFIED:20061007T113907Z
2.65 +RELATED-TO:nb1137857799682.30@timpc/127.0.0.1
2.66 END:VTODO
2.67 BEGIN:VTODO
2.68 UID:nb1150658712767.237@timpc/127.0.0.1
2.69 @@ -43,18 +74,18 @@
2.70 SUMMARY:JCalendar as a NB library module
2.71 PERCENT-COMPLETE:0
2.72 X-NETBEANS-EFFORT:60
2.73 -X-NETBEANS-SPENT-TIME:0
2.74 -LAST-MODIFIED:20060704T221124Z
2.75 +X-NETBEANS-SPENT-TIME:22
2.76 +LAST-MODIFIED:20061007T102548Z
2.77 RELATED-TO:nb1137857799682.30@timpc/127.0.0.1
2.78 END:VTODO
2.79 BEGIN:VTODO
2.80 UID:nb1145736734171.295@timpc/127.0.0.1
2.81 CREATED:20060422T201214Z
2.82 SUMMARY:Since last commit
2.83 -PERCENT-COMPLETE:75
2.84 -X-NETBEANS-EFFORT:1590
2.85 -X-NETBEANS-SPENT-TIME:1084
2.86 -LAST-MODIFIED:20060704T223814Z
2.87 +PERCENT-COMPLETE:100
2.88 +X-NETBEANS-EFFORT:1800
2.89 +X-NETBEANS-SPENT-TIME:1302
2.90 +LAST-MODIFIED:20061007T124141Z
2.91 RELATED-TO:nb1137857799682.30@timpc/127.0.0.1
2.92 X-NETBEANS-PROGRESS-COMPUTED:yes
2.93 X-NETBEANS-EFFORT-COMPUTED:yes
2.94 @@ -62,38 +93,63 @@
2.95 COMPLETED:20060423T093054Z
2.96 END:VTODO
2.97 BEGIN:VTODO
2.98 +UID:nb1160217802766.211@timpc2/127.0.0.1
2.99 +CREATED:20061007T104322Z
2.100 +SUMMARY:ical4j 0.9.20 integrated
2.101 +PERCENT-COMPLETE:100
2.102 +X-NETBEANS-EFFORT:30
2.103 +X-NETBEANS-SPENT-TIME:61
2.104 +LAST-MODIFIED:20061007T124141Z
2.105 +RELATED-TO:nb1145736734171.295@timpc/127.0.0.1
2.106 +COMPLETED:20061007T124141Z
2.107 +END:VTODO
2.108 +BEGIN:VTODO
2.109 UID:nb1151264306524.238@timpc/127.0.0.1
2.110 CREATED:20060625T193826Z
2.111 SUMMARY:Export wizards simplified (one page less)
2.112 -PERCENT-COMPLETE:25
2.113 +PERCENT-COMPLETE:100
2.114 X-NETBEANS-EFFORT:30
2.115 X-NETBEANS-SPENT-TIME:0
2.116 -LAST-MODIFIED:20060704T221124Z
2.117 +LAST-MODIFIED:20061007T102537Z
2.118 RELATED-TO:nb1145736734171.295@timpc/127.0.0.1
2.119 +COMPLETED:20061007T102537Z
2.120 END:VTODO
2.121 BEGIN:VTODO
2.122 UID:nb1149874748483.236@timpc/127.0.0.1
2.123 CREATED:20060402T201607Z
2.124 SUMMARY:Remove usages of ErrorManager (only missing: replacement for anno
2.125 tate?)
2.126 -PERCENT-COMPLETE:90
2.127 +PERCENT-COMPLETE:100
2.128 X-NETBEANS-EFFORT:120
2.129 -X-NETBEANS-SPENT-TIME:64
2.130 -LAST-MODIFIED:20060704T221124Z
2.131 +X-NETBEANS-SPENT-TIME:71
2.132 +LAST-MODIFIED:20061007T103317Z
2.133 X-NETBEANS-OWNER:tim
2.134 RELATED-TO:nb1145736734171.295@timpc/127.0.0.1
2.135 +COMPLETED:20061007T103317Z
2.136 PRIORITY:4
2.137 END:VTODO
2.138 BEGIN:VTODO
2.139 UID:nb1149874753353.238@timpc/127.0.0.1
2.140 CREATED:20060609T173706Z
2.141 SUMMARY:Implement \"todays hours\" as an export
2.142 -PERCENT-COMPLETE:75
2.143 +PERCENT-COMPLETE:100
2.144 X-NETBEANS-EFFORT:1440
2.145 X-NETBEANS-SPENT-TIME:1020
2.146 -LAST-MODIFIED:20060704T223814Z
2.147 +LAST-MODIFIED:20061007T103451Z
2.148 RELATED-TO:nb1145736734171.295@timpc/127.0.0.1
2.149 X-NETBEANS-OWNER:tim
2.150 +COMPLETED:20061007T103451Z
2.151 +END:VTODO
2.152 +BEGIN:VTODO
2.153 +UID:nb1159881395665.204@timpc2/127.0.0.1
2.154 +CREATED:20061003T102757Z
2.155 +SUMMARY:Better cell editor for durations
2.156 +PERCENT-COMPLETE:100
2.157 +X-NETBEANS-EFFORT:180
2.158 +X-NETBEANS-SPENT-TIME:150
2.159 +LAST-MODIFIED:20061003T131531Z
2.160 +COMPLETED:20061003T131531Z
2.161 +RELATED-TO:nb1145736734171.295@timpc/127.0.0.1
2.162 END:VTODO
2.163 BEGIN:VTODO
2.164 UID:nb1145292710486.268@timpc/127.0.0.1
3.1 --- a/tasklist.usertasks/javahelp/org/netbeans/modules/tasklist/usertasks/docs/content/newTaskDialog.html Wed Oct 04 17:03:04 2006 +0000
3.2 +++ b/tasklist.usertasks/javahelp/org/netbeans/modules/tasklist/usertasks/docs/content/newTaskDialog.html Sat Oct 07 12:43:26 2006 +0000
3.3 @@ -2,61 +2,83 @@
3.4 <html>
3.5 <head>
3.6
3.7 +
3.8 +
3.9 <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
3.10 +
3.11 +
3.12 <title>How to add a task to the source</title>
3.13 -
3.14 -
3.15 </head>
3.16
3.17
3.18 <body>
3.19
3.20 +
3.21 <h2>"New Task" Dialog</h2>
3.22
3.23 +
3.24 <br>
3.25
3.26 +
3.27 The "General" tab contains some common properties of a task like
3.28 summary, details, priority, category and owner. A file can be <a href="addTask.html">associated</a> with a task. The
3.29 category and owner
3.30 fields allow you to choose from values that were already used in the
3.31 same task list.<br>
3.32
3.33 +
3.34 <br>
3.35
3.36 +
3.37 <img src="images/newTaskDialog.jpg" title="" alt="General Tab" style="width: 608px; height: 585px;"> <br>
3.38
3.39 -<br>
3.40 -
3.41 -The second tab contains some time related properties. Due field
3.42 -contains a date and probably a time when the task should be completed.
3.43 -Effort, progress and spent time could be computed automatically. <br>
3.44
3.45 <br>
3.46
3.47 -<img src="images/timeRelated.jpeg" title="" alt="Time Related Tab" style="width: 608px; height: 576px;"><br>
3.48 +
3.49 +The second tab contains some time related properties. Due field
3.50 +contains a date when the task should be completed.
3.51 +Effort, progress and spent time could be computed automatically. <br>
3.52 +
3.53
3.54 <br>
3.55
3.56 -On the third tab you can define dependencies for the task.<br>
3.57 +
3.58 +<img src="images/timeRelated.jpeg" alt="Time Related Tab" style="width: 608px; height: 576px;"><br>
3.59 +
3.60
3.61 <br>
3.62
3.63 +
3.64 +On the third tab you can define dependencies for the task.<br>
3.65 +
3.66 +
3.67 +<br>
3.68 +
3.69 +
3.70 <img src="images/dependencies.jpeg" title="" alt="Dependencies Tab" style="width: 608px; height: 576px;"><br>
3.71
3.72 +
3.73 <br>
3.74
3.75 +
3.76 The fourth tab lists time periods spent working on the task. "<a href="options.html">Collect Work Periods</a>" option
3.77 should be
3.78 activated to use this.<br>
3.79
3.80 +
3.81 <br>
3.82
3.83 +
3.84 <img src="images/workPeriods.jpeg" title="" alt="Work Periods Tab" style="width: 608px; height: 576px;"><br>
3.85
3.86 +
3.87 <br>
3.88
3.89 +
3.90 <hr>Comments & requests to <a href="mailto:dev@tasklist.netbeans.org"><code>dev@tasklist.netbeans.org</code></a>.
3.91 Further information at <a href="http://tasklist.netbeans.org/"><code>http://tasklist.netbeans.org</code></a>.<br>
3.92
3.93 +
3.94 </body>
3.95 </html>
4.1 --- a/tasklist.usertasks/manifest.mf Wed Oct 04 17:03:04 2006 +0000
4.2 +++ b/tasklist.usertasks/manifest.mf Sat Oct 07 12:43:26 2006 +0000
4.3 @@ -1,6 +1,6 @@
4.4 Manifest-Version: 1.0
4.5 OpenIDE-Module: org.netbeans.modules.tasklist.usertasks/2
4.6 -OpenIDE-Module-Implementation-Version: 62
4.7 +OpenIDE-Module-Implementation-Version: 63
4.8 OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/tasklist/usertasks/Bundle.properties
4.9 OpenIDE-Module-Layer: org/netbeans/modules/tasklist/usertasks/mf-layer.xml
4.10
5.1 --- a/tasklist.usertasks/nbproject/project.properties Wed Oct 04 17:03:04 2006 +0000
5.2 +++ b/tasklist.usertasks/nbproject/project.properties Sat Oct 07 12:43:26 2006 +0000
5.3 @@ -19,4 +19,4 @@
5.4 javadoc.arch=${basedir}/arch.xml
5.5 spec.version.base=1.29.0
5.6 nbm.homepage=http://tasklist.netbeans.org/updates/tasklist-usertasks.html
5.7 -extra.module.files=modules/ext/jcalendar-1.3.0.jar,modules/ext/ical4j.jar
5.8 +extra.module.files=modules/ext/jcalendar-1.3.0.jar,modules/ext/ical4j-0.9.20.jar
6.1 --- a/tasklist.usertasks/nbproject/project.xml Wed Oct 04 17:03:04 2006 +0000
6.2 +++ b/tasklist.usertasks/nbproject/project.xml Sat Oct 07 12:43:26 2006 +0000
6.3 @@ -170,8 +170,8 @@
6.4 <binary-origin>../external/jcalendar-1.3.0.jar</binary-origin>
6.5 </class-path-extension>
6.6 <class-path-extension>
6.7 - <runtime-relative-path>ext/ical4j.jar</runtime-relative-path>
6.8 - <binary-origin>../external/ical4j.jar</binary-origin>
6.9 + <runtime-relative-path>ext/ical4j-0.9.20.jar</runtime-relative-path>
6.10 + <binary-origin>../external/ical4j-0.9.20.jar</binary-origin>
6.11 </class-path-extension>
6.12 </data>
6.13 </configuration>
7.1 --- a/tasklist.usertasks/src/org/netbeans/modules/tasklist/usertasks/Bundle.properties Wed Oct 04 17:03:04 2006 +0000
7.2 +++ b/tasklist.usertasks/src/org/netbeans/modules/tasklist/usertasks/Bundle.properties Sat Oct 07 12:43:26 2006 +0000
7.3 @@ -88,11 +88,6 @@
7.4 SpentTimeToday=Spent time today\:
7.5 LBL_Start=&Start\:
7.6
7.7 -## DurationPanel
7.8 -Minutes=Minutes
7.9 -Hours=Hours
7.10 -Days=Days
7.11 -
7.12 ## UserTaskNode
7.13 LBL_detailsProperty=Description
7.14 HNT_detailsProperty=Full description of the task
8.1 --- a/tasklist.usertasks/src/org/netbeans/modules/tasklist/usertasks/DurationPanel.java Wed Oct 04 17:03:04 2006 +0000
8.2 +++ b/tasklist.usertasks/src/org/netbeans/modules/tasklist/usertasks/DurationPanel.java Sat Oct 07 12:43:26 2006 +0000
8.3 @@ -20,11 +20,16 @@
8.4 package org.netbeans.modules.tasklist.usertasks;
8.5
8.6 import java.beans.PropertyEditor;
8.7 +import java.text.MessageFormat;
8.8 +import java.text.ParseException;
8.9 import javax.swing.JSpinner;
8.10 import javax.swing.SpinnerNumberModel;
8.11 import javax.swing.event.ChangeListener;
8.12 +import javax.swing.event.DocumentEvent;
8.13 +import javax.swing.event.DocumentListener;
8.14
8.15 import org.netbeans.modules.tasklist.usertasks.model.Duration;
8.16 +import org.netbeans.modules.tasklist.usertasks.util.DurationFormat;
8.17
8.18 /**
8.19 * Panel for duration
8.20 @@ -32,44 +37,38 @@
8.21 * @author tl
8.22 */
8.23 public class DurationPanel extends javax.swing.JPanel implements
8.24 -ChangeListener {
8.25 + ChangeListener {
8.26 private static final long serialVersionUID = 1;
8.27 -
8.28 +
8.29 private PropertyEditor pe;
8.30 -
8.31 + private DurationFormat short_ = new DurationFormat(
8.32 + DurationFormat.Type.SHORT);
8.33 + private DurationFormat long_ = new DurationFormat(DurationFormat.Type.LONG);
8.34 + private Duration dur;
8.35 +
8.36 /**
8.37 * Creates new form DurationPanel
8.38 */
8.39 public DurationPanel() {
8.40 initComponents();
8.41 -
8.42 - SpinnerNumberModel snm = (SpinnerNumberModel) jSpinnerDays.getModel();
8.43 - snm.setMinimum(new Integer(0));
8.44 - snm.setMaximum(new Integer(1000));
8.45 - snm.addChangeListener(this);
8.46 - snm = (SpinnerNumberModel) jSpinnerHours.getModel();
8.47 - snm.setMinimum(new Integer(0));
8.48 - snm.setMaximum(new Integer(23));
8.49 - snm.addChangeListener(this);
8.50 - snm = (SpinnerNumberModel) jSpinnerMinutes.getModel();
8.51 - snm.setMinimum(new Integer(0));
8.52 - snm.setMaximum(new Integer(59));
8.53 - snm.addChangeListener(this);
8.54 -
8.55 - ((JSpinner.NumberEditor) jSpinnerDays.getEditor()).getTextField().setColumns(2);
8.56 - ((JSpinner.NumberEditor) jSpinnerHours.getEditor()).getTextField().setColumns(2);
8.57 - ((JSpinner.NumberEditor) jSpinnerMinutes.getEditor()).getTextField().setColumns(2);
8.58 -
8.59 setOpaque(false);
8.60 - jPanelPlaceholder.setOpaque(false);
8.61 + jTextField.getDocument().addDocumentListener(new DocumentListener() {
8.62 + public void changedUpdate(DocumentEvent e) {
8.63 + stateChanged(null);
8.64 + }
8.65 + public void insertUpdate(DocumentEvent e) {
8.66 + stateChanged(null);
8.67 + }
8.68 + public void removeUpdate(DocumentEvent e) {
8.69 + stateChanged(null);
8.70 + }
8.71 + });
8.72 }
8.73
8.74 public void setEnabled(boolean b) {
8.75 super.setEnabled(b);
8.76 - jSpinnerDays.setEnabled(b);
8.77 - jSpinnerHours.setEnabled(b);
8.78 - jSpinnerMinutes.setEnabled(b);
8.79 - }
8.80 + jTextField.setEnabled(b);
8.81 + }
8.82
8.83 /**
8.84 * Sets new property editor.
8.85 @@ -90,13 +89,11 @@
8.86 * @param minutes new duration in minutes
8.87 */
8.88 public void setDuration(int minutes) {
8.89 - Duration d = new Duration(minutes,
8.90 - Settings.getDefault().getHoursPerDay(),
8.91 - Integer.MAX_VALUE);
8.92 + dur = new Duration(minutes,
8.93 + Settings.getDefault().getHoursPerDay(),
8.94 + Integer.MAX_VALUE);
8.95
8.96 - jSpinnerDays.setValue(new Integer(d.days));
8.97 - jSpinnerHours.setValue(new Integer(d.hours));
8.98 - jSpinnerMinutes.setValue(new Integer(d.minutes));
8.99 + jTextField.setText(short_.format(dur));
8.100 }
8.101
8.102 /**
8.103 @@ -105,14 +102,30 @@
8.104 * @return duration in minutes
8.105 */
8.106 public int getDuration() {
8.107 - int days = ((Integer) jSpinnerDays.getValue()).intValue();
8.108 - int hours = ((Integer) jSpinnerHours.getValue()).intValue();
8.109 - int minutes = ((Integer) jSpinnerMinutes.getValue()).intValue();
8.110 + Duration d = null;
8.111 + try {
8.112 + d = short_.parse(jTextField.getText());
8.113 + } catch (ParseException ex) {
8.114 + // ignore
8.115 + }
8.116 + if (d == null) {
8.117 + try {
8.118 + d = long_.parse(jTextField.getText());
8.119 + } catch (ParseException ex) {
8.120 + // ignore
8.121 + }
8.122 + }
8.123 + if (d == null)
8.124 + d = dur;
8.125 + if (d == null)
8.126 + return 0;
8.127
8.128 - return (days * Settings.getDefault().getHoursPerDay() + hours) * 60 +
8.129 - minutes;
8.130 + int hpd = Settings.getDefault().getHoursPerDay();
8.131 + int dpw = Settings.getDefault().getDaysPerWeek();
8.132 + return ((d.weeks * dpw + d.days) * hpd + d.hours) * 60 +
8.133 + d.minutes;
8.134 }
8.135 -
8.136 +
8.137 public void stateChanged(javax.swing.event.ChangeEvent e) {
8.138 if (pe != null) {
8.139 pe.setValue(new Integer(getDuration()));
8.140 @@ -124,82 +137,21 @@
8.141 * WARNING: Do NOT modify this code. The content of this method is
8.142 * always regenerated by the Form Editor.
8.143 */
8.144 - private void initComponents() {//GEN-BEGIN:initComponents
8.145 + // <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents
8.146 + private void initComponents() {
8.147 java.awt.GridBagConstraints gridBagConstraints;
8.148
8.149 - jLabel1 = new javax.swing.JLabel();
8.150 - jSpinnerDays = new javax.swing.JSpinner();
8.151 - jLabel2 = new javax.swing.JLabel();
8.152 - jSpinnerHours = new javax.swing.JSpinner();
8.153 - jLabel3 = new javax.swing.JLabel();
8.154 - jSpinnerMinutes = new javax.swing.JSpinner();
8.155 - jPanelPlaceholder = new javax.swing.JPanel();
8.156 + jTextField = new javax.swing.JTextField();
8.157
8.158 - setLayout(new java.awt.GridBagLayout());
8.159 + setLayout(new java.awt.BorderLayout());
8.160
8.161 - org.openide.awt.Mnemonics.setLocalizedText(jLabel1, org.openide.util.NbBundle.getMessage(DurationPanel.class, "Days")); // NOI18N);
8.162 - gridBagConstraints = new java.awt.GridBagConstraints();
8.163 - gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
8.164 - gridBagConstraints.insets = new java.awt.Insets(0, 0, 0, 12);
8.165 - add(jLabel1, gridBagConstraints);
8.166 -
8.167 - gridBagConstraints = new java.awt.GridBagConstraints();
8.168 - gridBagConstraints.gridx = 0;
8.169 - gridBagConstraints.gridy = 1;
8.170 - gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
8.171 - gridBagConstraints.insets = new java.awt.Insets(0, 0, 0, 12);
8.172 - add(jSpinnerDays, gridBagConstraints);
8.173 -
8.174 - org.openide.awt.Mnemonics.setLocalizedText(jLabel2, org.openide.util.NbBundle.getMessage(DurationPanel.class, "Hours")); // NOI18N);
8.175 - gridBagConstraints = new java.awt.GridBagConstraints();
8.176 - gridBagConstraints.gridx = 1;
8.177 - gridBagConstraints.gridy = 0;
8.178 - gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
8.179 - gridBagConstraints.insets = new java.awt.Insets(0, 0, 0, 12);
8.180 - add(jLabel2, gridBagConstraints);
8.181 -
8.182 - gridBagConstraints = new java.awt.GridBagConstraints();
8.183 - gridBagConstraints.gridx = 1;
8.184 - gridBagConstraints.gridy = 1;
8.185 - gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
8.186 - gridBagConstraints.insets = new java.awt.Insets(0, 0, 0, 12);
8.187 - add(jSpinnerHours, gridBagConstraints);
8.188 -
8.189 - org.openide.awt.Mnemonics.setLocalizedText(jLabel3, org.openide.util.NbBundle.getMessage(DurationPanel.class, "Minutes")); // NOI18N);
8.190 - gridBagConstraints = new java.awt.GridBagConstraints();
8.191 - gridBagConstraints.gridx = 2;
8.192 - gridBagConstraints.gridy = 0;
8.193 - gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
8.194 - gridBagConstraints.insets = new java.awt.Insets(0, 0, 0, 12);
8.195 - add(jLabel3, gridBagConstraints);
8.196 -
8.197 - gridBagConstraints = new java.awt.GridBagConstraints();
8.198 - gridBagConstraints.gridx = 2;
8.199 - gridBagConstraints.gridy = 1;
8.200 - gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
8.201 - gridBagConstraints.insets = new java.awt.Insets(0, 0, 0, 12);
8.202 - add(jSpinnerMinutes, gridBagConstraints);
8.203 -
8.204 - jPanelPlaceholder.setPreferredSize(new java.awt.Dimension(0, 0));
8.205 - gridBagConstraints = new java.awt.GridBagConstraints();
8.206 - gridBagConstraints.gridx = 3;
8.207 - gridBagConstraints.gridy = 2;
8.208 - gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
8.209 - gridBagConstraints.weightx = 1.0;
8.210 - gridBagConstraints.weighty = 1.0;
8.211 - add(jPanelPlaceholder, gridBagConstraints);
8.212 -
8.213 - }//GEN-END:initComponents
8.214 -
8.215 + jTextField.setColumns(10);
8.216 + add(jTextField, java.awt.BorderLayout.CENTER);
8.217 + }// </editor-fold>//GEN-END:initComponents
8.218 +
8.219
8.220 // Variables declaration - do not modify//GEN-BEGIN:variables
8.221 - private javax.swing.JLabel jLabel1;
8.222 - private javax.swing.JLabel jLabel2;
8.223 - private javax.swing.JLabel jLabel3;
8.224 - private javax.swing.JPanel jPanelPlaceholder;
8.225 - private javax.swing.JSpinner jSpinnerDays;
8.226 - private javax.swing.JSpinner jSpinnerHours;
8.227 - private javax.swing.JSpinner jSpinnerMinutes;
8.228 + private javax.swing.JTextField jTextField;
8.229 // End of variables declaration//GEN-END:variables
8.230
8.231 }
9.1 --- a/tasklist.usertasks/src/org/netbeans/modules/tasklist/usertasks/EditTaskPanel.form Wed Oct 04 17:03:04 2006 +0000
9.2 +++ b/tasklist.usertasks/src/org/netbeans/modules/tasklist/usertasks/EditTaskPanel.form Sat Oct 07 12:43:26 2006 +0000
9.3 @@ -18,6 +18,7 @@
9.4 </Properties>
9.5 <AuxValues>
9.6 <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="true"/>
9.7 + <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/>
9.8 <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
9.9 <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
9.10 <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
9.11 @@ -344,71 +345,15 @@
9.12
9.13 <Layout class="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout"/>
9.14 <SubComponents>
9.15 - <Component class="javax.swing.JCheckBox" name="dueCheckBox">
9.16 - <Properties>
9.17 - <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor" preCode="/*" postCode="*/">
9.18 - <ResourceString bundle="org/netbeans/modules/tasklist/usertasks/Bundle.properties" key="DueDateCb" replaceFormat="NbBundle.getMessage(EditTaskPanel.class, "{key}")); // NOI18N("/>
9.19 - </Property>
9.20 - </Properties>
9.21 - <Events>
9.22 - <EventHandler event="itemStateChanged" listener="java.awt.event.ItemListener" parameters="java.awt.event.ItemEvent" handler="dueCheckBoxItemStateChanged"/>
9.23 - </Events>
9.24 - <AuxValues>
9.25 - <AuxValue name="generateMnemonicsCode" type="java.lang.Boolean" value="true"/>
9.26 - </AuxValues>
9.27 - <Constraints>
9.28 - <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
9.29 - <GridBagConstraints gridX="0" gridY="1" 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"/>
9.30 - </Constraint>
9.31 - </Constraints>
9.32 - </Component>
9.33 <Container class="javax.swing.JPanel" name="jPanel1">
9.34 <Constraints>
9.35 <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
9.36 - <GridBagConstraints gridX="3" gridY="8" gridWidth="0" gridHeight="1" fill="1" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="17" weightX="1.0" weightY="1.0"/>
9.37 + <GridBagConstraints gridX="3" gridY="6" gridWidth="0" gridHeight="1" fill="1" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="17" weightX="1.0" weightY="1.0"/>
9.38 </Constraint>
9.39 </Constraints>
9.40
9.41 <Layout class="org.netbeans.modules.form.compat2.layouts.DesignFlowLayout"/>
9.42 </Container>
9.43 - <Component class="javax.swing.JLabel" name="jLabel6">
9.44 - <Properties>
9.45 - <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
9.46 - <ResourceString bundle="org/netbeans/modules/tasklist/usertasks/Bundle.properties" key="LastEditedLabel" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")); // NOI18N"/>
9.47 - </Property>
9.48 - </Properties>
9.49 - <Constraints>
9.50 - <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
9.51 - <GridBagConstraints gridX="0" gridY="5" 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"/>
9.52 - </Constraint>
9.53 - </Constraints>
9.54 - </Component>
9.55 - <Component class="javax.swing.JLabel" name="jLabel5">
9.56 - <Properties>
9.57 - <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
9.58 - <ResourceString bundle="org/netbeans/modules/tasklist/usertasks/Bundle.properties" key="CreatedLabel" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")); // NOI18N"/>
9.59 - </Property>
9.60 - </Properties>
9.61 - <Constraints>
9.62 - <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
9.63 - <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"/>
9.64 - </Constraint>
9.65 - </Constraints>
9.66 - </Component>
9.67 - <Component class="javax.swing.JLabel" name="jLabelLastEdited">
9.68 - <Constraints>
9.69 - <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
9.70 - <GridBagConstraints gridX="1" gridY="5" 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"/>
9.71 - </Constraint>
9.72 - </Constraints>
9.73 - </Component>
9.74 - <Component class="javax.swing.JLabel" name="jLabelCreated">
9.75 - <Constraints>
9.76 - <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
9.77 - <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"/>
9.78 - </Constraint>
9.79 - </Constraints>
9.80 - </Component>
9.81 <Container class="javax.swing.JPanel" name="jPanel4">
9.82 <Properties>
9.83 <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
9.84 @@ -470,7 +415,7 @@
9.85 <Container class="javax.swing.JPanel" name="jPanelEffort">
9.86 <Constraints>
9.87 <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
9.88 - <GridBagConstraints gridX="1" gridY="1" gridWidth="1" gridHeight="2" fill="1" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="17" weightX="1.0" weightY="0.0"/>
9.89 + <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"/>
9.90 </Constraint>
9.91 </Constraints>
9.92
9.93 @@ -502,9 +447,6 @@
9.94 <Property name="inputVerifier" type="javax.swing.InputVerifier" editor="org.netbeans.modules.form.RADConnectionPropertyEditor">
9.95 <Connection code="new PercentsInputVerifier()" type="code"/>
9.96 </Property>
9.97 - <Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
9.98 - <Dimension value="[60, 21]"/>
9.99 - </Property>
9.100 </Properties>
9.101 <Constraints>
9.102 <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
9.103 @@ -636,69 +578,129 @@
9.104 </Component>
9.105 </SubComponents>
9.106 </Container>
9.107 - <Component class="javax.swing.JLabel" name="jLabel2">
9.108 - <Properties>
9.109 - <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
9.110 - <ResourceString bundle="org/netbeans/modules/tasklist/usertasks/Bundle.properties" key="Completed" replaceFormat="org.openide.util.NbBundle.getBundle({sourceFileName}.class).getString("{key}")"/>
9.111 - </Property>
9.112 - </Properties>
9.113 - <AuxValues>
9.114 - <AuxValue name="generateMnemonicsCode" type="java.lang.Boolean" value="true"/>
9.115 - </AuxValues>
9.116 + <Container class="javax.swing.JPanel" name="jPanel9">
9.117 <Constraints>
9.118 <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
9.119 - <GridBagConstraints gridX="0" gridY="7" 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"/>
9.120 + <GridBagConstraints gridX="0" gridY="0" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="18" weightX="0.0" weightY="0.0"/>
9.121 </Constraint>
9.122 </Constraints>
9.123 - </Component>
9.124 - <Component class="javax.swing.JLabel" name="jLabelCompleted">
9.125 - <AuxValues>
9.126 - <AuxValue name="generateMnemonicsCode" type="java.lang.Boolean" value="true"/>
9.127 - </AuxValues>
9.128 +
9.129 + <Layout class="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout"/>
9.130 + <SubComponents>
9.131 + <Component class="com.toedter.calendar.JDateChooser" name="jDateChooserDue">
9.132 + <Constraints>
9.133 + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
9.134 + <GridBagConstraints gridX="1" gridY="1" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="11" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="17" weightX="0.0" weightY="0.0"/>
9.135 + </Constraint>
9.136 + </Constraints>
9.137 + </Component>
9.138 + <Component class="com.toedter.calendar.JDateChooser" name="jDateChooserStart">
9.139 + <Constraints>
9.140 + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
9.141 + <GridBagConstraints gridX="1" gridY="0" 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"/>
9.142 + </Constraint>
9.143 + </Constraints>
9.144 + </Component>
9.145 + <Component class="javax.swing.JLabel" name="jLabel4">
9.146 + <Properties>
9.147 + <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
9.148 + <ResourceString bundle="org/netbeans/modules/tasklist/usertasks/Bundle.properties" key="DueDateCb" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
9.149 + </Property>
9.150 + </Properties>
9.151 + <Constraints>
9.152 + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
9.153 + <GridBagConstraints gridX="0" gridY="1" 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"/>
9.154 + </Constraint>
9.155 + </Constraints>
9.156 + </Component>
9.157 + <Component class="javax.swing.JLabel" name="jLabel7">
9.158 + <Properties>
9.159 + <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
9.160 + <ResourceString bundle="org/netbeans/modules/tasklist/usertasks/Bundle.properties" key="LBL_Start" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
9.161 + </Property>
9.162 + </Properties>
9.163 + <Constraints>
9.164 + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
9.165 + <GridBagConstraints gridX="0" gridY="0" 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"/>
9.166 + </Constraint>
9.167 + </Constraints>
9.168 + </Component>
9.169 + </SubComponents>
9.170 + </Container>
9.171 + <Container class="javax.swing.JPanel" name="jPanel10">
9.172 <Constraints>
9.173 <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
9.174 - <GridBagConstraints gridX="1" gridY="7" 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"/>
9.175 + <GridBagConstraints gridX="0" gridY="5" gridWidth="3" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="18" weightX="0.0" weightY="0.0"/>
9.176 </Constraint>
9.177 </Constraints>
9.178 - </Component>
9.179 - <Component class="com.toedter.calendar.JDateChooser" name="jDateChooserDue">
9.180 - <Properties>
9.181 - <Property name="enabled" type="boolean" value="false"/>
9.182 - </Properties>
9.183 - <Constraints>
9.184 - <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
9.185 - <GridBagConstraints gridX="1" gridY="1" 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"/>
9.186 - </Constraint>
9.187 - </Constraints>
9.188 - </Component>
9.189 - <Component class="javax.swing.JCheckBox" name="jCheckBoxStart">
9.190 - <Properties>
9.191 - <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
9.192 - <ResourceString bundle="org/netbeans/modules/tasklist/usertasks/Bundle.properties" key="LBL_Start" replaceFormat="NbBundle.getMessage(EditTaskPanel.class, "{key}")); // NOI18N("/>
9.193 - </Property>
9.194 - </Properties>
9.195 - <Events>
9.196 - <EventHandler event="itemStateChanged" listener="java.awt.event.ItemListener" parameters="java.awt.event.ItemEvent" handler="jCheckBoxStartItemStateChanged"/>
9.197 - </Events>
9.198 - <AuxValues>
9.199 - <AuxValue name="generateMnemonicsCode" type="java.lang.Boolean" value="true"/>
9.200 - </AuxValues>
9.201 - <Constraints>
9.202 - <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
9.203 - <GridBagConstraints gridX="0" gridY="0" 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"/>
9.204 - </Constraint>
9.205 - </Constraints>
9.206 - </Component>
9.207 - <Component class="com.toedter.calendar.JDateChooser" name="jDateChooserStart">
9.208 - <Properties>
9.209 - <Property name="enabled" type="boolean" value="false"/>
9.210 - </Properties>
9.211 - <Constraints>
9.212 - <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
9.213 - <GridBagConstraints gridX="1" gridY="0" 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"/>
9.214 - </Constraint>
9.215 - </Constraints>
9.216 - </Component>
9.217 +
9.218 + <Layout class="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout"/>
9.219 + <SubComponents>
9.220 + <Component class="javax.swing.JLabel" name="jLabelCreated">
9.221 + <Constraints>
9.222 + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
9.223 + <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"/>
9.224 + </Constraint>
9.225 + </Constraints>
9.226 + </Component>
9.227 + <Component class="javax.swing.JLabel" name="jLabel5">
9.228 + <Properties>
9.229 + <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
9.230 + <ResourceString bundle="org/netbeans/modules/tasklist/usertasks/Bundle.properties" key="CreatedLabel" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")); // NOI18N"/>
9.231 + </Property>
9.232 + </Properties>
9.233 + <Constraints>
9.234 + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
9.235 + <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"/>
9.236 + </Constraint>
9.237 + </Constraints>
9.238 + </Component>
9.239 + <Component class="javax.swing.JLabel" name="jLabelCompleted">
9.240 + <AuxValues>
9.241 + <AuxValue name="generateMnemonicsCode" type="java.lang.Boolean" value="true"/>
9.242 + </AuxValues>
9.243 + <Constraints>
9.244 + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
9.245 + <GridBagConstraints gridX="1" gridY="7" 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"/>
9.246 + </Constraint>
9.247 + </Constraints>
9.248 + </Component>
9.249 + <Component class="javax.swing.JLabel" name="jLabelLastEdited">
9.250 + <Constraints>
9.251 + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
9.252 + <GridBagConstraints gridX="1" gridY="5" 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"/>
9.253 + </Constraint>
9.254 + </Constraints>
9.255 + </Component>
9.256 + <Component class="javax.swing.JLabel" name="jLabel2">
9.257 + <Properties>
9.258 + <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
9.259 + <ResourceString bundle="org/netbeans/modules/tasklist/usertasks/Bundle.properties" key="Completed" replaceFormat="org.openide.util.NbBundle.getBundle({sourceFileName}.class).getString("{key}")"/>
9.260 + </Property>
9.261 + </Properties>
9.262 + <AuxValues>
9.263 + <AuxValue name="generateMnemonicsCode" type="java.lang.Boolean" value="true"/>
9.264 + </AuxValues>
9.265 + <Constraints>
9.266 + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
9.267 + <GridBagConstraints gridX="0" gridY="7" 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"/>
9.268 + </Constraint>
9.269 + </Constraints>
9.270 + </Component>
9.271 + <Component class="javax.swing.JLabel" name="jLabel6">
9.272 + <Properties>
9.273 + <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
9.274 + <ResourceString bundle="org/netbeans/modules/tasklist/usertasks/Bundle.properties" key="LastEditedLabel" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")); // NOI18N"/>
9.275 + </Property>
9.276 + </Properties>
9.277 + <Constraints>
9.278 + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
9.279 + <GridBagConstraints gridX="0" gridY="5" 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"/>
9.280 + </Constraint>
9.281 + </Constraints>
9.282 + </Component>
9.283 + </SubComponents>
9.284 + </Container>
9.285 </SubComponents>
9.286 </Container>
9.287 <Container class="javax.swing.JPanel" name="jPanelDependencies">
10.1 --- a/tasklist.usertasks/src/org/netbeans/modules/tasklist/usertasks/EditTaskPanel.java Wed Oct 04 17:03:04 2006 +0000
10.2 +++ b/tasklist.usertasks/src/org/netbeans/modules/tasklist/usertasks/EditTaskPanel.java Sat Oct 07 12:43:26 2006 +0000
10.3 @@ -172,9 +172,13 @@
10.4 jPanelDependencies.add(dp, BorderLayout.CENTER);
10.5
10.6 Dimension d = jDateChooserDue.getPreferredSize();
10.7 - d.width = 150;
10.8 + d.width = 120;
10.9 jDateChooserDue.setPreferredSize(d);
10.10 jDateChooserStart.setPreferredSize(d);
10.11 +
10.12 + d = jComboBoxProgress.getPreferredSize();
10.13 + d.width = 50;
10.14 + jComboBoxProgress.setPreferredSize(d);
10.15 }
10.16
10.17 public void addNotify() {
10.18 @@ -362,9 +366,8 @@
10.19 * @return due date
10.20 */
10.21 private Date getDueDate() {
10.22 - Date ret;
10.23 - if (dueCheckBox.isSelected()) {
10.24 - ret = jDateChooserDue.getDate();
10.25 + Date ret = jDateChooserDue.getDate();
10.26 + if (ret != null) {
10.27 Calendar c = Calendar.getInstance();
10.28 c.setTime(ret);
10.29 c.set(Calendar.HOUR_OF_DAY, 0);
10.30 @@ -372,8 +375,6 @@
10.31 c.set(Calendar.SECOND, 0);
10.32 c.set(Calendar.MILLISECOND, 0);
10.33 ret = c.getTime();
10.34 - } else {
10.35 - ret = null;
10.36 }
10.37 return ret;
10.38 }
10.39 @@ -385,7 +386,7 @@
10.40 */
10.41 private long getStart() {
10.42 long ret;
10.43 - if (jCheckBoxStart.isSelected()) {
10.44 + if (jDateChooserStart.getDate() != null) {
10.45 ret = jDateChooserStart.getDate().getTime();
10.46 Calendar c = Calendar.getInstance();
10.47 c.setTimeInMillis(ret);
10.48 @@ -416,15 +417,7 @@
10.49 * @param d the due date
10.50 */
10.51 private void setDueDate(Date d) {
10.52 - if (d != null) {
10.53 - jDateChooserDue.setDate(d);
10.54 - dueCheckBox.setSelected(true);
10.55 - enableDueChooser(true);
10.56 - } else {
10.57 - jDateChooserDue.setDate(new Date());
10.58 - dueCheckBox.setSelected(false);
10.59 - enableDueChooser(false);
10.60 - }
10.61 + jDateChooserDue.setDate(d);
10.62 }
10.63
10.64 /**
10.65 @@ -435,12 +428,8 @@
10.66 private void setStart(long d) {
10.67 if (d != -1) {
10.68 jDateChooserStart.setDate(new Date(d));
10.69 - jCheckBoxStart.setSelected(true);
10.70 - enableStartChooser(true);
10.71 } else {
10.72 - jDateChooserStart.setDate(new Date());
10.73 - jCheckBoxStart.setSelected(false);
10.74 - enableStartChooser(false);
10.75 + jDateChooserStart.setDate(null);
10.76 }
10.77 }
10.78
10.79 @@ -523,12 +512,7 @@
10.80 jLabel1 = new javax.swing.JLabel();
10.81 jComboBoxOwner = new javax.swing.JComboBox();
10.82 jPanel3 = new javax.swing.JPanel();
10.83 - dueCheckBox = new javax.swing.JCheckBox();
10.84 jPanel1 = new javax.swing.JPanel();
10.85 - jLabel6 = new javax.swing.JLabel();
10.86 - jLabel5 = new javax.swing.JLabel();
10.87 - jLabelLastEdited = new javax.swing.JLabel();
10.88 - jLabelCreated = new javax.swing.JLabel();
10.89 jPanel4 = new javax.swing.JPanel();
10.90 jRadioButtonComputeEffort = new javax.swing.JRadioButton();
10.91 jRadioButtonEffort = new javax.swing.JRadioButton();
10.92 @@ -542,11 +526,18 @@
10.93 jRadioButtonComputeSpent = new javax.swing.JRadioButton();
10.94 jRadioButtonSpent = new javax.swing.JRadioButton();
10.95 durationPanelSpent = new org.netbeans.modules.tasklist.usertasks.DurationPanel();
10.96 + jPanel9 = new javax.swing.JPanel();
10.97 + jDateChooserDue = new com.toedter.calendar.JDateChooser();
10.98 + jDateChooserStart = new com.toedter.calendar.JDateChooser();
10.99 + jLabel4 = new javax.swing.JLabel();
10.100 + jLabel7 = new javax.swing.JLabel();
10.101 + jPanel10 = new javax.swing.JPanel();
10.102 + jLabelCreated = new javax.swing.JLabel();
10.103 + jLabel5 = new javax.swing.JLabel();
10.104 + jLabelCompleted = new javax.swing.JLabel();
10.105 + jLabelLastEdited = new javax.swing.JLabel();
10.106 jLabel2 = new javax.swing.JLabel();
10.107 - jLabelCompleted = new javax.swing.JLabel();
10.108 - jDateChooserDue = new com.toedter.calendar.JDateChooser();
10.109 - jCheckBoxStart = new javax.swing.JCheckBox();
10.110 - jDateChooserStart = new com.toedter.calendar.JDateChooser();
10.111 + jLabel6 = new javax.swing.JLabel();
10.112 jPanelDependencies = new javax.swing.JPanel();
10.113 jPanel8 = new javax.swing.JPanel();
10.114 jScrollPane1 = new javax.swing.JScrollPane();
10.115 @@ -554,15 +545,15 @@
10.116 jLabel3 = new javax.swing.JLabel();
10.117 jLabelSpentTimeToday = new javax.swing.JLabel();
10.118
10.119 + setPreferredSize(new java.awt.Dimension(400, 300));
10.120 setLayout(new java.awt.BorderLayout());
10.121
10.122 - setPreferredSize(new java.awt.Dimension(400, 300));
10.123 + jPanelGeneral.setBorder(javax.swing.BorderFactory.createEmptyBorder(11, 11, 12, 12));
10.124 jPanelGeneral.setLayout(new java.awt.GridBagLayout());
10.125
10.126 - jPanelGeneral.setBorder(new javax.swing.border.EmptyBorder(new java.awt.Insets(11, 11, 12, 12)));
10.127 descLabel.setLabelFor(descriptionTextField);
10.128 /*
10.129 - org.openide.awt.Mnemonics.setLocalizedText(descLabel, NbBundle.getMessage(EditTaskPanel.class, "Brief_Description")); // NOI18N);
10.130 + org.openide.awt.Mnemonics.setLocalizedText(descLabel, NbBundle.getMessage(EditTaskPanel.class, "Brief_Description")); // NOI18N); // NOI18N
10.131 */
10.132 gridBagConstraints = new java.awt.GridBagConstraints();
10.133 gridBagConstraints.gridx = 0;
10.134 @@ -591,7 +582,7 @@
10.135 gridBagConstraints.insets = new java.awt.Insets(11, 0, 0, 0);
10.136 jPanelGeneral.add(detailsScrollPane, gridBagConstraints);
10.137
10.138 - org.openide.awt.Mnemonics.setLocalizedText(addLabel, NbBundle.getMessage(EditTaskPanel.class, "AddTo")); // NOI18N();
10.139 + org.openide.awt.Mnemonics.setLocalizedText(addLabel, NbBundle.getMessage(EditTaskPanel.class, "AddTo")); // NOI18N(); // NOI18N
10.140 gridBagConstraints = new java.awt.GridBagConstraints();
10.141 gridBagConstraints.gridx = 0;
10.142 gridBagConstraints.gridy = 6;
10.143 @@ -601,7 +592,7 @@
10.144
10.145 addButtonGroup.add(beginningToggle);
10.146 /*
10.147 - org.openide.awt.Mnemonics.setLocalizedText(beginningToggle, NbBundle.getMessage(EditTaskPanel.class, "BeginningList")); // NOI18N();
10.148 + org.openide.awt.Mnemonics.setLocalizedText(beginningToggle, NbBundle.getMessage(EditTaskPanel.class, "BeginningList")); // NOI18N(); // NOI18N
10.149 */
10.150 gridBagConstraints = new java.awt.GridBagConstraints();
10.151 gridBagConstraints.gridx = 1;
10.152 @@ -612,7 +603,7 @@
10.153
10.154 detailsLabel.setLabelFor(detailsTextArea);
10.155 /*
10.156 - org.openide.awt.Mnemonics.setLocalizedText(detailsLabel, NbBundle.getMessage(EditTaskPanel.class, "DetailsLabel")); // NOI18N);
10.157 + org.openide.awt.Mnemonics.setLocalizedText(detailsLabel, NbBundle.getMessage(EditTaskPanel.class, "DetailsLabel")); // NOI18N); // NOI18N
10.158 */
10.159 gridBagConstraints = new java.awt.GridBagConstraints();
10.160 gridBagConstraints.gridx = 0;
10.161 @@ -623,7 +614,7 @@
10.162
10.163 addButtonGroup.add(endToggle);
10.164 /*
10.165 - org.openide.awt.Mnemonics.setLocalizedText(endToggle, NbBundle.getMessage(EditTaskPanel.class, "EndList")); // NOI18N();
10.166 + org.openide.awt.Mnemonics.setLocalizedText(endToggle, NbBundle.getMessage(EditTaskPanel.class, "EndList")); // NOI18N(); // NOI18N
10.167 */
10.168 gridBagConstraints = new java.awt.GridBagConstraints();
10.169 gridBagConstraints.gridx = 1;
10.170 @@ -631,7 +622,6 @@
10.171 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
10.172 gridBagConstraints.insets = new java.awt.Insets(0, 0, 0, 12);
10.173 jPanelGeneral.add(endToggle, gridBagConstraints);
10.174 -
10.175 gridBagConstraints = new java.awt.GridBagConstraints();
10.176 gridBagConstraints.gridx = 1;
10.177 gridBagConstraints.gridy = 0;
10.178 @@ -648,7 +638,6 @@
10.179 priorityComboBoxActionPerformed(evt);
10.180 }
10.181 });
10.182 -
10.183 gridBagConstraints = new java.awt.GridBagConstraints();
10.184 gridBagConstraints.gridx = 1;
10.185 gridBagConstraints.gridy = 2;
10.186 @@ -658,15 +647,14 @@
10.187 jPanelGeneral.add(priorityComboBox, gridBagConstraints);
10.188
10.189 /*
10.190 - org.openide.awt.Mnemonics.setLocalizedText(fileCheckBox, NbBundle.getMessage(EditTaskPanel.class, "AssociatedFile")); // NOI18N);
10.191 + org.openide.awt.Mnemonics.setLocalizedText(fileCheckBox, NbBundle.getMessage(EditTaskPanel.class, "AssociatedFile")); // NOI18N); // NOI18N
10.192 */
10.193 - fileCheckBox.setBorder(new javax.swing.border.EmptyBorder(new java.awt.Insets(0, 0, 0, 0)));
10.194 + fileCheckBox.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
10.195 fileCheckBox.addItemListener(new java.awt.event.ItemListener() {
10.196 public void itemStateChanged(java.awt.event.ItemEvent evt) {
10.197 fileCheckBoxItemStateChanged(evt);
10.198 }
10.199 });
10.200 -
10.201 gridBagConstraints = new java.awt.GridBagConstraints();
10.202 gridBagConstraints.gridx = 0;
10.203 gridBagConstraints.gridy = 5;
10.204 @@ -676,7 +664,7 @@
10.205
10.206 categoryLabel.setLabelFor(categoryCombo);
10.207 /*
10.208 - org.openide.awt.Mnemonics.setLocalizedText(categoryLabel, NbBundle.getMessage(EditTaskPanel.class, "CategoryLabel")); // NOI18N);
10.209 + org.openide.awt.Mnemonics.setLocalizedText(categoryLabel, NbBundle.getMessage(EditTaskPanel.class, "CategoryLabel")); // NOI18N); // NOI18N
10.210 */
10.211 gridBagConstraints = new java.awt.GridBagConstraints();
10.212 gridBagConstraints.gridx = 0;
10.213 @@ -709,7 +697,7 @@
10.214
10.215 lineLabel.setLabelFor(lineTextField);
10.216 /*
10.217 - org.openide.awt.Mnemonics.setLocalizedText(lineLabel, NbBundle.getMessage(EditTaskPanel.class, "LineLabel")); // NOI18N);
10.218 + org.openide.awt.Mnemonics.setLocalizedText(lineLabel, NbBundle.getMessage(EditTaskPanel.class, "LineLabel")); // NOI18N); // NOI18N
10.219 */
10.220 gridBagConstraints = new java.awt.GridBagConstraints();
10.221 gridBagConstraints.gridx = 2;
10.222 @@ -728,7 +716,7 @@
10.223 jPanelGeneral.add(jPanel2, gridBagConstraints);
10.224
10.225 /*
10.226 - org.openide.awt.Mnemonics.setLocalizedText(addSourceButton, NbBundle.getMessage(EditTaskPanel.class, "AddToSource")); // NOI18N();
10.227 + org.openide.awt.Mnemonics.setLocalizedText(addSourceButton, NbBundle.getMessage(EditTaskPanel.class, "AddToSource")); // NOI18N(); // NOI18N
10.228 */
10.229 gridBagConstraints = new java.awt.GridBagConstraints();
10.230 gridBagConstraints.gridx = 1;
10.231 @@ -742,7 +730,7 @@
10.232
10.233 prioLabel.setLabelFor(priorityComboBox);
10.234 /*
10.235 - org.openide.awt.Mnemonics.setLocalizedText(prioLabel, NbBundle.getMessage(EditTaskPanel.class, "PriorityLabel")); // NOI18N);
10.236 + org.openide.awt.Mnemonics.setLocalizedText(prioLabel, NbBundle.getMessage(EditTaskPanel.class, "PriorityLabel")); // NOI18N); // NOI18N
10.237 */
10.238 gridBagConstraints = new java.awt.GridBagConstraints();
10.239 gridBagConstraints.gridx = 0;
10.240 @@ -751,7 +739,7 @@
10.241 gridBagConstraints.insets = new java.awt.Insets(11, 0, 0, 12);
10.242 jPanelGeneral.add(prioLabel, gridBagConstraints);
10.243
10.244 - org.openide.awt.Mnemonics.setLocalizedText(jLabel1, org.openide.util.NbBundle.getBundle(EditTaskPanel.class).getString("OwnerLabel"));
10.245 + org.openide.awt.Mnemonics.setLocalizedText(jLabel1, org.openide.util.NbBundle.getBundle(EditTaskPanel.class).getString("OwnerLabel")); // NOI18N
10.246 gridBagConstraints = new java.awt.GridBagConstraints();
10.247 gridBagConstraints.gridx = 0;
10.248 gridBagConstraints.gridy = 4;
10.249 @@ -767,30 +755,13 @@
10.250 gridBagConstraints.insets = new java.awt.Insets(11, 0, 0, 0);
10.251 jPanelGeneral.add(jComboBoxOwner, gridBagConstraints);
10.252
10.253 - jTabbedPane.addTab(org.openide.util.NbBundle.getMessage(EditTaskPanel.class, "General"), jPanelGeneral);
10.254 + jTabbedPane.addTab(org.openide.util.NbBundle.getMessage(EditTaskPanel.class, "General"), jPanelGeneral); // NOI18N
10.255
10.256 + jPanel3.setBorder(javax.swing.BorderFactory.createEmptyBorder(11, 11, 12, 12));
10.257 jPanel3.setLayout(new java.awt.GridBagLayout());
10.258 -
10.259 - jPanel3.setBorder(new javax.swing.border.EmptyBorder(new java.awt.Insets(11, 11, 12, 12)));
10.260 - /*
10.261 - org.openide.awt.Mnemonics.setLocalizedText(dueCheckBox, NbBundle.getMessage(EditTaskPanel.class, "DueDateCb")); // NOI18N();
10.262 - */
10.263 - dueCheckBox.addItemListener(new java.awt.event.ItemListener() {
10.264 - public void itemStateChanged(java.awt.event.ItemEvent evt) {
10.265 - dueCheckBoxItemStateChanged(evt);
10.266 - }
10.267 - });
10.268 -
10.269 - gridBagConstraints = new java.awt.GridBagConstraints();
10.270 - gridBagConstraints.gridx = 0;
10.271 - gridBagConstraints.gridy = 1;
10.272 - gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
10.273 - gridBagConstraints.insets = new java.awt.Insets(11, 0, 0, 12);
10.274 - jPanel3.add(dueCheckBox, gridBagConstraints);
10.275 -
10.276 gridBagConstraints = new java.awt.GridBagConstraints();
10.277 gridBagConstraints.gridx = 3;
10.278 - gridBagConstraints.gridy = 8;
10.279 + gridBagConstraints.gridy = 6;
10.280 gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
10.281 gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
10.282 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
10.283 @@ -798,55 +769,24 @@
10.284 gridBagConstraints.weighty = 1.0;
10.285 jPanel3.add(jPanel1, gridBagConstraints);
10.286
10.287 - org.openide.awt.Mnemonics.setLocalizedText(jLabel6, org.openide.util.NbBundle.getMessage(EditTaskPanel.class, "LastEditedLabel")); // NOI18N);
10.288 - gridBagConstraints = new java.awt.GridBagConstraints();
10.289 - gridBagConstraints.gridx = 0;
10.290 - gridBagConstraints.gridy = 5;
10.291 - gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
10.292 - gridBagConstraints.insets = new java.awt.Insets(11, 0, 0, 12);
10.293 - jPanel3.add(jLabel6, gridBagConstraints);
10.294 -
10.295 - org.openide.awt.Mnemonics.setLocalizedText(jLabel5, org.openide.util.NbBundle.getMessage(EditTaskPanel.class, "CreatedLabel")); // NOI18N);
10.296 - gridBagConstraints = new java.awt.GridBagConstraints();
10.297 - gridBagConstraints.gridx = 0;
10.298 - gridBagConstraints.gridy = 6;
10.299 - gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
10.300 - gridBagConstraints.insets = new java.awt.Insets(11, 0, 0, 12);
10.301 - jPanel3.add(jLabel5, gridBagConstraints);
10.302 -
10.303 - gridBagConstraints = new java.awt.GridBagConstraints();
10.304 - gridBagConstraints.gridx = 1;
10.305 - gridBagConstraints.gridy = 5;
10.306 - gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
10.307 - gridBagConstraints.insets = new java.awt.Insets(11, 0, 0, 12);
10.308 - jPanel3.add(jLabelLastEdited, gridBagConstraints);
10.309 -
10.310 - gridBagConstraints = new java.awt.GridBagConstraints();
10.311 - gridBagConstraints.gridx = 1;
10.312 - gridBagConstraints.gridy = 6;
10.313 - gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
10.314 - gridBagConstraints.insets = new java.awt.Insets(11, 0, 0, 12);
10.315 - jPanel3.add(jLabelCreated, gridBagConstraints);
10.316 -
10.317 + jPanel4.setBorder(javax.swing.BorderFactory.createTitledBorder(org.openide.util.NbBundle.getMessage(EditTaskPanel.class, "Effort"))); // NOI18N
10.318 jPanel4.setLayout(new java.awt.GridBagLayout());
10.319
10.320 - jPanel4.setBorder(new javax.swing.border.TitledBorder(org.openide.util.NbBundle.getMessage(EditTaskPanel.class, "Effort")));
10.321 effortButtonGroup.add(jRadioButtonComputeEffort);
10.322 jRadioButtonComputeEffort.setSelected(true);
10.323 - org.openide.awt.Mnemonics.setLocalizedText(jRadioButtonComputeEffort, org.openide.util.NbBundle.getMessage(EditTaskPanel.class, "ComputeEffortAutomatically"));
10.324 + org.openide.awt.Mnemonics.setLocalizedText(jRadioButtonComputeEffort, org.openide.util.NbBundle.getMessage(EditTaskPanel.class, "ComputeEffortAutomatically")); // NOI18N
10.325 gridBagConstraints = new java.awt.GridBagConstraints();
10.326 gridBagConstraints.gridwidth = 2;
10.327 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
10.328 jPanel4.add(jRadioButtonComputeEffort, gridBagConstraints);
10.329
10.330 effortButtonGroup.add(jRadioButtonEffort);
10.331 - org.openide.awt.Mnemonics.setLocalizedText(jRadioButtonEffort, org.openide.util.NbBundle.getMessage(EditTaskPanel.class, "UseThisValue"));
10.332 + org.openide.awt.Mnemonics.setLocalizedText(jRadioButtonEffort, org.openide.util.NbBundle.getMessage(EditTaskPanel.class, "UseThisValue")); // NOI18N
10.333 jRadioButtonEffort.addItemListener(new java.awt.event.ItemListener() {
10.334 public void itemStateChanged(java.awt.event.ItemEvent evt) {
10.335 jRadioButtonEffortItemStateChanged(evt);
10.336 }
10.337 });
10.338 -
10.339 gridBagConstraints = new java.awt.GridBagConstraints();
10.340 gridBagConstraints.gridx = 0;
10.341 gridBagConstraints.gridy = 1;
10.342 @@ -855,12 +795,9 @@
10.343 jPanel4.add(jRadioButtonEffort, gridBagConstraints);
10.344
10.345 jPanelEffort.setLayout(new java.awt.BorderLayout());
10.346 -
10.347 gridBagConstraints = new java.awt.GridBagConstraints();
10.348 gridBagConstraints.gridx = 1;
10.349 gridBagConstraints.gridy = 1;
10.350 - gridBagConstraints.gridheight = 2;
10.351 - gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
10.352 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
10.353 gridBagConstraints.weightx = 1.0;
10.354 jPanel4.add(jPanelEffort, gridBagConstraints);
10.355 @@ -874,12 +811,11 @@
10.356 gridBagConstraints.insets = new java.awt.Insets(11, 0, 0, 12);
10.357 jPanel3.add(jPanel4, gridBagConstraints);
10.358
10.359 + jPanel5.setBorder(javax.swing.BorderFactory.createTitledBorder(org.openide.util.NbBundle.getMessage(EditTaskPanel.class, "Progress"))); // NOI18N
10.360 jPanel5.setLayout(new java.awt.GridBagLayout());
10.361
10.362 - jPanel5.setBorder(new javax.swing.border.TitledBorder(org.openide.util.NbBundle.getMessage(EditTaskPanel.class, "Progress")));
10.363 jComboBoxProgress.setEditable(true);
10.364 jComboBoxProgress.setInputVerifier(new PercentsInputVerifier());
10.365 - jComboBoxProgress.setMinimumSize(new java.awt.Dimension(60, 21));
10.366 gridBagConstraints = new java.awt.GridBagConstraints();
10.367 gridBagConstraints.gridx = 1;
10.368 gridBagConstraints.gridy = 1;
10.369 @@ -888,20 +824,19 @@
10.370
10.371 buttonGroupProgress.add(jRadioButtonComputeProgress);
10.372 jRadioButtonComputeProgress.setSelected(true);
10.373 - org.openide.awt.Mnemonics.setLocalizedText(jRadioButtonComputeProgress, org.openide.util.NbBundle.getMessage(EditTaskPanel.class, "ComputeProgressAutomatically"));
10.374 + org.openide.awt.Mnemonics.setLocalizedText(jRadioButtonComputeProgress, org.openide.util.NbBundle.getMessage(EditTaskPanel.class, "ComputeProgressAutomatically")); // NOI18N
10.375 gridBagConstraints = new java.awt.GridBagConstraints();
10.376 gridBagConstraints.gridwidth = 2;
10.377 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
10.378 jPanel5.add(jRadioButtonComputeProgress, gridBagConstraints);
10.379
10.380 buttonGroupProgress.add(jRadioButtonProgress);
10.381 - org.openide.awt.Mnemonics.setLocalizedText(jRadioButtonProgress, org.openide.util.NbBundle.getMessage(EditTaskPanel.class, "UseThisValue"));
10.382 + org.openide.awt.Mnemonics.setLocalizedText(jRadioButtonProgress, org.openide.util.NbBundle.getMessage(EditTaskPanel.class, "UseThisValue")); // NOI18N
10.383 jRadioButtonProgress.addItemListener(new java.awt.event.ItemListener() {
10.384 public void itemStateChanged(java.awt.event.ItemEvent evt) {
10.385 jRadioButtonProgressItemStateChanged(evt);
10.386 }
10.387 });
10.388 -
10.389 gridBagConstraints = new java.awt.GridBagConstraints();
10.390 gridBagConstraints.gridx = 0;
10.391 gridBagConstraints.gridy = 1;
10.392 @@ -927,25 +862,24 @@
10.393 gridBagConstraints.insets = new java.awt.Insets(11, 0, 0, 12);
10.394 jPanel3.add(jPanel5, gridBagConstraints);
10.395
10.396 + jPanel7.setBorder(javax.swing.BorderFactory.createTitledBorder("Spent time"));
10.397 jPanel7.setLayout(new java.awt.GridBagLayout());
10.398
10.399 - jPanel7.setBorder(new javax.swing.border.TitledBorder("Spent time"));
10.400 buttonGroupSpent.add(jRadioButtonComputeSpent);
10.401 jRadioButtonComputeSpent.setSelected(true);
10.402 - org.openide.awt.Mnemonics.setLocalizedText(jRadioButtonComputeSpent, org.openide.util.NbBundle.getMessage(EditTaskPanel.class, "ComputeSpentTkme"));
10.403 + org.openide.awt.Mnemonics.setLocalizedText(jRadioButtonComputeSpent, org.openide.util.NbBundle.getMessage(EditTaskPanel.class, "ComputeSpentTkme")); // NOI18N
10.404 gridBagConstraints = new java.awt.GridBagConstraints();
10.405 gridBagConstraints.gridwidth = 2;
10.406 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
10.407 jPanel7.add(jRadioButtonComputeSpent, gridBagConstraints);
10.408
10.409 buttonGroupSpent.add(jRadioButtonSpent);
10.410 - org.openide.awt.Mnemonics.setLocalizedText(jRadioButtonSpent, org.openide.util.NbBundle.getMessage(EditTaskPanel.class, "UseThisValue"));
10.411 + org.openide.awt.Mnemonics.setLocalizedText(jRadioButtonSpent, org.openide.util.NbBundle.getMessage(EditTaskPanel.class, "UseThisValue")); // NOI18N
10.412 jRadioButtonSpent.addItemListener(new java.awt.event.ItemListener() {
10.413 public void itemStateChanged(java.awt.event.ItemEvent evt) {
10.414 jRadioButtonSpentItemStateChanged(evt);
10.415 }
10.416 });
10.417 -
10.418 gridBagConstraints = new java.awt.GridBagConstraints();
10.419 gridBagConstraints.gridx = 0;
10.420 gridBagConstraints.gridy = 1;
10.421 @@ -969,54 +903,96 @@
10.422 gridBagConstraints.insets = new java.awt.Insets(11, 0, 0, 12);
10.423 jPanel3.add(jPanel7, gridBagConstraints);
10.424
10.425 - org.openide.awt.Mnemonics.setLocalizedText(jLabel2, org.openide.util.NbBundle.getBundle(EditTaskPanel.class).getString("Completed"));
10.426 + jPanel9.setLayout(new java.awt.GridBagLayout());
10.427 + gridBagConstraints = new java.awt.GridBagConstraints();
10.428 + gridBagConstraints.gridx = 1;
10.429 + gridBagConstraints.gridy = 1;
10.430 + gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
10.431 + gridBagConstraints.insets = new java.awt.Insets(11, 0, 0, 0);
10.432 + jPanel9.add(jDateChooserDue, gridBagConstraints);
10.433 + gridBagConstraints = new java.awt.GridBagConstraints();
10.434 + gridBagConstraints.gridx = 1;
10.435 + gridBagConstraints.gridy = 0;
10.436 + gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
10.437 + jPanel9.add(jDateChooserStart, gridBagConstraints);
10.438 +
10.439 + org.openide.awt.Mnemonics.setLocalizedText(jLabel4, org.openide.util.NbBundle.getMessage(EditTaskPanel.class, "DueDateCb")); // NOI18N
10.440 + gridBagConstraints = new java.awt.GridBagConstraints();
10.441 + gridBagConstraints.gridx = 0;
10.442 + gridBagConstraints.gridy = 1;
10.443 + gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
10.444 + gridBagConstraints.insets = new java.awt.Insets(11, 0, 0, 12);
10.445 + jPanel9.add(jLabel4, gridBagConstraints);
10.446 +
10.447 + org.openide.awt.Mnemonics.setLocalizedText(jLabel7, org.openide.util.NbBundle.getMessage(EditTaskPanel.class, "LBL_Start")); // NOI18N
10.448 + gridBagConstraints = new java.awt.GridBagConstraints();
10.449 + gridBagConstraints.gridx = 0;
10.450 + gridBagConstraints.gridy = 0;
10.451 + gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
10.452 + gridBagConstraints.insets = new java.awt.Insets(0, 0, 0, 12);
10.453 + jPanel9.add(jLabel7, gridBagConstraints);
10.454 +
10.455 + gridBagConstraints = new java.awt.GridBagConstraints();
10.456 + gridBagConstraints.gridx = 0;
10.457 + gridBagConstraints.gridy = 0;
10.458 + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
10.459 + jPanel3.add(jPanel9, gridBagConstraints);
10.460 +
10.461 + jPanel10.setLayout(new java.awt.GridBagLayout());
10.462 + gridBagConstraints = new java.awt.GridBagConstraints();
10.463 + gridBagConstraints.gridx = 1;
10.464 + gridBagConstraints.gridy = 6;
10.465 + gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
10.466 + gridBagConstraints.insets = new java.awt.Insets(11, 0, 0, 12);
10.467 + jPanel10.add(jLabelCreated, gridBagConstraints);
10.468 +
10.469 + org.openide.awt.Mnemonics.setLocalizedText(jLabel5, org.openide.util.NbBundle.getMessage(EditTaskPanel.class, "CreatedLabel")); // NOI18N); // NOI18N
10.470 + gridBagConstraints = new java.awt.GridBagConstraints();
10.471 + gridBagConstraints.gridx = 0;
10.472 + gridBagConstraints.gridy = 6;
10.473 + gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
10.474 + gridBagConstraints.insets = new java.awt.Insets(11, 0, 0, 12);
10.475 + jPanel10.add(jLabel5, gridBagConstraints);
10.476 + gridBagConstraints = new java.awt.GridBagConstraints();
10.477 + gridBagConstraints.gridx = 1;
10.478 + gridBagConstraints.gridy = 7;
10.479 + gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
10.480 + gridBagConstraints.insets = new java.awt.Insets(11, 0, 0, 12);
10.481 + jPanel10.add(jLabelCompleted, gridBagConstraints);
10.482 + gridBagConstraints = new java.awt.GridBagConstraints();
10.483 + gridBagConstraints.gridx = 1;
10.484 + gridBagConstraints.gridy = 5;
10.485 + gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
10.486 + gridBagConstraints.insets = new java.awt.Insets(11, 0, 0, 12);
10.487 + jPanel10.add(jLabelLastEdited, gridBagConstraints);
10.488 +
10.489 + org.openide.awt.Mnemonics.setLocalizedText(jLabel2, org.openide.util.NbBundle.getBundle(EditTaskPanel.class).getString("Completed")); // NOI18N
10.490 gridBagConstraints = new java.awt.GridBagConstraints();
10.491 gridBagConstraints.gridx = 0;
10.492 gridBagConstraints.gridy = 7;
10.493 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
10.494 gridBagConstraints.insets = new java.awt.Insets(11, 0, 0, 12);
10.495 - jPanel3.add(jLabel2, gridBagConstraints);
10.496 + jPanel10.add(jLabel2, gridBagConstraints);
10.497
10.498 + org.openide.awt.Mnemonics.setLocalizedText(jLabel6, org.openide.util.NbBundle.getMessage(EditTaskPanel.class, "LastEditedLabel")); // NOI18N); // NOI18N
10.499 gridBagConstraints = new java.awt.GridBagConstraints();
10.500 - gridBagConstraints.gridx = 1;
10.501 - gridBagConstraints.gridy = 7;
10.502 + gridBagConstraints.gridx = 0;
10.503 + gridBagConstraints.gridy = 5;
10.504 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
10.505 gridBagConstraints.insets = new java.awt.Insets(11, 0, 0, 12);
10.506 - jPanel3.add(jLabelCompleted, gridBagConstraints);
10.507 -
10.508 - jDateChooserDue.setEnabled(false);
10.509 - gridBagConstraints = new java.awt.GridBagConstraints();
10.510 - gridBagConstraints.gridx = 1;
10.511 - gridBagConstraints.gridy = 1;
10.512 - gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
10.513 - gridBagConstraints.insets = new java.awt.Insets(11, 0, 0, 12);
10.514 - jPanel3.add(jDateChooserDue, gridBagConstraints);
10.515 -
10.516 - org.openide.awt.Mnemonics.setLocalizedText(jCheckBoxStart, NbBundle.getMessage(EditTaskPanel.class, "LBL_Start")); // NOI18N();
10.517 - jCheckBoxStart.addItemListener(new java.awt.event.ItemListener() {
10.518 - public void itemStateChanged(java.awt.event.ItemEvent evt) {
10.519 - jCheckBoxStartItemStateChanged(evt);
10.520 - }
10.521 - });
10.522 + jPanel10.add(jLabel6, gridBagConstraints);
10.523
10.524 gridBagConstraints = new java.awt.GridBagConstraints();
10.525 gridBagConstraints.gridx = 0;
10.526 - gridBagConstraints.gridy = 0;
10.527 - gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
10.528 - jPanel3.add(jCheckBoxStart, gridBagConstraints);
10.529 + gridBagConstraints.gridy = 5;
10.530 + gridBagConstraints.gridwidth = 3;
10.531 + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
10.532 + jPanel3.add(jPanel10, gridBagConstraints);
10.533
10.534 - jDateChooserStart.setEnabled(false);
10.535 - gridBagConstraints = new java.awt.GridBagConstraints();
10.536 - gridBagConstraints.gridx = 1;
10.537 - gridBagConstraints.gridy = 0;
10.538 - gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
10.539 - jPanel3.add(jDateChooserStart, gridBagConstraints);
10.540 -
10.541 - jTabbedPane.addTab(org.openide.util.NbBundle.getMessage(EditTaskPanel.class, "TimeRelated"), jPanel3);
10.542 + jTabbedPane.addTab(org.openide.util.NbBundle.getMessage(EditTaskPanel.class, "TimeRelated"), jPanel3); // NOI18N
10.543
10.544 jPanelDependencies.setLayout(new java.awt.BorderLayout());
10.545 -
10.546 - jTabbedPane.addTab(org.openide.util.NbBundle.getBundle(EditTaskPanel.class).getString("LBL_DependenciesTab"), jPanelDependencies);
10.547 + jTabbedPane.addTab(org.openide.util.NbBundle.getBundle(EditTaskPanel.class).getString("LBL_DependenciesTab"), jPanelDependencies); // NOI18N
10.548
10.549 jPanel8.setLayout(new java.awt.GridBagLayout());
10.550
10.551 @@ -1030,7 +1006,7 @@
10.552 gridBagConstraints.insets = new java.awt.Insets(11, 11, 0, 12);
10.553 jPanel8.add(jScrollPane1, gridBagConstraints);
10.554
10.555 - jLabel3.setText(org.openide.util.NbBundle.getBundle(EditTaskPanel.class).getString("SpentTimeToday"));
10.556 + jLabel3.setText(org.openide.util.NbBundle.getBundle(EditTaskPanel.class).getString("SpentTimeToday")); // NOI18N
10.557 gridBagConstraints = new java.awt.GridBagConstraints();
10.558 gridBagConstraints.gridx = 0;
10.559 gridBagConstraints.gridy = 1;
10.560 @@ -1046,22 +1022,10 @@
10.561 gridBagConstraints.insets = new java.awt.Insets(11, 0, 12, 12);
10.562 jPanel8.add(jLabelSpentTimeToday, gridBagConstraints);
10.563
10.564 - jTabbedPane.addTab(org.openide.util.NbBundle.getBundle(EditTaskPanel.class).getString("WordPeriods"), jPanel8);
10.565 + jTabbedPane.addTab(org.openide.util.NbBundle.getBundle(EditTaskPanel.class).getString("WordPeriods"), jPanel8); // NOI18N
10.566
10.567 add(jTabbedPane, java.awt.BorderLayout.CENTER);
10.568 -
10.569 - }
10.570 - // </editor-fold>//GEN-END:initComponents
10.571 -
10.572 - private void jCheckBoxStartItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_jCheckBoxStartItemStateChanged
10.573 - if (evt.getID() == ItemEvent.ITEM_STATE_CHANGED) {
10.574 - boolean enable = false;
10.575 - if (evt.getStateChange() == ItemEvent.SELECTED) {
10.576 - enable = true;
10.577 - }
10.578 - enableStartChooser(enable);
10.579 - }
10.580 - }//GEN-LAST:event_jCheckBoxStartItemStateChanged
10.581 + }// </editor-fold>//GEN-END:initComponents
10.582
10.583 private void jRadioButtonSpentItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_jRadioButtonSpentItemStateChanged
10.584 durationPanelSpent.setEnabled(jRadioButtonSpent.isSelected());
10.585 @@ -1106,8 +1070,6 @@
10.586 EditTaskPanel.class, "CategoryLabel")); // NOI18N
10.587 Mnemonics.setLocalizedText(lineLabel, NbBundle.getMessage(
10.588 EditTaskPanel.class, "LineLabel")); // NOI18N
10.589 - Mnemonics.setLocalizedText(dueCheckBox, NbBundle.getMessage(
10.590 - EditTaskPanel.class, "DueDateCb")); // NOI18N
10.591 Mnemonics.setLocalizedText(addLabel, NbBundle.getMessage(
10.592 EditTaskPanel.class, "AddTo")); // NOI18N
10.593 Mnemonics.setLocalizedText(beginningToggle, NbBundle.getMessage(
10.594 @@ -1129,12 +1091,13 @@
10.595 NbBundle.getMessage(EditTaskPanel.class, "ACSD_Category")); // NOI18N
10.596 fileTextField.getAccessibleContext().setAccessibleDescription(
10.597 NbBundle.getMessage(EditTaskPanel.class, "ACSD_File")); // NOI18N
10.598 + jDateChooserDue.getAccessibleContext().setAccessibleDescription(
10.599 + NbBundle.getMessage(EditTaskPanel.class, "ACSD_DueCb")); // NOI18N
10.600
10.601 // We're using a checkbox to "label" the textfield - of course JCheckBox
10.602 // doesn't have a setLabelFor (since it is itself an input component)
10.603 // so we have to label the associated component ourselves
10.604 fileTextField.getAccessibleContext().setAccessibleName(fileCheckBox.getText());
10.605 - jDateChooserDue.getAccessibleContext().setAccessibleName(dueCheckBox.getText());
10.606
10.607 lineTextField.getAccessibleContext().setAccessibleDescription(
10.608 NbBundle.getMessage(EditTaskPanel.class, "ACSD_Line")); // NOI18N
10.609 @@ -1142,8 +1105,6 @@
10.610 NbBundle.getMessage(EditTaskPanel.class, "ACSD_Due")); // NOI18N
10.611 fileCheckBox.getAccessibleContext().setAccessibleDescription(
10.612 NbBundle.getMessage(EditTaskPanel.class, "ACSD_FileCb")); // NOI18N
10.613 - dueCheckBox.getAccessibleContext().setAccessibleDescription(
10.614 - NbBundle.getMessage(EditTaskPanel.class, "ACSD_DueCb")); // NOI18N
10.615 beginningToggle.getAccessibleContext().setAccessibleDescription(
10.616 NbBundle.getMessage(EditTaskPanel.class, "ACSD_Beginning")); // NOI18N
10.617 endToggle.getAccessibleContext().setAccessibleDescription(
10.618 @@ -1161,42 +1122,6 @@
10.619 lineTextField.setEditable(s);
10.620 }//GEN-LAST:event_fileCheckBoxItemStateChanged
10.621
10.622 - /**
10.623 - * Callback function to enable / disable the due-date fields
10.624 - * @param evt the callback event
10.625 - */
10.626 - private void dueCheckBoxItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_dueCheckBoxItemStateChanged
10.627 - if (evt.getID() == ItemEvent.ITEM_STATE_CHANGED) {
10.628 - boolean enable = false;
10.629 - if (evt.getStateChange() == ItemEvent.SELECTED) {
10.630 - enable = true;
10.631 - }
10.632 - enableDueChooser(enable);
10.633 - }
10.634 - }//GEN-LAST:event_dueCheckBoxItemStateChanged
10.635 -
10.636 - /**
10.637 - * Bugfix for JDateChooser.setEnabled
10.638 - *
10.639 - * @param enable true = enabled
10.640 - */
10.641 - private void enableDueChooser(boolean enable) {
10.642 - for (int i = 0; i < jDateChooserDue.getComponentCount(); i++) {
10.643 - jDateChooserDue.getComponent(i).setEnabled(enable);
10.644 - }
10.645 - }
10.646 -
10.647 - /**
10.648 - * Bugfix for JDateChooser.setEnabled
10.649 - *
10.650 - * @param enable true = enabled
10.651 - */
10.652 - private void enableStartChooser(boolean enable) {
10.653 - for (int i = 0; i < jDateChooserStart.getComponentCount(); i++) {
10.654 - jDateChooserStart.getComponent(i).setEnabled(enable);
10.655 - }
10.656 - }
10.657 -
10.658 // <editor-fold defaultstate="collapsed" desc=" Generated Code: Variables declarations ">
10.659 // Variables declaration - do not modify//GEN-BEGIN:variables
10.660 private javax.swing.ButtonGroup addButtonGroup;
10.661 @@ -1212,13 +1137,11 @@
10.662 private javax.swing.JLabel detailsLabel;
10.663 private javax.swing.JScrollPane detailsScrollPane;
10.664 private javax.swing.JTextArea detailsTextArea;
10.665 - private javax.swing.JCheckBox dueCheckBox;
10.666 private org.netbeans.modules.tasklist.usertasks.DurationPanel durationPanelSpent;
10.667 private javax.swing.ButtonGroup effortButtonGroup;
10.668 private javax.swing.JRadioButton endToggle;
10.669 private javax.swing.JCheckBox fileCheckBox;
10.670 private javax.swing.JTextField fileTextField;
10.671 - private javax.swing.JCheckBox jCheckBoxStart;
10.672 private javax.swing.JComboBox jComboBoxOwner;
10.673 private javax.swing.JComboBox jComboBoxProgress;
10.674 private com.toedter.calendar.JDateChooser jDateChooserDue;
10.675 @@ -1226,14 +1149,17 @@
10.676 private javax.swing.JLabel jLabel1;
10.677 private javax.swing.JLabel jLabel2;
10.678 private javax.swing.JLabel jLabel3;
10.679 + private javax.swing.JLabel jLabel4;
10.680 private javax.swing.JLabel jLabel5;
10.681 private javax.swing.JLabel jLabel6;
10.682 + private javax.swing.JLabel jLabel7;
10.683 private javax.swing.JLabel jLabelCompleted;
10.684 private javax.swing.JLabel jLabelCreated;
10.685 private javax.swing.JLabel jLabelLastEdited;
10.686 private javax.swing.JLabel jLabelSpentTimeToday;
10.687 private javax.swing.JList jListWorkPeriods;
10.688 private javax.swing.JPanel jPanel1;
10.689 + private javax.swing.JPanel jPanel10;
10.690 private javax.swing.JPanel jPanel2;
10.691 private javax.swing.JPanel jPanel3;
10.692 private javax.swing.JPanel jPanel4;
10.693 @@ -1241,6 +1167,7 @@
10.694 private javax.swing.JPanel jPanel6;
10.695 private javax.swing.JPanel jPanel7;
10.696 private javax.swing.JPanel jPanel8;
10.697 + private javax.swing.JPanel jPanel9;
10.698 private javax.swing.JPanel jPanelDependencies;
10.699 private javax.swing.JPanel jPanelEffort;
10.700 private javax.swing.JPanel jPanelGeneral;
11.1 --- a/tasklist.usertasks/src/org/netbeans/modules/tasklist/usertasks/editors/DateEditor.java Wed Oct 04 17:03:04 2006 +0000
11.2 +++ b/tasklist.usertasks/src/org/netbeans/modules/tasklist/usertasks/editors/DateEditor.java Sat Oct 07 12:43:26 2006 +0000
11.3 @@ -24,7 +24,6 @@
11.4
11.5 package org.netbeans.modules.tasklist.usertasks.editors;
11.6
11.7 -import java.text.MessageFormat;
11.8 import java.util.Date;
11.9 import java.text.ParseException;
11.10 import java.text.SimpleDateFormat;
11.11 @@ -32,7 +31,6 @@
11.12 import java.beans.FeatureDescriptor;
11.13 import java.beans.PropertyEditorSupport;
11.14 import org.netbeans.modules.tasklist.usertasks.DateSelectionPanel;
11.15 -import org.openide.ErrorManager;
11.16 import org.openide.explorer.propertysheet.ExPropertyEditor;
11.17 import org.openide.explorer.propertysheet.PropertyEnv;
11.18
12.1 --- a/tasklist.usertasks/src/org/netbeans/modules/tasklist/usertasks/editors/EffortTableCellEditor.java Wed Oct 04 17:03:04 2006 +0000
12.2 +++ b/tasklist.usertasks/src/org/netbeans/modules/tasklist/usertasks/editors/EffortTableCellEditor.java Sat Oct 07 12:43:26 2006 +0000
12.3 @@ -20,8 +20,8 @@
12.4 package org.netbeans.modules.tasklist.usertasks.editors;
12.5
12.6 import java.awt.Component;
12.7 +import java.text.ParseException;
12.8 import java.util.ArrayList;
12.9 -import java.util.Arrays;
12.10 import java.util.Collections;
12.11 import java.util.List;
12.12
12.13 @@ -67,6 +67,10 @@
12.14
12.15 private List<Integer> durations;
12.16 private List<String> texts;
12.17 + private DurationFormat short_ = new DurationFormat(
12.18 + DurationFormat.Type.SHORT);
12.19 + private DurationFormat long_ = new DurationFormat(DurationFormat.Type.LONG);
12.20 + private Duration dur;
12.21
12.22 /**
12.23 * Creates a new instance.
12.24 @@ -106,15 +110,42 @@
12.25 texts.add(df.format(new Duration(dur, hpd, dpw)));
12.26 }
12.27
12.28 + this.dur = new Duration(durations.get(index), hpd, dpw);
12.29 +
12.30 ((JComboBox) editorComponent).setModel(
12.31 new DefaultComboBoxModel(
12.32 texts.toArray(new String[texts.size()])));
12.33 ((JComboBox) editorComponent).setSelectedIndex(index);
12.34 + ((JComboBox) editorComponent).setEditable(true);
12.35 return editorComponent;
12.36 }
12.37
12.38 - public Object getCellEditorValue() {
12.39 + public Object getCellEditorValue() {
12.40 int index = ((JComboBox) editorComponent).getSelectedIndex();
12.41 - return durations.get(index);
12.42 + String txt =
12.43 + (String) ((JComboBox) editorComponent).getEditor().getItem();
12.44 + Duration d = null;
12.45 + try {
12.46 + d = short_.parse(txt);
12.47 + } catch (ParseException ex) {
12.48 + // ignore
12.49 + }
12.50 + if (d == null) {
12.51 + try {
12.52 + d = long_.parse(txt);
12.53 + } catch (ParseException ex) {
12.54 + // ignore
12.55 + }
12.56 + }
12.57 + if (d == null)
12.58 + d = dur;
12.59 + if (d == null)
12.60 + return durations.get(index);
12.61 + else {
12.62 + int hpd = Settings.getDefault().getHoursPerDay();
12.63 + int dpw = Settings.getDefault().getDaysPerWeek();
12.64 + return ((d.weeks * dpw + d.days) * hpd + d.hours) * 60 +
12.65 + d.minutes;
12.66 + }
12.67 }
12.68 }
13.1 --- a/tasklist.usertasks/src/org/netbeans/modules/tasklist/usertasks/model/Duration.java Wed Oct 04 17:03:04 2006 +0000
13.2 +++ b/tasklist.usertasks/src/org/netbeans/modules/tasklist/usertasks/model/Duration.java Sat Oct 07 12:43:26 2006 +0000
13.3 @@ -10,7 +10,21 @@
13.4 public int weeks, days, hours, minutes;
13.5
13.6 /**
13.7 - * Splits a duration value.
13.8 + * Constructor.
13.9 + *
13.10 + * @param minutes duration in minutes
13.11 + * @param hoursPerDay working hours per day
13.12 + * @param daysPerWeek working days per week
13.13 + */
13.14 + public Duration(int weeks, int days, int hours, int minutes) {
13.15 + this.weeks = weeks;
13.16 + this.days = days;
13.17 + this.hours = hours;
13.18 + this.minutes = minutes;
13.19 + }
13.20 +
13.21 + /**
13.22 + * Constructor.
13.23 *
13.24 * @param minutes duration in minutes
13.25 * @param hoursPerDay working hours per day
14.1 --- a/tasklist.usertasks/src/org/netbeans/modules/tasklist/usertasks/model/StartedUserTask.java Wed Oct 04 17:03:04 2006 +0000
14.2 +++ b/tasklist.usertasks/src/org/netbeans/modules/tasklist/usertasks/model/StartedUserTask.java Sat Oct 07 12:43:26 2006 +0000
14.3 @@ -210,8 +210,8 @@
14.4 if (task == null) {
14.5 throw new InternalError("no task is running"); // NOI18N
14.6 } else {
14.7 + task.setSpentTimeComputed(false);
14.8 started = task;
14.9 - started.setSpentTimeComputed(false);
14.10 startedAt = System.currentTimeMillis();
14.11 initialSpentTime = task.getSpentTime();
14.12 state = STATE_WORKING;
15.1 --- a/tasklist.usertasks/src/org/netbeans/modules/tasklist/usertasks/translators/ICalExportFormat.java Wed Oct 04 17:03:04 2006 +0000
15.2 +++ b/tasklist.usertasks/src/org/netbeans/modules/tasklist/usertasks/translators/ICalExportFormat.java Sat Oct 07 12:43:26 2006 +0000
15.3 @@ -52,6 +52,7 @@
15.4 import net.fortuna.ical4j.model.property.Completed;
15.5 import net.fortuna.ical4j.model.property.Created;
15.6 import net.fortuna.ical4j.model.property.Description;
15.7 +import net.fortuna.ical4j.model.property.DtStamp;
15.8 import net.fortuna.ical4j.model.property.DtStart;
15.9 import net.fortuna.ical4j.model.property.LastModified;
15.10 import net.fortuna.ical4j.model.property.PercentComplete;
15.11 @@ -340,6 +341,14 @@
15.12 ((Created) prop).setDate(dt);
15.13 prop.validate();
15.14
15.15 + // DTSTAMP
15.16 + prop = pl.getProperty(Property.DTSTAMP);
15.17 + if (prop == null) {
15.18 + prop = new DtStamp();
15.19 + pl.add(prop);
15.20 + }
15.21 + ((DtStamp) prop).setDate(dt);
15.22 +
15.23 prop = pl.getProperty(Property.DTSTART);
15.24 if (task.getStart() != -1) {
15.25 if (prop == null) {
16.1 --- a/tasklist.usertasks/src/org/netbeans/modules/tasklist/usertasks/treetable/TreeTable.java Wed Oct 04 17:03:04 2006 +0000
16.2 +++ b/tasklist.usertasks/src/org/netbeans/modules/tasklist/usertasks/treetable/TreeTable.java Sat Oct 07 12:43:26 2006 +0000
16.3 @@ -747,7 +747,7 @@
16.4 }
16.5
16.6 /*
16.7 - *TODO: remove. For profiling only.
16.8 + * For profiling only.
16.9 *
16.10 public void paint(Graphics g) {
16.11 super.paint(g);
17.1 --- a/tasklist.usertasks/src/org/netbeans/modules/tasklist/usertasks/util/Bundle.properties Wed Oct 04 17:03:04 2006 +0000
17.2 +++ b/tasklist.usertasks/src/org/netbeans/modules/tasklist/usertasks/util/Bundle.properties Sat Oct 07 12:43:26 2006 +0000
17.3 @@ -24,3 +24,5 @@
17.4 # languages:
17.5 # {0,choice,0#|0<{0}w}{1,choice,0#|0< {1}d} {2,number,00}:{3,number,00}
17.6 DurationShortFormat=
17.7 +DurationShortParseFormat=(?:(\\d+)w)?(?:\\s*)?(?:(\\d+)d)?(?:\\s*)?(?:(\\d(?:\\d)?):(\\d(?:\\d)?))?
17.8 +DurationParseFormat=(?:(\\d+) week(?:s)?)?(?:\\s*)?(?:(\\d+) day(?:s)?)?(?:\\s*)?(?:(\\d+) hour(?:s)?)?(?:\\s*)?(?:(\\d+) minute(?:s)?)?
18.1 --- a/tasklist.usertasks/src/org/netbeans/modules/tasklist/usertasks/util/DurationFormat.java Wed Oct 04 17:03:04 2006 +0000
18.2 +++ b/tasklist.usertasks/src/org/netbeans/modules/tasklist/usertasks/util/DurationFormat.java Sat Oct 07 12:43:26 2006 +0000
18.3 @@ -20,6 +20,9 @@
18.4 package org.netbeans.modules.tasklist.usertasks.util;
18.5
18.6 import java.text.MessageFormat;
18.7 +import java.text.ParseException;
18.8 +import java.util.regex.Matcher;
18.9 +import java.util.regex.Pattern;
18.10 import org.netbeans.modules.tasklist.usertasks.model.Duration;
18.11 import org.openide.util.NbBundle;
18.12
18.13 @@ -37,6 +40,7 @@
18.14 public enum Type {SHORT, LONG};
18.15
18.16 private MessageFormat format;
18.17 + private Pattern parsePattern;
18.18 private Type type;
18.19
18.20 /**
18.21 @@ -47,17 +51,62 @@
18.22 public DurationFormat(Type type) {
18.23 this.type = type;
18.24 String s;
18.25 - if (type == Type.LONG)
18.26 + if (type == Type.LONG) {
18.27 s = NbBundle.getMessage(DurationFormat.class,
18.28 "DurationFormat"); // NOI18N
18.29 - else
18.30 + parsePattern = Pattern.compile(
18.31 + NbBundle.getMessage(DurationFormat.class,
18.32 + "DurationParseFormat")); // NOI18N;
18.33 + } else {
18.34 s = NbBundle.getMessage(DurationFormat.class,
18.35 "DurationShortFormat"); // NOI18N
18.36 - if (s.length() != 0)
18.37 + String pp = NbBundle.getMessage(DurationFormat.class,
18.38 + "DurationShortParseFormat"); // NOI18N
18.39 + parsePattern = Pattern.compile(pp); // NOI18N;
18.40 + }
18.41 +
18.42 + if (s.trim().length() != 0)
18.43 format = new MessageFormat(s);
18.44 }
18.45
18.46 /**
18.47 + * Parses duration.
18.48 + * The method may not use the entire text of the given string.
18.49 + *
18.50 + * @param source A <code>String</code> whose beginning should be parsed.
18.51 + * @return parsed duration
18.52 + * @exception ParseException if the beginning of the specified string
18.53 + * cannot be parsed.
18.54 + */
18.55 + public Duration parse(String source) throws ParseException {
18.56 + Matcher matcher = parsePattern.matcher(source);
18.57 + if (!matcher.matches())
18.58 + throw new ParseException(source, 0);
18.59 + if (matcher.groupCount() != 4) {
18.60 + // System.out.println("" + matcher.groupCount());
18.61 + throw new ParseException(source, 0);
18.62 + }
18.63 + try {
18.64 + //System.out.println(matcher.group(1) + " " +
18.65 + // matcher.group(2) + " " +
18.66 + // matcher.group(3) + " " +
18.67 + // matcher.group(4));
18.68 + String ws = matcher.group(1);
18.69 + String ds = matcher.group(2);
18.70 + String hs = matcher.group(3);
18.71 + String ms = matcher.group(4);
18.72 + int w = ws == null ? 0 : Integer.parseInt(ws);
18.73 + int d = ds == null ? 0 : Integer.parseInt(ds);
18.74 + int h = hs == null ? 0 : Integer.parseInt(hs);
18.75 + int m = ms == null ? 0 : Integer.parseInt(ms);
18.76 + // System.out.println(w + " " + d + " " + h + " " + m);
18.77 + return new Duration(w, d, h, m);
18.78 + } catch (NumberFormatException e) {
18.79 + throw new ParseException(source, 0); // NOI18N
18.80 + }
18.81 + }
18.82 +
18.83 + /**
18.84 * Formats a duration.
18.85 *
18.86 * @param d the duration value
18.87 @@ -132,14 +181,18 @@
18.88 sb.append(' ').append(d.days).append("d");
18.89 break;
18.90 }
18.91 - sb.append(' ');
18.92 - if (d.hours < 10)
18.93 - sb.append('0');
18.94 - sb.append(d.hours);
18.95 - sb.append(':');
18.96 - if (d.minutes < 10)
18.97 - sb.append('0');
18.98 - sb.append(d.minutes);
18.99 +
18.100 + if (d.hours != 0 || d.minutes != 0) {
18.101 + sb.append(' ');
18.102 + if (d.hours < 10)
18.103 + sb.append('0');
18.104 + sb.append(d.hours);
18.105 + sb.append(':');
18.106 + if (d.minutes < 10)
18.107 + sb.append('0');
18.108 + sb.append(d.minutes);
18.109 + }
18.110 +
18.111 if (sb.length() > 0 && sb.charAt(0) == ' ')
18.112 sb.delete(0, 1);
18.113 return sb.toString();
19.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
19.2 +++ b/tasklist.usertasks/test/unit/src/org/netbeans/modules/tasklist/usertasks/util/DurationFormatTest.java Sat Oct 07 12:43:26 2006 +0000
19.3 @@ -0,0 +1,58 @@
19.4 +/*
19.5 + * The contents of this file are subject to the terms of the Common Development
19.6 + * and Distribution License (the License). You may not use this file except in
19.7 + * compliance with the License.
19.8 + *
19.9 + * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
19.10 + * or http://www.netbeans.org/cddl.txt.
19.11 + *
19.12 + * When distributing Covered Code, include this CDDL Header Notice in each file
19.13 + * and include the License file at http://www.netbeans.org/cddl.txt.
19.14 + * If applicable, add the following below the CDDL Header, with the fields
19.15 + * enclosed by brackets [] replaced by your own identifying information:
19.16 + * "Portions Copyrighted [year] [name of copyright owner]"
19.17 + *
19.18 + * The Original Software is NetBeans. The Initial Developer of the Original
19.19 + * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
19.20 + * Microsystems, Inc. All Rights Reserved.
19.21 + */
19.22 +
19.23 +package org.netbeans.modules.tasklist.usertasks.util;
19.24 +
19.25 +import junit.framework.TestCase;
19.26 +import junit.framework.*;
19.27 +import java.text.MessageFormat;
19.28 +import java.text.ParseException;
19.29 +import java.util.regex.Matcher;
19.30 +import java.util.regex.Pattern;
19.31 +import org.netbeans.modules.tasklist.usertasks.model.Duration;
19.32 +import org.openide.util.NbBundle;
19.33 +
19.34 +/**
19.35 + * Tests for DurationFormat.
19.36 + *
19.37 + * @author tl
19.38 + */
19.39 +public class DurationFormatTest extends TestCase {
19.40 + public DurationFormatTest(String testName) {
19.41 + super(testName);
19.42 + }
19.43 +
19.44 + /**
19.45 + * Test of parse method, of class
19.46 + * org.netbeans.modules.tasklist.usertasks.util.DurationFormat.
19.47 + */
19.48 + public void testParse() throws ParseException {
19.49 + DurationFormat instance = new DurationFormat(DurationFormat.Type.SHORT);
19.50 + assertEquals("01:00", instance.format(instance.parse("1:00")));
19.51 + assertEquals("1d 01:03", instance.format(instance.parse("1d 1:03")));
19.52 + assertEquals("1w 2d 21:03", instance.format(instance.parse("1w 2d 21:03")));
19.53 + assertEquals("3w 20:03", instance.format(instance.parse("3w 20:03")));
19.54 + assertEquals("1w", instance.format(instance.parse("1w")));
19.55 + instance = new DurationFormat(DurationFormat.Type.LONG);
19.56 + assertEquals("1 hour", instance.format(instance.parse("1 hour")));
19.57 + assertEquals("2 days", instance.format(instance.parse("2 days")));
19.58 + assertEquals("2 weeks 1 hour", instance.format(instance.parse("2 weeks 1 hour")));
19.59 + assertEquals("2 weeks 1 day 7 hours 4 minutes", instance.format(instance.parse("2 weeks 1 day 7 hours 4 minutes")));
19.60 + }
19.61 +}