Removed redundant codes

This commit is contained in:
huanghongxun
2015-12-12 13:01:18 +08:00
parent 8186482a11
commit 68a734adb0
17 changed files with 33 additions and 257 deletions

View File

@@ -13,7 +13,6 @@
</SyntheticProperties>
<Events>
<EventHandler event="windowClosed" listener="java.awt.event.WindowListener" parameters="java.awt.event.WindowEvent" handler="formWindowClosed"/>
<EventHandler event="windowClosing" listener="java.awt.event.WindowListener" parameters="java.awt.event.WindowEvent" handler="formWindowClosing"/>
</Events>
<AuxValues>
<AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/>

View File

@@ -121,9 +121,6 @@ public class TaskWindow extends javax.swing.JDialog
public void windowClosed(java.awt.event.WindowEvent evt) {
formWindowClosed(evt);
}
public void windowClosing(java.awt.event.WindowEvent evt) {
formWindowClosing(evt);
}
});
btnCancel.setText(bundle.getString("taskwindow.cancel")); // NOI18N
@@ -190,10 +187,6 @@ public class TaskWindow extends javax.swing.JDialog
taskList = null;
}//GEN-LAST:event_formWindowClosed
private void formWindowClosing(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_formWindowClosing
// TODO add your handling code here:
}//GEN-LAST:event_formWindowClosing
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JButton btnCancel;
private javax.swing.JTable lstDownload;
@@ -228,10 +221,11 @@ public class TaskWindow extends javax.swing.JDialog
@Override
public void onDoing(Task task) {
if (task == null) return;
task.setProgressProviderListener(this);
SwingUtilities.invokeLater(() -> {
if (taskList == null || task == null)
if (taskList == null)
return;
tasks.add(task);
progresses.add(0);