1.1 --- a/tasklist.usertasks/src/org/netbeans/modules/tasklist/usertasks/Bundle.properties Sat Jan 10 22:47:32 2004 +0000
1.2 +++ b/tasklist.usertasks/src/org/netbeans/modules/tasklist/usertasks/Bundle.properties Sat Jan 10 22:49:21 2004 +0000
1.3 @@ -177,3 +177,12 @@
1.4
1.5 #Summary for the root task of a task list
1.6 RootTaskSummary=Task List
1.7 +
1.8 +ProgressLabel=P&rogress\:
1.9 +
1.10 +ProgressComputed=Compute &automatically
1.11 +
1.12 +CreatedLabel=Created\:
1.13 +LastEditedLabel=Last Edited\:
1.14 +
1.15 +LBL_todo_paste_as_subtask=Paste tasks here
2.1 --- a/tasklist.usertasks/src/org/netbeans/modules/tasklist/usertasks/EditTaskPanel.form Sat Jan 10 22:47:32 2004 +0000
2.2 +++ b/tasklist.usertasks/src/org/netbeans/modules/tasklist/usertasks/EditTaskPanel.form Sat Jan 10 22:49:21 2004 +0000
2.3 @@ -103,7 +103,7 @@
2.4 </Events>
2.5 <Constraints>
2.6 <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
2.7 - <GridBagConstraints gridX="-1" gridY="-1" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="11" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="17" weightX="0.0" weightY="0.0"/>
2.8 + <GridBagConstraints gridX="-1" gridY="-1" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="11" insetsLeft="0" insetsBottom="0" insetsRight="12" anchor="17" weightX="0.0" weightY="0.0"/>
2.9 </Constraint>
2.10 </Constraints>
2.11 </Component>
2.12 @@ -114,7 +114,7 @@
2.13 </AuxValues>
2.14 <Constraints>
2.15 <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
2.16 - <GridBagConstraints gridX="-1" gridY="-1" gridWidth="0" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="11" insetsLeft="12" insetsBottom="0" insetsRight="0" anchor="17" weightX="0.0" weightY="0.0"/>
2.17 + <GridBagConstraints gridX="2" gridY="2" gridWidth="0" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="11" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="17" weightX="0.0" weightY="0.0"/>
2.18 </Constraint>
2.19 </Constraints>
2.20 </Component>
2.21 @@ -139,17 +139,41 @@
2.22 </Properties>
2.23 <Constraints>
2.24 <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
2.25 - <GridBagConstraints gridX="-1" gridY="-1" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="11" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="10" weightX="0.0" weightY="0.0"/>
2.26 + <GridBagConstraints gridX="-1" gridY="-1" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="11" insetsLeft="0" insetsBottom="0" insetsRight="12" anchor="10" weightX="0.0" weightY="0.0"/>
2.27 </Constraint>
2.28 </Constraints>
2.29 </Component>
2.30 <Component class="javax.swing.JLabel" name="opt2Label">
2.31 <Constraints>
2.32 <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
2.33 - <GridBagConstraints gridX="-1" gridY="-1" gridWidth="0" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="11" insetsLeft="12" insetsBottom="0" insetsRight="0" anchor="17" weightX="0.0" weightY="0.0"/>
2.34 + <GridBagConstraints gridX="2" gridY="3" gridWidth="0" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="11" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="17" weightX="0.0" weightY="0.0"/>
2.35 </Constraint>
2.36 </Constraints>
2.37 </Component>
2.38 + <Component class="javax.swing.JLabel" name="jLabelProgress">
2.39 + <Properties>
2.40 + <Property name="labelFor" type="java.awt.Component" editor="org.netbeans.modules.form.ComponentChooserEditor">
2.41 + <ComponentRef name="jCheckBoxComputeProgress"/>
2.42 + </Property>
2.43 + <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor" preCode="/*" postCode="*/">
2.44 + <ResourceString bundle="org/netbeans/modules/tasklist/usertasks/Bundle.properties" key="ProgressLabel" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")); // NOI18N"/>
2.45 + </Property>
2.46 + </Properties>
2.47 + <Constraints>
2.48 + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
2.49 + <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"/>
2.50 + </Constraint>
2.51 + </Constraints>
2.52 + </Component>
2.53 + <Container class="javax.swing.JPanel" name="jPanel1">
2.54 + <Constraints>
2.55 + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
2.56 + <GridBagConstraints gridX="3" gridY="4" gridWidth="0" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="11" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="17" weightX="1.0" weightY="0.0"/>
2.57 + </Constraint>
2.58 + </Constraints>
2.59 +
2.60 + <Layout class="org.netbeans.modules.form.compat2.layouts.DesignFlowLayout"/>
2.61 + </Container>
2.62 <Component class="javax.swing.JCheckBox" name="fileCheckBox">
2.63 <Properties>
2.64 <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor" preCode="/*" postCode="*/">
2.65 @@ -161,7 +185,7 @@
2.66 </Events>
2.67 <Constraints>
2.68 <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
2.69 - <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"/>
2.70 + <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"/>
2.71 </Constraint>
2.72 </Constraints>
2.73 </Component>
2.74 @@ -172,7 +196,7 @@
2.75 </Properties>
2.76 <Constraints>
2.77 <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
2.78 - <GridBagConstraints gridX="-1" gridY="-1" gridWidth="7" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="11" insetsLeft="0" insetsBottom="0" insetsRight="12" anchor="10" weightX="0.7" weightY="0.0"/>
2.79 + <GridBagConstraints gridX="1" gridY="6" gridWidth="2" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="11" insetsLeft="0" insetsBottom="0" insetsRight="12" anchor="10" weightX="0.7" weightY="0.0"/>
2.80 </Constraint>
2.81 </Constraints>
2.82 </Component>
2.83 @@ -187,7 +211,7 @@
2.84 </Properties>
2.85 <Constraints>
2.86 <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
2.87 - <GridBagConstraints gridX="-1" gridY="-1" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="11" insetsLeft="0" insetsBottom="0" insetsRight="12" anchor="13" weightX="0.0" weightY="0.0"/>
2.88 + <GridBagConstraints gridX="3" gridY="6" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="11" insetsLeft="0" insetsBottom="0" insetsRight="12" anchor="13" weightX="0.0" weightY="0.0"/>
2.89 </Constraint>
2.90 </Constraints>
2.91 </Component>
2.92 @@ -198,7 +222,7 @@
2.93 </Properties>
2.94 <Constraints>
2.95 <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
2.96 - <GridBagConstraints gridX="-1" gridY="-1" gridWidth="0" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="11" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="10" weightX="0.5" weightY="0.0"/>
2.97 + <GridBagConstraints gridX="4" gridY="6" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="11" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="10" weightX="0.3" weightY="0.0"/>
2.98 </Constraint>
2.99 </Constraints>
2.100 </Component>
2.101 @@ -213,18 +237,19 @@
2.102 </Events>
2.103 <Constraints>
2.104 <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
2.105 - <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"/>
2.106 + <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"/>
2.107 </Constraint>
2.108 </Constraints>
2.109 </Component>
2.110 <Component class="javax.swing.JTextField" name="dueDateTextField">
2.111 <Properties>
2.112 + <Property name="columns" type="int" value="14"/>
2.113 <Property name="editable" type="boolean" value="false"/>
2.114 <Property name="enabled" type="boolean" value="false"/>
2.115 </Properties>
2.116 <Constraints>
2.117 <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
2.118 - <GridBagConstraints gridX="-1" gridY="-1" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="11" insetsLeft="0" insetsBottom="0" insetsRight="12" anchor="10" weightX="0.0" weightY="0.0"/>
2.119 + <GridBagConstraints gridX="1" gridY="5" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="11" insetsLeft="0" insetsBottom="0" insetsRight="12" anchor="10" weightX="0.0" weightY="0.0"/>
2.120 </Constraint>
2.121 </Constraints>
2.122 </Component>
2.123 @@ -238,7 +263,7 @@
2.124 </Events>
2.125 <Constraints>
2.126 <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
2.127 - <GridBagConstraints gridX="-1" gridY="-1" gridWidth="0" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="11" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="17" weightX="0.0" weightY="0.0"/>
2.128 + <GridBagConstraints gridX="2" 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"/>
2.129 </Constraint>
2.130 </Constraints>
2.131 </Component>
2.132 @@ -250,7 +275,7 @@
2.133 </Properties>
2.134 <Constraints>
2.135 <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
2.136 - <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"/>
2.137 + <GridBagConstraints gridX="0" gridY="9" 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"/>
2.138 </Constraint>
2.139 </Constraints>
2.140 </Component>
2.141 @@ -265,7 +290,7 @@
2.142 </Properties>
2.143 <Constraints>
2.144 <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
2.145 - <GridBagConstraints gridX="-1" gridY="-1" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="11" insetsLeft="0" insetsBottom="0" insetsRight="12" anchor="10" weightX="0.0" weightY="0.0"/>
2.146 + <GridBagConstraints gridX="1" gridY="9" 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"/>
2.147 </Constraint>
2.148 </Constraints>
2.149 </Component>
2.150 @@ -280,7 +305,7 @@
2.151 </Properties>
2.152 <Constraints>
2.153 <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
2.154 - <GridBagConstraints gridX="-1" gridY="-1" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="11" insetsLeft="0" insetsBottom="0" insetsRight="12" anchor="10" weightX="0.0" weightY="0.0"/>
2.155 + <GridBagConstraints gridX="1" gridY="10" 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"/>
2.156 </Constraint>
2.157 </Constraints>
2.158 </Component>
2.159 @@ -292,7 +317,76 @@
2.160 </Properties>
2.161 <Constraints>
2.162 <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
2.163 - <GridBagConstraints gridX="-1" gridY="-1" gridWidth="0" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="12" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="13" weightX="1.0" weightY="0.0"/>
2.164 + <GridBagConstraints gridX="2" gridY="9" gridWidth="2" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="12" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="17" weightX="1.0" weightY="0.0"/>
2.165 + </Constraint>
2.166 + </Constraints>
2.167 + </Component>
2.168 + <Component class="javax.swing.JCheckBox" name="jCheckBoxComputeProgress">
2.169 + <Properties>
2.170 + <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor" preCode="/*" postCode="*/">
2.171 + <ResourceString bundle="org/netbeans/modules/tasklist/usertasks/Bundle.properties" key="ProgressComputed" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")); // NOI18N"/>
2.172 + </Property>
2.173 + </Properties>
2.174 + <Events>
2.175 + <EventHandler event="itemStateChanged" listener="java.awt.event.ItemListener" parameters="java.awt.event.ItemEvent" handler="jCheckBoxComputeProgressItemStateChanged"/>
2.176 + </Events>
2.177 + <Constraints>
2.178 + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
2.179 + <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"/>
2.180 + </Constraint>
2.181 + </Constraints>
2.182 + </Component>
2.183 + <Component class="javax.swing.JComboBox" name="jComboBoxProgress">
2.184 + <Properties>
2.185 + <Property name="editable" type="boolean" value="true"/>
2.186 + <Property name="inputVerifier" type="javax.swing.InputVerifier" editor="org.netbeans.modules.form.RADConnectionPropertyEditor">
2.187 + <Connection code="new PercentsInputVerifier()" type="code"/>
2.188 + </Property>
2.189 + <Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
2.190 + <Dimension value="[60, 21]"/>
2.191 + </Property>
2.192 + </Properties>
2.193 + <Constraints>
2.194 + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
2.195 + <GridBagConstraints gridX="2" 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"/>
2.196 + </Constraint>
2.197 + </Constraints>
2.198 + </Component>
2.199 + <Component class="javax.swing.JLabel" name="jLabel5">
2.200 + <Properties>
2.201 + <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
2.202 + <ResourceString bundle="org/netbeans/modules/tasklist/usertasks/Bundle.properties" key="CreatedLabel" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")); // NOI18N"/>
2.203 + </Property>
2.204 + </Properties>
2.205 + <Constraints>
2.206 + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
2.207 + <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"/>
2.208 + </Constraint>
2.209 + </Constraints>
2.210 + </Component>
2.211 + <Component class="javax.swing.JLabel" name="jLabel6">
2.212 + <Properties>
2.213 + <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
2.214 + <ResourceString bundle="org/netbeans/modules/tasklist/usertasks/Bundle.properties" key="LastEditedLabel" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")); // NOI18N"/>
2.215 + </Property>
2.216 + </Properties>
2.217 + <Constraints>
2.218 + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
2.219 + <GridBagConstraints gridX="0" gridY="8" 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"/>
2.220 + </Constraint>
2.221 + </Constraints>
2.222 + </Component>
2.223 + <Component class="javax.swing.JLabel" name="jLabelCreated">
2.224 + <Constraints>
2.225 + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
2.226 + <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"/>
2.227 + </Constraint>
2.228 + </Constraints>
2.229 + </Component>
2.230 + <Component class="javax.swing.JLabel" name="jLabelLastEdited">
2.231 + <Constraints>
2.232 + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
2.233 + <GridBagConstraints gridX="1" gridY="8" 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"/>
2.234 </Constraint>
2.235 </Constraints>
2.236 </Component>
3.1 --- a/tasklist.usertasks/src/org/netbeans/modules/tasklist/usertasks/EditTaskPanel.java Sat Jan 10 22:47:32 2004 +0000
3.2 +++ b/tasklist.usertasks/src/org/netbeans/modules/tasklist/usertasks/EditTaskPanel.java Sat Jan 10 22:49:21 2004 +0000
3.3 @@ -18,6 +18,7 @@
3.4 import java.awt.event.ActionEvent;
3.5 import java.awt.event.ActionListener;
3.6 import java.lang.reflect.Method;
3.7 +import java.text.DateFormat;
3.8 import java.text.ParseException;
3.9 import java.util.Date;
3.10 import java.text.SimpleDateFormat;
3.11 @@ -32,6 +33,10 @@
3.12 import javax.swing.JList;
3.13 import javax.swing.Icon;
3.14 import javax.swing.ImageIcon;
3.15 +import javax.swing.InputVerifier;
3.16 +import javax.swing.JComboBox;
3.17 +import javax.swing.JComponent;
3.18 +import javax.swing.text.JTextComponent;
3.19 import org.netbeans.modules.tasklist.core.PriorityListCellRenderer;
3.20 import org.netbeans.modules.tasklist.core.TLUtils;
3.21 import org.netbeans.modules.tasklist.core.Task;
3.22 @@ -59,6 +64,43 @@
3.23 LOGGER.setLevel(Level.OFF);
3.24 }
3.25
3.26 + private static String[] PERCENTS = {
3.27 + "0%", "5%", "10%", "15%", "20%", "25%", "30%", "35%", "40%", "45%", "50%", // NOI18N
3.28 + "55%", "60%", "65%", "70%", "75%", "80%", "85%", "90%", "95%", "100%" // NOI18N
3.29 + };
3.30 +
3.31 + /**
3.32 + * Parses values with % sign
3.33 + *
3.34 + * @param text text to parse
3.35 + * @return parsed value
3.36 + */
3.37 + private static int parsePercents(String text) throws NumberFormatException {
3.38 + text = text.trim();
3.39 + if (text.endsWith("%")) // NOI18N
3.40 + text = text.substring(0, text.length() - 1);
3.41 + int n = Integer.parseInt(text);
3.42 + if (n < 0 || n > 100)
3.43 + throw new NumberFormatException("Wrong range"); // NOI18N
3.44 + return n;
3.45 + }
3.46 +
3.47 + /**
3.48 + * InputVerifier for the combobox with percents
3.49 + */
3.50 + private static class PercentsInputVerifier extends InputVerifier {
3.51 + public boolean verify(javax.swing.JComponent input) {
3.52 + String p = ((JTextComponent) input).getText();
3.53 + try {
3.54 + parsePercents(p);
3.55 + return true;
3.56 + } catch (NumberFormatException e) {
3.57 + LOGGER.fine("wrong format");
3.58 + return false;
3.59 + }
3.60 + }
3.61 + }
3.62 +
3.63 private SimpleDateFormat format;
3.64 private ComboBoxModel prioritiesModel =
3.65 new DefaultComboBoxModel(Task.getPriorityNames());
3.66 @@ -96,6 +138,10 @@
3.67 beginningToggle.setSelected(true);
3.68 }
3.69 }
3.70 +
3.71 + jComboBoxProgress.setModel(new DefaultComboBoxModel(PERCENTS));
3.72 + ((JComponent) jComboBoxProgress.getEditor().getEditorComponent()).
3.73 + setInputVerifier(new EditTaskPanel.PercentsInputVerifier());
3.74 }
3.75
3.76 /**
3.77 @@ -131,6 +177,14 @@
3.78 LOGGER.fine("categories.size = " + categories.length); // NOI18N
3.79 }
3.80 categoryCombo.setSelectedItem(item.getCategory());
3.81 +
3.82 + jComboBoxProgress.setSelectedItem(item.getPercentComplete() + "%"); // NOI18N
3.83 + jCheckBoxComputeProgress.setSelected(item.isProgressComputed());
3.84 +
3.85 + DateFormat df = DateFormat.getDateTimeInstance(
3.86 + DateFormat.LONG, DateFormat.LONG);
3.87 + jLabelCreated.setText(df.format(new Date(item.getCreatedDate())));
3.88 + jLabelLastEdited.setText(df.format(new Date(item.getLastEditedDate())));
3.89 }
3.90
3.91 /**
3.92 @@ -159,6 +213,11 @@
3.93 }
3.94
3.95 task.setDueDate(getDueDate());
3.96 + task.setProgressComputed(jCheckBoxComputeProgress.isSelected());
3.97 + if (!jCheckBoxComputeProgress.isSelected()) {
3.98 + task.setPercentComplete(
3.99 + parsePercents((String) jComboBoxProgress.getSelectedItem()));
3.100 + }
3.101 }
3.102
3.103 /**
3.104 @@ -288,6 +347,8 @@
3.105 categoryLabel = new javax.swing.JLabel();
3.106 categoryCombo = new javax.swing.JComboBox();
3.107 opt2Label = new javax.swing.JLabel();
3.108 + jLabelProgress = new javax.swing.JLabel();
3.109 + jPanel1 = new javax.swing.JPanel();
3.110 fileCheckBox = new javax.swing.JCheckBox();
3.111 fileTextField = new javax.swing.JTextField();
3.112 lineLabel = new javax.swing.JLabel();
3.113 @@ -299,6 +360,12 @@
3.114 beginningToggle = new javax.swing.JRadioButton();
3.115 endToggle = new javax.swing.JRadioButton();
3.116 addSourceButton = new javax.swing.JButton();
3.117 + jCheckBoxComputeProgress = new javax.swing.JCheckBox();
3.118 + jComboBoxProgress = new javax.swing.JComboBox();
3.119 + jLabel5 = new javax.swing.JLabel();
3.120 + jLabel6 = new javax.swing.JLabel();
3.121 + jLabelCreated = new javax.swing.JLabel();
3.122 + jLabelLastEdited = new javax.swing.JLabel();
3.123
3.124 setLayout(new java.awt.GridBagLayout());
3.125
3.126 @@ -359,15 +426,17 @@
3.127 gridBagConstraints = new java.awt.GridBagConstraints();
3.128 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
3.129 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
3.130 - gridBagConstraints.insets = new java.awt.Insets(11, 0, 0, 0);
3.131 + gridBagConstraints.insets = new java.awt.Insets(11, 0, 0, 12);
3.132 add(priorityComboBox, gridBagConstraints);
3.133
3.134 /*
3.135 */
3.136 gridBagConstraints = new java.awt.GridBagConstraints();
3.137 + gridBagConstraints.gridx = 2;
3.138 + gridBagConstraints.gridy = 2;
3.139 gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
3.140 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
3.141 - gridBagConstraints.insets = new java.awt.Insets(11, 12, 0, 0);
3.142 + gridBagConstraints.insets = new java.awt.Insets(11, 0, 0, 0);
3.143 add(opt1Label, gridBagConstraints);
3.144
3.145 categoryLabel.setLabelFor(categoryCombo);
3.146 @@ -382,15 +451,37 @@
3.147 categoryCombo.setEditable(true);
3.148 gridBagConstraints = new java.awt.GridBagConstraints();
3.149 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
3.150 - gridBagConstraints.insets = new java.awt.Insets(11, 0, 0, 0);
3.151 + gridBagConstraints.insets = new java.awt.Insets(11, 0, 0, 12);
3.152 add(categoryCombo, gridBagConstraints);
3.153
3.154 gridBagConstraints = new java.awt.GridBagConstraints();
3.155 + gridBagConstraints.gridx = 2;
3.156 + gridBagConstraints.gridy = 3;
3.157 gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
3.158 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
3.159 - gridBagConstraints.insets = new java.awt.Insets(11, 12, 0, 0);
3.160 + gridBagConstraints.insets = new java.awt.Insets(11, 0, 0, 0);
3.161 add(opt2Label, gridBagConstraints);
3.162
3.163 + jLabelProgress.setLabelFor(jCheckBoxComputeProgress);
3.164 + /*
3.165 + jLabelProgress.setText(org.openide.util.NbBundle.getMessage(EditTaskPanel.class, "ProgressLabel")); // NOI18N);
3.166 + */
3.167 + gridBagConstraints = new java.awt.GridBagConstraints();
3.168 + gridBagConstraints.gridx = 0;
3.169 + gridBagConstraints.gridy = 4;
3.170 + gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
3.171 + gridBagConstraints.insets = new java.awt.Insets(11, 0, 0, 12);
3.172 + add(jLabelProgress, gridBagConstraints);
3.173 +
3.174 + gridBagConstraints = new java.awt.GridBagConstraints();
3.175 + gridBagConstraints.gridx = 3;
3.176 + gridBagConstraints.gridy = 4;
3.177 + gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
3.178 + gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
3.179 + gridBagConstraints.weightx = 1.0;
3.180 + gridBagConstraints.insets = new java.awt.Insets(11, 0, 0, 0);
3.181 + add(jPanel1, gridBagConstraints);
3.182 +
3.183 /*
3.184 fileCheckBox.setText(NbBundle.getMessage(EditTaskPanel.class, "AssociatedFile")); // NOI18N);
3.185 */
3.186 @@ -401,6 +492,8 @@
3.187 });
3.188
3.189 gridBagConstraints = new java.awt.GridBagConstraints();
3.190 + gridBagConstraints.gridx = 0;
3.191 + gridBagConstraints.gridy = 6;
3.192 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
3.193 gridBagConstraints.insets = new java.awt.Insets(11, 0, 0, 12);
3.194 add(fileCheckBox, gridBagConstraints);
3.195 @@ -408,7 +501,9 @@
3.196 fileTextField.setColumns(100);
3.197 fileTextField.setEditable(false);
3.198 gridBagConstraints = new java.awt.GridBagConstraints();
3.199 - gridBagConstraints.gridwidth = 7;
3.200 + gridBagConstraints.gridx = 1;
3.201 + gridBagConstraints.gridy = 6;
3.202 + gridBagConstraints.gridwidth = 2;
3.203 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
3.204 gridBagConstraints.weightx = 0.7;
3.205 gridBagConstraints.insets = new java.awt.Insets(11, 0, 0, 12);
3.206 @@ -419,6 +514,8 @@
3.207 lineLabel.setText(NbBundle.getMessage(EditTaskPanel.class, "LineLabel")); // NOI18N);
3.208 */
3.209 gridBagConstraints = new java.awt.GridBagConstraints();
3.210 + gridBagConstraints.gridx = 3;
3.211 + gridBagConstraints.gridy = 6;
3.212 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
3.213 gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
3.214 gridBagConstraints.insets = new java.awt.Insets(11, 0, 0, 12);
3.215 @@ -427,9 +524,10 @@
3.216 lineTextField.setEditable(false);
3.217 lineTextField.setHorizontalAlignment(javax.swing.JTextField.RIGHT);
3.218 gridBagConstraints = new java.awt.GridBagConstraints();
3.219 - gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
3.220 + gridBagConstraints.gridx = 4;
3.221 + gridBagConstraints.gridy = 6;
3.222 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
3.223 - gridBagConstraints.weightx = 0.5;
3.224 + gridBagConstraints.weightx = 0.3;
3.225 gridBagConstraints.insets = new java.awt.Insets(11, 0, 0, 0);
3.226 add(lineTextField, gridBagConstraints);
3.227
3.228 @@ -443,13 +541,18 @@
3.229 });
3.230
3.231 gridBagConstraints = new java.awt.GridBagConstraints();
3.232 + gridBagConstraints.gridx = 0;
3.233 + gridBagConstraints.gridy = 5;
3.234 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
3.235 gridBagConstraints.insets = new java.awt.Insets(11, 0, 0, 12);
3.236 add(dueCheckBox, gridBagConstraints);
3.237
3.238 + dueDateTextField.setColumns(14);
3.239 dueDateTextField.setEditable(false);
3.240 dueDateTextField.setEnabled(false);
3.241 gridBagConstraints = new java.awt.GridBagConstraints();
3.242 + gridBagConstraints.gridx = 1;
3.243 + gridBagConstraints.gridy = 5;
3.244 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
3.245 gridBagConstraints.insets = new java.awt.Insets(11, 0, 0, 12);
3.246 add(dueDateTextField, gridBagConstraints);
3.247 @@ -465,13 +568,16 @@
3.248 });
3.249
3.250 gridBagConstraints = new java.awt.GridBagConstraints();
3.251 - gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
3.252 + gridBagConstraints.gridx = 2;
3.253 + gridBagConstraints.gridy = 5;
3.254 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
3.255 - gridBagConstraints.insets = new java.awt.Insets(11, 0, 0, 0);
3.256 + gridBagConstraints.insets = new java.awt.Insets(11, 0, 0, 12);
3.257 add(dueDateBrowseButton, gridBagConstraints);
3.258
3.259 addLabel.setText(NbBundle.getMessage(EditTaskPanel.class, "AddTo")); // NOI18N();
3.260 gridBagConstraints = new java.awt.GridBagConstraints();
3.261 + gridBagConstraints.gridx = 0;
3.262 + gridBagConstraints.gridy = 9;
3.263 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
3.264 gridBagConstraints.insets = new java.awt.Insets(11, 0, 0, 12);
3.265 add(addLabel, gridBagConstraints);
3.266 @@ -481,6 +587,9 @@
3.267 */
3.268 addButtonGroup.add(beginningToggle);
3.269 gridBagConstraints = new java.awt.GridBagConstraints();
3.270 + gridBagConstraints.gridx = 1;
3.271 + gridBagConstraints.gridy = 9;
3.272 + gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
3.273 gridBagConstraints.insets = new java.awt.Insets(11, 0, 0, 12);
3.274 add(beginningToggle, gridBagConstraints);
3.275
3.276 @@ -489,21 +598,87 @@
3.277 */
3.278 addButtonGroup.add(endToggle);
3.279 gridBagConstraints = new java.awt.GridBagConstraints();
3.280 - gridBagConstraints.insets = new java.awt.Insets(11, 0, 0, 12);
3.281 + gridBagConstraints.gridx = 1;
3.282 + gridBagConstraints.gridy = 10;
3.283 + gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
3.284 + gridBagConstraints.insets = new java.awt.Insets(0, 0, 0, 12);
3.285 add(endToggle, gridBagConstraints);
3.286
3.287 /*
3.288 addSourceButton.setText(NbBundle.getMessage(EditTaskPanel.class, "AddToSource")); // NOI18N();
3.289 */
3.290 gridBagConstraints = new java.awt.GridBagConstraints();
3.291 - gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
3.292 - gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
3.293 + gridBagConstraints.gridx = 2;
3.294 + gridBagConstraints.gridy = 9;
3.295 + gridBagConstraints.gridwidth = 2;
3.296 + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
3.297 + gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
3.298 gridBagConstraints.weightx = 1.0;
3.299 gridBagConstraints.insets = new java.awt.Insets(12, 0, 0, 0);
3.300 add(addSourceButton, gridBagConstraints);
3.301
3.302 + /*
3.303 + jCheckBoxComputeProgress.setText(org.openide.util.NbBundle.getMessage(EditTaskPanel.class, "ProgressComputed")); // NOI18N);
3.304 + */
3.305 + jCheckBoxComputeProgress.addItemListener(new java.awt.event.ItemListener() {
3.306 + public void itemStateChanged(java.awt.event.ItemEvent evt) {
3.307 + jCheckBoxComputeProgressItemStateChanged(evt);
3.308 + }
3.309 + });
3.310 +
3.311 + gridBagConstraints = new java.awt.GridBagConstraints();
3.312 + gridBagConstraints.gridx = 1;
3.313 + gridBagConstraints.gridy = 4;
3.314 + gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
3.315 + gridBagConstraints.insets = new java.awt.Insets(11, 0, 0, 12);
3.316 + add(jCheckBoxComputeProgress, gridBagConstraints);
3.317 +
3.318 + jComboBoxProgress.setEditable(true);
3.319 + jComboBoxProgress.setInputVerifier(new PercentsInputVerifier());
3.320 + jComboBoxProgress.setMinimumSize(new java.awt.Dimension(60, 21));
3.321 + gridBagConstraints = new java.awt.GridBagConstraints();
3.322 + gridBagConstraints.gridx = 2;
3.323 + gridBagConstraints.gridy = 4;
3.324 + gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
3.325 + gridBagConstraints.insets = new java.awt.Insets(11, 0, 0, 12);
3.326 + add(jComboBoxProgress, gridBagConstraints);
3.327 +
3.328 + jLabel5.setText(org.openide.util.NbBundle.getMessage(EditTaskPanel.class, "CreatedLabel")); // NOI18N);
3.329 + gridBagConstraints = new java.awt.GridBagConstraints();
3.330 + gridBagConstraints.gridx = 0;
3.331 + gridBagConstraints.gridy = 7;
3.332 + gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
3.333 + gridBagConstraints.insets = new java.awt.Insets(11, 0, 0, 12);
3.334 + add(jLabel5, gridBagConstraints);
3.335 +
3.336 + jLabel6.setText(org.openide.util.NbBundle.getMessage(EditTaskPanel.class, "LastEditedLabel")); // NOI18N);
3.337 + gridBagConstraints = new java.awt.GridBagConstraints();
3.338 + gridBagConstraints.gridx = 0;
3.339 + gridBagConstraints.gridy = 8;
3.340 + gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
3.341 + gridBagConstraints.insets = new java.awt.Insets(11, 0, 0, 12);
3.342 + add(jLabel6, gridBagConstraints);
3.343 +
3.344 + gridBagConstraints = new java.awt.GridBagConstraints();
3.345 + gridBagConstraints.gridx = 1;
3.346 + gridBagConstraints.gridy = 7;
3.347 + gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
3.348 + gridBagConstraints.insets = new java.awt.Insets(11, 0, 0, 12);
3.349 + add(jLabelCreated, gridBagConstraints);
3.350 +
3.351 + gridBagConstraints = new java.awt.GridBagConstraints();
3.352 + gridBagConstraints.gridx = 1;
3.353 + gridBagConstraints.gridy = 8;
3.354 + gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
3.355 + gridBagConstraints.insets = new java.awt.Insets(11, 0, 0, 12);
3.356 + add(jLabelLastEdited, gridBagConstraints);
3.357 +
3.358 }//GEN-END:initComponents
3.359
3.360 + private void jCheckBoxComputeProgressItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_jCheckBoxComputeProgressItemStateChanged
3.361 + jComboBoxProgress.setEnabled(!jCheckBoxComputeProgress.isSelected());
3.362 + }//GEN-LAST:event_jCheckBoxComputeProgressItemStateChanged
3.363 +
3.364 private void priorityComboBoxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_priorityComboBoxActionPerformed
3.365 // I don't know why JComboBox does not use my renderer to draw
3.366 // selected value
3.367 @@ -533,6 +708,10 @@
3.368 EditTaskPanel.class, "AssociatedFile")); // NOI18N
3.369 Mnemonics.setLocalizedText(categoryLabel, NbBundle.getMessage(
3.370 EditTaskPanel.class, "CategoryLabel")); // NOI18N
3.371 + Mnemonics.setLocalizedText(jLabelProgress, NbBundle.getMessage(
3.372 + EditTaskPanel.class, "ProgressLabel")); // NOI18N
3.373 + Mnemonics.setLocalizedText(jCheckBoxComputeProgress, NbBundle.getMessage(
3.374 + EditTaskPanel.class, "ProgressComputed")); // NOI18N
3.375 Mnemonics.setLocalizedText(lineLabel, NbBundle.getMessage(
3.376 EditTaskPanel.class, "LineLabel")); // NOI18N
3.377 Mnemonics.setLocalizedText(dueCheckBox, NbBundle.getMessage(
3.378 @@ -654,6 +833,14 @@
3.379 private javax.swing.JRadioButton endToggle;
3.380 private javax.swing.JCheckBox fileCheckBox;
3.381 private javax.swing.JTextField fileTextField;
3.382 + private javax.swing.JCheckBox jCheckBoxComputeProgress;
3.383 + private javax.swing.JComboBox jComboBoxProgress;
3.384 + private javax.swing.JLabel jLabel5;
3.385 + private javax.swing.JLabel jLabel6;
3.386 + private javax.swing.JLabel jLabelCreated;
3.387 + private javax.swing.JLabel jLabelLastEdited;
3.388 + private javax.swing.JLabel jLabelProgress;
3.389 + private javax.swing.JPanel jPanel1;
3.390 private javax.swing.JLabel lineLabel;
3.391 private javax.swing.JTextField lineTextField;
3.392 private javax.swing.JLabel opt1Label;
4.1 --- a/tasklist.usertasks/src/org/netbeans/modules/tasklist/usertasks/UserTaskNode.java Sat Jan 10 22:47:32 2004 +0000
4.2 +++ b/tasklist.usertasks/src/org/netbeans/modules/tasklist/usertasks/UserTaskNode.java Sat Jan 10 22:49:21 2004 +0000
4.3 @@ -7,13 +7,17 @@
4.4 * http://www.sun.com/
4.5 *
4.6 * The Original Code is NetBeans. The Initial Developer of the Original
4.7 - * Code is Sun Microsystems, Inc. Portions Copyright 1997-2001 Sun
4.8 + * Code is Sun Microsystems, Inc. Portions Copyright 1997-2004 Sun
4.9 * Microsystems, Inc. All Rights Reserved.
4.10 */
4.11
4.12 package org.netbeans.modules.tasklist.usertasks;
4.13
4.14 +import java.awt.datatransfer.DataFlavor;
4.15 +import java.awt.datatransfer.Transferable;
4.16 +import java.awt.datatransfer.UnsupportedFlavorException;
4.17 import java.beans.PropertyEditorManager;
4.18 +import java.io.IOException;
4.19 import java.util.Date;
4.20 import java.util.List;
4.21 import javax.swing.Action;
4.22 @@ -24,7 +28,9 @@
4.23 import org.netbeans.modules.tasklist.core.filter.FilterAction;
4.24 import org.netbeans.modules.tasklist.core.GoToTaskAction;
4.25 import org.netbeans.modules.tasklist.core.ImportAction;
4.26 +import org.netbeans.modules.tasklist.core.Task;
4.27 import org.netbeans.modules.tasklist.core.TaskNode;
4.28 +import org.netbeans.modules.tasklist.core.TaskTransfer;
4.29 import org.netbeans.modules.tasklist.core.editors.LineNumberPropertyEditor;
4.30 import org.netbeans.modules.tasklist.core.editors.PriorityPropertyEditor;
4.31 import org.openide.ErrorManager;
4.32 @@ -39,8 +45,12 @@
4.33 import org.openide.nodes.PropertySupport;
4.34 import org.openide.nodes.PropertySupport.Reflection;
4.35 import org.openide.nodes.Sheet.Set;
4.36 +import org.openide.util.HelpCtx;
4.37 import org.openide.util.NbBundle;
4.38 import org.openide.util.actions.SystemAction;
4.39 +import org.openide.util.datatransfer.ExTransferable;
4.40 +import org.openide.util.datatransfer.MultiTransferObject;
4.41 +import org.openide.util.datatransfer.PasteType;
4.42
4.43
4.44 class UserTaskNode extends TaskNode {
4.45 @@ -153,8 +163,6 @@
4.46 }
4.47 }
4.48
4.49 - /** Creates properties.
4.50 - */
4.51 protected Sheet createSheet() {
4.52 Sheet s = Sheet.createDefault();
4.53 Set ss = s.get(Sheet.PROPERTIES);
4.54 @@ -198,9 +206,8 @@
4.55 UserTask task = (UserTask) instance;
4.56 PercentsPropertyEditor.Value v =
4.57 (PercentsPropertyEditor.Value) value;
4.58 - if (v.computed)
4.59 - task.setPercentComplete(-1);
4.60 - else
4.61 + task.setProgressComputed(v.computed);
4.62 + if (!v.computed)
4.63 task.setPercentComplete(v.progress);
4.64 }
4.65 };
4.66 @@ -297,5 +304,120 @@
4.67 public boolean canRename() {
4.68 return (item.getParent() != null);
4.69 }
4.70 +
4.71 + protected void createPasteTypes(java.awt.datatransfer.Transferable t, List s) {
4.72 + super.createPasteTypes(t, s);
4.73 + PasteType p = createTodoPasteType(t, (UserTask) item);
4.74 + if (p != null) {
4.75 + s.add(p);
4.76 + }
4.77 + }
4.78 +
4.79 + /**
4.80 + * Create a paste type from a transferable.
4.81 + *
4.82 + * @param t the transferable to check
4.83 + * @param parent parent for the pasted task
4.84 + * @return an appropriate paste type, or null if not appropriate
4.85 + */
4.86 + public static PasteType createTodoPasteType(
4.87 + Transferable t, UserTask parent) {
4.88 + if (t.isDataFlavorSupported(ExTransferable.multiFlavor)) {
4.89 + try {
4.90 + // Multiselection
4.91 + final MultiTransferObject mto = (MultiTransferObject)
4.92 + t.getTransferData(ExTransferable.multiFlavor);
4.93 + if (mto.areDataFlavorsSupported(
4.94 + new DataFlavor[] {TaskTransfer.TODO_FLAVOR})) {
4.95 + return new UserTaskNode.TodoPaste(t, parent);
4.96 + }
4.97 + } catch (UnsupportedFlavorException e) {
4.98 + ErrorManager.getDefault().notify(e);
4.99 + } catch (IOException e) {
4.100 + ErrorManager.getDefault().notify(e);
4.101 + }
4.102 + }
4.103 +
4.104 + if (t.isDataFlavorSupported(TaskTransfer.TODO_FLAVOR)) {
4.105 + return new TodoPaste(t, parent);
4.106 + }
4.107 + return null;
4.108 + }
4.109 +
4.110 + /**
4.111 + * Paste type for a pasted task
4.112 + */
4.113 + private static final class TodoPaste extends PasteType {
4.114 + private final Transferable t;
4.115 + private final UserTask parent;
4.116 +
4.117 + /**
4.118 + * Creates a paste type for a UserTask
4.119 + *
4.120 + * @param t a transferable object
4.121 + * @param parent parent task for the pasted task
4.122 + */
4.123 + public TodoPaste(Transferable t, UserTask parent) {
4.124 + this.t = t;
4.125 + this.parent = parent;
4.126 + }
4.127 +
4.128 + public String getName() {
4.129 + return NbBundle.getMessage(TaskTransfer.class,
4.130 + "LBL_todo_paste_as_subtask"); // NOI18N
4.131 + }
4.132 +
4.133 + public HelpCtx getHelpCtx() {
4.134 + return new HelpCtx("org.netbeans.modules.todo"); // NOI18N
4.135 + }
4.136 +
4.137 + public Transferable paste() throws IOException {
4.138 + try {
4.139 + if (t.isDataFlavorSupported(ExTransferable.multiFlavor)) {
4.140 + // Multiselection
4.141 + final MultiTransferObject mto = (MultiTransferObject)
4.142 + t.getTransferData(ExTransferable.multiFlavor);
4.143 + if (mto.areDataFlavorsSupported(
4.144 + new DataFlavor[] {TaskTransfer.TODO_FLAVOR})) {
4.145 + for (int i = 0; i < mto.getCount(); i++) {
4.146 + Task item = (Task)
4.147 + mto.getTransferData(i, TaskTransfer.TODO_FLAVOR);
4.148 + addTask(item);
4.149 + }
4.150 + return null;
4.151 + }
4.152 + }
4.153 +
4.154 + if (t.isDataFlavorSupported(TaskTransfer.TODO_FLAVOR)) {
4.155 + Task item = (Task)t.getTransferData(TaskTransfer.TODO_FLAVOR);
4.156 + addTask(item);
4.157 + }
4.158 + } catch (UnsupportedFlavorException ufe) {
4.159 + // Should not happen.
4.160 + IOException ioe = new IOException(ufe.toString());
4.161 + ErrorManager.getDefault().annotate(ioe, ufe);
4.162 + throw ioe;
4.163 + }
4.164 + return null;
4.165 + }
4.166 +
4.167 + /**
4.168 + * Adds a task
4.169 + *
4.170 + * @param item a task
4.171 + */
4.172 + private void addTask(Task item) {
4.173 + UserTask ut;
4.174 + if (item instanceof UserTask) {
4.175 + ut = (UserTask) item;
4.176 + } else {
4.177 + ut = new UserTask(item.getSummary());
4.178 + ut.setDetails(item.getDetails());
4.179 + ut.setLine(item.getLine());
4.180 + ut.setPriority(item.getPriority());
4.181 + }
4.182 + parent.addSubtask(ut);
4.183 + }
4.184 + }
4.185 }
4.186
5.1 --- a/tasklist.usertasks/src/org/netbeans/modules/tasklist/usertasks/UserTaskView.java Sat Jan 10 22:47:32 2004 +0000
5.2 +++ b/tasklist.usertasks/src/org/netbeans/modules/tasklist/usertasks/UserTaskView.java Sat Jan 10 22:49:21 2004 +0000
5.3 @@ -21,6 +21,9 @@
5.4 import java.util.ArrayList;
5.5 import java.util.Date;
5.6 import java.util.Iterator;
5.7 +import java.util.logging.Level;
5.8 +import java.util.logging.Logger;
5.9 +import javax.swing.JComponent;
5.10 import javax.swing.JTable;
5.11 import org.openide.text.Annotation;
5.12 import org.netbeans.modules.tasklist.client.SuggestionPriority;
5.13 @@ -36,6 +39,7 @@
5.14 import org.netbeans.modules.tasklist.core.TaskNode;
5.15 import org.netbeans.modules.tasklist.core.GoToTaskAction;
5.16 import org.netbeans.modules.tasklist.core.ObservableList;
5.17 +import org.netbeans.modules.tasklist.core.TLUtils;
5.18 import org.netbeans.modules.tasklist.core.filter.RemoveFilterAction;
5.19 import org.openide.actions.DeleteAction;
5.20 import org.openide.actions.PasteAction;
5.21 @@ -54,6 +58,11 @@
5.22 * @author Tor Norbye
5.23 */
5.24 public class UserTaskView extends TaskListView implements TaskListener {
5.25 + private static final Logger LOGGER = TLUtils.getLogger(UserTaskView.class);
5.26 +
5.27 + static {
5.28 + LOGGER.setLevel(Level.OFF);
5.29 + }
5.30
5.31 /** Construct a new UserTaskView. Most work is deferred to
5.32 componentOpened. NOTE: this is only for use by the window
5.33 @@ -197,16 +206,16 @@
5.34 }
5.35 }
5.36
5.37 - static final String PROP_TASK_DONE = "taskDone"; // NOI18N
5.38 - static final String PROP_TASK_DUE = "taskDue"; // NOI18N
5.39 - static final String PROP_TASK_PRIO = "taskPrio"; // NOI18N
5.40 - static final String PROP_TASK_CAT = "taskCat"; // NOI18N
5.41 - static final String PROP_TASK_FILE = "taskFile"; // NOI18N
5.42 - static final String PROP_TASK_LINE = "taskLine"; // NOI18N
5.43 - static final String PROP_TASK_DETAILS = "taskDetails"; // NOI18N
5.44 - static final String PROP_TASK_CREATED = "taskCreated"; // NOI18N
5.45 - static final String PROP_TASK_EDITED = "taskEdited"; // NOI18N
5.46 - static final String PROP_TASK_PERCENT = "taskPercent"; // NOI18N
5.47 + static final String PROP_TASK_DONE = "done"; // NOI18N
5.48 + static final String PROP_TASK_DUE = "dueDate"; // NOI18N
5.49 + static final String PROP_TASK_PRIO = "priority"; // NOI18N
5.50 + static final String PROP_TASK_CAT = "category"; // NOI18N
5.51 + static final String PROP_TASK_FILE = "filename"; // NOI18N
5.52 + static final String PROP_TASK_LINE = "line"; // NOI18N
5.53 + static final String PROP_TASK_DETAILS = "details"; // NOI18N
5.54 + static final String PROP_TASK_CREATED = "created"; // NOI18N
5.55 + static final String PROP_TASK_EDITED = "edited"; // NOI18N
5.56 + static final String PROP_TASK_PERCENT = "percentComplete"; // NOI18N
5.57
5.58 protected ColumnProperty[] createColumns() {
5.59 return new ColumnProperty[] {