SDK : properly shutdown poolExecutor in UserDataPicker and ParticleInfluencerPicker.

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9845 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
3.0
rem..om 12 years ago
parent 4ae24ffeee
commit bc544adb40
  1. 9
      sdk/jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/actions/ParticleInfluencerPicker.java
  2. 2
      sdk/jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/actions/UserDataPicker.form
  3. 11
      sdk/jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/actions/UserDataPicker.java

@ -71,6 +71,7 @@ public class ParticleInfluencerPicker extends javax.swing.JDialog {
JmeParticleEmitter jmePE;
ParticleInfluencerPropertyEditor editor;
ScheduledThreadPoolExecutor exec = new ScheduledThreadPoolExecutor(1);
/**
* Creates new form UserDataPicker
@ -82,7 +83,6 @@ public class ParticleInfluencerPicker extends javax.swing.JDialog {
this.editor = editor;
setLocationRelativeTo(null);
ScheduledThreadPoolExecutor exec = new ScheduledThreadPoolExecutor(1);
jList1.setEnabled(false);
//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() {
final DefaultListModel model = new DefaultListModel();
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">
<Properties>

@ -74,6 +74,7 @@ public class UserDataPicker extends javax.swing.JDialog {
UserDataDialog parentDialog;
JmeSpatial spat;
ScheduledThreadPoolExecutor exec = new ScheduledThreadPoolExecutor(1);
/** Creates new form UserDataPicker */
public UserDataPicker(java.awt.Frame parent, boolean modal, UserDataDialog parentDialog, JmeSpatial spat) {
@ -83,7 +84,7 @@ public class UserDataPicker extends javax.swing.JDialog {
initComponents();
setLocationRelativeTo(null);
ScheduledThreadPoolExecutor exec = new ScheduledThreadPoolExecutor(1);
jList1.setEnabled(false);
//loading savable list in a new Thread
@ -153,6 +154,14 @@ public class UserDataPicker extends javax.swing.JDialog {
return model;
}
@Override
public void setVisible(boolean b) {
super.setVisible(b);
exec.shutdown();
}
/** This method is called from within the constructor to
* initialize the form.
* WARNING: Do NOT modify this code. The content of this method is

Loading…
Cancel
Save