SDK : properly shutdown poolExecutor in UserDataPicker and ParticleInfluencerPicker.
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9845 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
This commit is contained in:
parent
4ae24ffeee
commit
bc544adb40
@ -71,6 +71,7 @@ public class ParticleInfluencerPicker extends javax.swing.JDialog {
|
|||||||
|
|
||||||
JmeParticleEmitter jmePE;
|
JmeParticleEmitter jmePE;
|
||||||
ParticleInfluencerPropertyEditor editor;
|
ParticleInfluencerPropertyEditor editor;
|
||||||
|
ScheduledThreadPoolExecutor exec = new ScheduledThreadPoolExecutor(1);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates new form UserDataPicker
|
* Creates new form UserDataPicker
|
||||||
@ -82,7 +83,6 @@ public class ParticleInfluencerPicker extends javax.swing.JDialog {
|
|||||||
this.editor = editor;
|
this.editor = editor;
|
||||||
|
|
||||||
setLocationRelativeTo(null);
|
setLocationRelativeTo(null);
|
||||||
ScheduledThreadPoolExecutor exec = new ScheduledThreadPoolExecutor(1);
|
|
||||||
|
|
||||||
jList1.setEnabled(false);
|
jList1.setEnabled(false);
|
||||||
//loading savable list in a new Thread
|
//loading savable list in a new Thread
|
||||||
@ -103,6 +103,13 @@ public class ParticleInfluencerPicker extends javax.swing.JDialog {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setVisible(boolean b) {
|
||||||
|
super.setVisible(b);
|
||||||
|
exec.shutdown();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
private DefaultListModel getSources() {
|
private DefaultListModel getSources() {
|
||||||
final DefaultListModel model = new DefaultListModel();
|
final DefaultListModel model = new DefaultListModel();
|
||||||
model.addElement("com.jme3.effect.influencers.DefaultParticleInfluencer");
|
model.addElement("com.jme3.effect.influencers.DefaultParticleInfluencer");
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<?xml version="1.1" encoding="UTF-8" ?>
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
|
||||||
<Form version="1.5" maxVersion="1.7" type="org.netbeans.modules.form.forminfo.JDialogFormInfo">
|
<Form version="1.5" maxVersion="1.7" type="org.netbeans.modules.form.forminfo.JDialogFormInfo">
|
||||||
<Properties>
|
<Properties>
|
||||||
|
@ -74,6 +74,7 @@ public class UserDataPicker extends javax.swing.JDialog {
|
|||||||
|
|
||||||
UserDataDialog parentDialog;
|
UserDataDialog parentDialog;
|
||||||
JmeSpatial spat;
|
JmeSpatial spat;
|
||||||
|
ScheduledThreadPoolExecutor exec = new ScheduledThreadPoolExecutor(1);
|
||||||
|
|
||||||
/** Creates new form UserDataPicker */
|
/** Creates new form UserDataPicker */
|
||||||
public UserDataPicker(java.awt.Frame parent, boolean modal, UserDataDialog parentDialog, JmeSpatial spat) {
|
public UserDataPicker(java.awt.Frame parent, boolean modal, UserDataDialog parentDialog, JmeSpatial spat) {
|
||||||
@ -83,7 +84,7 @@ public class UserDataPicker extends javax.swing.JDialog {
|
|||||||
initComponents();
|
initComponents();
|
||||||
|
|
||||||
setLocationRelativeTo(null);
|
setLocationRelativeTo(null);
|
||||||
ScheduledThreadPoolExecutor exec = new ScheduledThreadPoolExecutor(1);
|
|
||||||
|
|
||||||
jList1.setEnabled(false);
|
jList1.setEnabled(false);
|
||||||
//loading savable list in a new Thread
|
//loading savable list in a new Thread
|
||||||
@ -153,6 +154,14 @@ public class UserDataPicker extends javax.swing.JDialog {
|
|||||||
return model;
|
return model;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setVisible(boolean b) {
|
||||||
|
super.setVisible(b);
|
||||||
|
exec.shutdown();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/** This method is called from within the constructor to
|
/** This method is called from within the constructor to
|
||||||
* initialize the form.
|
* initialize the form.
|
||||||
* WARNING: Do NOT modify this code. The content of this method is
|
* WARNING: Do NOT modify this code. The content of this method is
|
||||||
|
Loading…
x
Reference in New Issue
Block a user