diff --git a/sdk/jme3-core/src/com/jme3/gde/core/codeless/Bundle.properties b/sdk/jme3-core/src/com/jme3/gde/core/codeless/Bundle.properties
index 728fff274..e74335156 100644
--- a/sdk/jme3-core/src/com/jme3/gde/core/codeless/Bundle.properties
+++ b/sdk/jme3-core/src/com/jme3/gde/core/codeless/Bundle.properties
@@ -4,12 +4,8 @@ CodelessProjectWizardVisualPanel1.jTextField1.text=path to project
CodelessProjectWizardVisualPanel1.jButton1.text=..
CodelessProjectWizardVisualPanel1.jLabel3.text=Enter the root folder of your project:
CodelessProjectWizardVisualPanel1.jLabel1.text=Project Folder:
-CodelessProjectWizardVisualPanel1.jPanel1.border.title=Information
CodelessProjectWizardVisualPanel1.jTextField2.text=path to assets
CodelessProjectWizardVisualPanel1.jButton2.text=..
CodelessProjectWizardVisualPanel1.jLabel4.text=Enter the assets folder relative to the project folder:
-CodelessProjectWizardVisualPanel1.jLabel5.text=A settings folder will be created in your project directory.
-CodelessProjectWizardVisualPanel1.jLabel6.text=This importer will create a project that only manages the
-CodelessProjectWizardVisualPanel1.jLabel7.text=external projects assets. No code or libraries will be imported.
CodelessProjectWizardVisualPanel2.jLabel1.text=TODO-No checks for now!
-CodelessProjectWizardVisualPanel1.jLabel8.text=The assets folder should be in your games AssetManager root.
+CodelessProjectWizardVisualPanel1.jTextArea1.text=This importer will create a project that only manages the external projects assets. No code or libraries will be imported.\n\nThe specified assets folder should be your games AssetManager root or in the classpath of your project.\n\nA settings file will be created in your project directory.
diff --git a/sdk/jme3-core/src/com/jme3/gde/core/codeless/CodelessProjectWizardAction.java b/sdk/jme3-core/src/com/jme3/gde/core/codeless/CodelessProjectWizardAction.java
index 11a29e484..3e993d8a8 100644
--- a/sdk/jme3-core/src/com/jme3/gde/core/codeless/CodelessProjectWizardAction.java
+++ b/sdk/jme3-core/src/com/jme3/gde/core/codeless/CodelessProjectWizardAction.java
@@ -39,6 +39,8 @@ import java.io.InputStream;
import java.io.OutputStream;
import java.text.MessageFormat;
import java.util.Properties;
+import java.util.logging.Level;
+import java.util.logging.Logger;
import javax.swing.JComponent;
import org.netbeans.api.project.Project;
import org.netbeans.api.project.ProjectManager;
@@ -57,6 +59,7 @@ import org.openide.util.actions.CallableSystemAction;
@SuppressWarnings("unchecked")
public final class CodelessProjectWizardAction extends CallableSystemAction {
+ private static final Logger logger = Logger.getLogger(CodelessProjectWizardAction.class.getName());
private WizardDescriptor.Panel[] panels;
public void performAction() {
@@ -80,21 +83,23 @@ public final class CodelessProjectWizardAction extends CallableSystemAction {
try {
FileObject properties = project.createData(CodelessProjectFactory.CONFIG_NAME);
Properties propertiesObj = new Properties();
- FileLock lock=properties.lock();
- InputStream in=properties.getInputStream();
+ FileLock lock = properties.lock();
+ InputStream in = properties.getInputStream();
propertiesObj.load(in);
in.close();
propertiesObj.setProperty("assets.folder.name", assetsFolder);
- OutputStream out=properties.getOutputStream(lock);
+ OutputStream out = properties.getOutputStream(lock);
propertiesObj.store(out, "assets properties");
out.close();
lock.releaseLock();
Project theProject = ProjectManager.getDefault().findProject(project);
- if(theProject!=null){
+ if (theProject != null) {
Project[] array = new Project[1];
array[0] = theProject;
OpenProjects.getDefault().open(array, false);
+ } else {
+ logger.log(Level.SEVERE, "Could not create project!");
}
} catch (IOException ex) {
Exceptions.printStackTrace(ex);
@@ -102,15 +107,15 @@ public final class CodelessProjectWizardAction extends CallableSystemAction {
}
/**
- * Initialize panels representing individual wizard's steps and sets
- * various properties for them influencing wizard appearance.
+ * Initialize panels representing individual wizard's steps and sets various
+ * properties for them influencing wizard appearance.
*/
private WizardDescriptor.Panel[] getPanels() {
if (panels == null) {
panels = new WizardDescriptor.Panel[]{
- new CodelessProjectWizardWizardPanel1(),
- new CodelessProjectWizardWizardPanel2()
- };
+ new CodelessProjectWizardWizardPanel1(),
+// new CodelessProjectWizardWizardPanel2()
+ };
String[] steps = new String[panels.length];
for (int i = 0; i < panels.length; i++) {
Component c = panels[i].getComponent();
diff --git a/sdk/jme3-core/src/com/jme3/gde/core/codeless/CodelessProjectWizardVisualPanel1.form b/sdk/jme3-core/src/com/jme3/gde/core/codeless/CodelessProjectWizardVisualPanel1.form
index fb5643cd6..fb1fadaa2 100644
--- a/sdk/jme3-core/src/com/jme3/gde/core/codeless/CodelessProjectWizardVisualPanel1.form
+++ b/sdk/jme3-core/src/com/jme3/gde/core/codeless/CodelessProjectWizardVisualPanel1.form
@@ -19,11 +19,16 @@
-
-
+
-
+
+
+
+
+
+
+
@@ -40,86 +45,14 @@
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -166,6 +99,9 @@
+
+
+
@@ -220,6 +156,9 @@
+
+
+
@@ -243,5 +182,29 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/sdk/jme3-core/src/com/jme3/gde/core/codeless/CodelessProjectWizardVisualPanel1.java b/sdk/jme3-core/src/com/jme3/gde/core/codeless/CodelessProjectWizardVisualPanel1.java
index a94ca7f83..ade6a4fcb 100644
--- a/sdk/jme3-core/src/com/jme3/gde/core/codeless/CodelessProjectWizardVisualPanel1.java
+++ b/sdk/jme3-core/src/com/jme3/gde/core/codeless/CodelessProjectWizardVisualPanel1.java
@@ -38,9 +38,15 @@ import org.openide.filesystems.FileChooserBuilder;
public final class CodelessProjectWizardVisualPanel1 extends JPanel {
- /** Creates new form CodelessProjectWizardVisualPanel1 */
- public CodelessProjectWizardVisualPanel1() {
+ private final CodelessProjectWizardWizardPanel1 panel;
+
+ /**
+ * Creates new form CodelessProjectWizardVisualPanel1
+ */
+ public CodelessProjectWizardVisualPanel1(CodelessProjectWizardWizardPanel1 panel) {
initComponents();
+ this.panel = panel;
+ enableAssetsPath(false);
}
@Override
@@ -48,32 +54,32 @@ public final class CodelessProjectWizardVisualPanel1 extends JPanel {
return "Specify Folders";
}
- public String getProjectPath(){
+ public String getProjectPath() {
return jTextField1.getText();
}
- public String getAssetsPath(){
+ public String getAssetsPath() {
return jTextField2.getText();
}
- public void setListener(ActionListener listener){
+ public void setListener(ActionListener listener) {
jTextField1.addActionListener(listener);
jTextField2.addActionListener(listener);
}
- /** This method is called from within the constructor to
- * initialize the form.
- * WARNING: Do NOT modify this code. The content of this method is
- * always regenerated by the Form Editor.
+ public void enableAssetsPath(boolean enable) {
+ jButton2.setEnabled(enable);
+ jTextField2.setEnabled(enable);
+ }
+
+ /**
+ * This method is called from within the constructor to initialize the form.
+ * WARNING: Do NOT modify this code. The content of this method is always
+ * regenerated by the Form Editor.
*/
// //GEN-BEGIN:initComponents
private void initComponents() {
- jPanel1 = new javax.swing.JPanel();
- jLabel5 = new javax.swing.JLabel();
- jLabel6 = new javax.swing.JLabel();
- jLabel7 = new javax.swing.JLabel();
- jLabel8 = new javax.swing.JLabel();
jLabel3 = new javax.swing.JLabel();
jToolBar1 = new javax.swing.JToolBar();
jLabel1 = new javax.swing.JLabel();
@@ -86,44 +92,10 @@ public final class CodelessProjectWizardVisualPanel1 extends JPanel {
jTextField2 = new javax.swing.JTextField();
jButton2 = new javax.swing.JButton();
jLabel4 = new javax.swing.JLabel();
+ jScrollPane1 = new javax.swing.JScrollPane();
+ jTextArea1 = new javax.swing.JTextArea();
- jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(org.openide.util.NbBundle.getMessage(CodelessProjectWizardVisualPanel1.class, "CodelessProjectWizardVisualPanel1.jPanel1.border.title"))); // NOI18N
-
- org.openide.awt.Mnemonics.setLocalizedText(jLabel5, org.openide.util.NbBundle.getMessage(CodelessProjectWizardVisualPanel1.class, "CodelessProjectWizardVisualPanel1.jLabel5.text")); // NOI18N
-
- org.openide.awt.Mnemonics.setLocalizedText(jLabel6, org.openide.util.NbBundle.getMessage(CodelessProjectWizardVisualPanel1.class, "CodelessProjectWizardVisualPanel1.jLabel6.text")); // NOI18N
-
- org.openide.awt.Mnemonics.setLocalizedText(jLabel7, org.openide.util.NbBundle.getMessage(CodelessProjectWizardVisualPanel1.class, "CodelessProjectWizardVisualPanel1.jLabel7.text")); // NOI18N
-
- org.openide.awt.Mnemonics.setLocalizedText(jLabel8, org.openide.util.NbBundle.getMessage(CodelessProjectWizardVisualPanel1.class, "CodelessProjectWizardVisualPanel1.jLabel8.text")); // NOI18N
-
- javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
- jPanel1.setLayout(jPanel1Layout);
- jPanel1Layout.setHorizontalGroup(
- jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addGroup(jPanel1Layout.createSequentialGroup()
- .addContainerGap()
- .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addComponent(jLabel6)
- .addComponent(jLabel7)
- .addComponent(jLabel5)
- .addComponent(jLabel8))
- .addContainerGap(22, Short.MAX_VALUE))
- );
- jPanel1Layout.setVerticalGroup(
- jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addGroup(jPanel1Layout.createSequentialGroup()
- .addComponent(jLabel6)
- .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
- .addComponent(jLabel7)
- .addGap(18, 18, 18)
- .addComponent(jLabel5)
- .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 23, Short.MAX_VALUE)
- .addComponent(jLabel8)
- .addContainerGap())
- );
-
- jLabel3.setFont(new java.awt.Font("Lucida Grande", 0, 12));
+ jLabel3.setFont(new java.awt.Font("Lucida Grande", 0, 12)); // NOI18N
org.openide.awt.Mnemonics.setLocalizedText(jLabel3, org.openide.util.NbBundle.getMessage(CodelessProjectWizardVisualPanel1.class, "CodelessProjectWizardVisualPanel1.jLabel3.text")); // NOI18N
jToolBar1.setFloatable(false);
@@ -146,6 +118,11 @@ public final class CodelessProjectWizardVisualPanel1 extends JPanel {
jToolBar1.add(jPanel2);
jTextField1.setText(org.openide.util.NbBundle.getMessage(CodelessProjectWizardVisualPanel1.class, "CodelessProjectWizardVisualPanel1.jTextField1.text")); // NOI18N
+ jTextField1.addKeyListener(new java.awt.event.KeyAdapter() {
+ public void keyReleased(java.awt.event.KeyEvent evt) {
+ checkInput(evt);
+ }
+ });
jToolBar1.add(jTextField1);
org.openide.awt.Mnemonics.setLocalizedText(jButton1, org.openide.util.NbBundle.getMessage(CodelessProjectWizardVisualPanel1.class, "CodelessProjectWizardVisualPanel1.jButton1.text")); // NOI18N
@@ -178,6 +155,11 @@ public final class CodelessProjectWizardVisualPanel1 extends JPanel {
jToolBar2.add(jPanel3);
jTextField2.setText(org.openide.util.NbBundle.getMessage(CodelessProjectWizardVisualPanel1.class, "CodelessProjectWizardVisualPanel1.jTextField2.text")); // NOI18N
+ jTextField2.addKeyListener(new java.awt.event.KeyAdapter() {
+ public void keyReleased(java.awt.event.KeyEvent evt) {
+ checkInput(evt);
+ }
+ });
jToolBar2.add(jTextField2);
org.openide.awt.Mnemonics.setLocalizedText(jButton2, org.openide.util.NbBundle.getMessage(CodelessProjectWizardVisualPanel1.class, "CodelessProjectWizardVisualPanel1.jButton2.text")); // NOI18N
@@ -188,9 +170,18 @@ public final class CodelessProjectWizardVisualPanel1 extends JPanel {
});
jToolBar2.add(jButton2);
- jLabel4.setFont(new java.awt.Font("Lucida Grande", 0, 12));
+ jLabel4.setFont(new java.awt.Font("Lucida Grande", 0, 12)); // NOI18N
org.openide.awt.Mnemonics.setLocalizedText(jLabel4, org.openide.util.NbBundle.getMessage(CodelessProjectWizardVisualPanel1.class, "CodelessProjectWizardVisualPanel1.jLabel4.text")); // NOI18N
+ jTextArea1.setEditable(false);
+ jTextArea1.setColumns(20);
+ jTextArea1.setLineWrap(true);
+ jTextArea1.setRows(5);
+ jTextArea1.setText(org.openide.util.NbBundle.getMessage(CodelessProjectWizardVisualPanel1.class, "CodelessProjectWizardVisualPanel1.jTextArea1.text")); // NOI18N
+ jTextArea1.setWrapStyleWord(true);
+ jTextArea1.setDisabledTextColor(new java.awt.Color(0, 0, 0));
+ jScrollPane1.setViewportView(jTextArea1);
+
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
this.setLayout(layout);
layout.setHorizontalGroup(
@@ -198,11 +189,14 @@ public final class CodelessProjectWizardVisualPanel1 extends JPanel {
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
.addContainerGap()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
- .addComponent(jPanel1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
- .addComponent(jLabel3, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 447, javax.swing.GroupLayout.PREFERRED_SIZE)
- .addComponent(jToolBar1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 447, Short.MAX_VALUE)
- .addComponent(jLabel4, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 300, javax.swing.GroupLayout.PREFERRED_SIZE)
- .addComponent(jToolBar2, javax.swing.GroupLayout.DEFAULT_SIZE, 447, Short.MAX_VALUE))
+ .addComponent(jScrollPane1)
+ .addComponent(jToolBar1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
+ .addComponent(jToolBar2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
+ .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()
+ .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
+ .addComponent(jLabel3, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 447, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addComponent(jLabel4, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 300, javax.swing.GroupLayout.PREFERRED_SIZE))
+ .addGap(0, 0, Short.MAX_VALUE)))
.addContainerGap())
);
layout.setVerticalGroup(
@@ -216,38 +210,46 @@ public final class CodelessProjectWizardVisualPanel1 extends JPanel {
.addComponent(jLabel4)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jToolBar2, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)
- .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 44, Short.MAX_VALUE)
- .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+ .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 227, Short.MAX_VALUE)
.addContainerGap())
);
}// //GEN-END:initComponents
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
- FileChooserBuilder builder = new FileChooserBuilder(System.getProperty("user.home"));
+ FileChooserBuilder builder = new FileChooserBuilder(getClass());
+ builder.setDefaultWorkingDirectory(new File(System.getProperty("user.dir")));
builder.setDirectoriesOnly(true);
builder.setTitle("Select Project Folder");
File file = builder.showOpenDialog();
if (file != null) {
- jTextField1.setText(file.getPath());
+ jTextField1.setText(file.getAbsolutePath() + File.separator);
+ panel.fireChangeEvent();
}
}//GEN-LAST:event_jButton1ActionPerformed
private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed
- File path=new File(jTextField1.getText());
- if(path.isDirectory()){
- FileChooserBuilder builder = new FileChooserBuilder(path.getAbsolutePath().replaceAll("\\","/"));
+ String pathName = jTextField1.getText();
+ File path = new File(pathName);
+ if (path.isDirectory()) {
+ FileChooserBuilder builder = new FileChooserBuilder(getClass());
+ builder.setDefaultWorkingDirectory(path);
builder.setDirectoriesOnly(true);
builder.setTitle("Select Assets Folder");
File file = builder.showOpenDialog();
if (file != null) {
try {
- jTextField2.setText(file.getAbsolutePath().substring(path.getAbsolutePath().length(), file.getAbsolutePath().length()).replaceAll("\\","/"));
+ jTextField2.setText(file.getAbsolutePath().substring(pathName.length(), file.getAbsolutePath().length()));
+ panel.fireChangeEvent();
} catch (Exception e) {
}
}
}
}//GEN-LAST:event_jButton2ActionPerformed
+ private void checkInput(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_checkInput
+ panel.fireChangeEvent();
+ }//GEN-LAST:event_checkInput
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JButton jButton1;
private javax.swing.JButton jButton2;
@@ -255,13 +257,10 @@ public final class CodelessProjectWizardVisualPanel1 extends JPanel {
private javax.swing.JLabel jLabel2;
private javax.swing.JLabel jLabel3;
private javax.swing.JLabel jLabel4;
- private javax.swing.JLabel jLabel5;
- private javax.swing.JLabel jLabel6;
- private javax.swing.JLabel jLabel7;
- private javax.swing.JLabel jLabel8;
- private javax.swing.JPanel jPanel1;
private javax.swing.JPanel jPanel2;
private javax.swing.JPanel jPanel3;
+ private javax.swing.JScrollPane jScrollPane1;
+ private javax.swing.JTextArea jTextArea1;
private javax.swing.JTextField jTextField1;
private javax.swing.JTextField jTextField2;
private javax.swing.JToolBar jToolBar1;
diff --git a/sdk/jme3-core/src/com/jme3/gde/core/codeless/CodelessProjectWizardWizardPanel1.java b/sdk/jme3-core/src/com/jme3/gde/core/codeless/CodelessProjectWizardWizardPanel1.java
index 108e59f87..1d0a9f47f 100644
--- a/sdk/jme3-core/src/com/jme3/gde/core/codeless/CodelessProjectWizardWizardPanel1.java
+++ b/sdk/jme3-core/src/com/jme3/gde/core/codeless/CodelessProjectWizardWizardPanel1.java
@@ -32,6 +32,11 @@
package com.jme3.gde.core.codeless;
import java.awt.event.ActionListener;
+import java.io.File;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Set;
+import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import org.openide.WizardDescriptor;
import org.openide.util.HelpCtx;
@@ -43,6 +48,7 @@ public class CodelessProjectWizardWizardPanel1 implements WizardDescriptor.Panel
* component from this class, just use getComponent().
*/
private CodelessProjectWizardVisualPanel1 component;
+ private final Set listeners = new HashSet(1); // or can use ChangeSupport in NB 6.0
// Get the visual component for the panel. In this template, the component
// is kept separate. This can be more efficient: if the wizard is created
@@ -50,7 +56,7 @@ public class CodelessProjectWizardWizardPanel1 implements WizardDescriptor.Panel
// create only those which really need to be visible.
public CodelessProjectWizardVisualPanel1 getComponent() {
if (component == null) {
- component = new CodelessProjectWizardVisualPanel1();
+ component = new CodelessProjectWizardVisualPanel1(this);
}
return component;
}
@@ -63,49 +69,50 @@ public class CodelessProjectWizardWizardPanel1 implements WizardDescriptor.Panel
}
public boolean isValid() {
-// StatusDisplayer.getDefault().setStatusText("Check: "+component.getProjectPath());
-// if (new File(component.getProjectPath()).isDirectory()
-// && new File(component.getProjectPath()+File.separator+component.getAssetsPath()).isDirectory()) {
- return true;
-// }
-// return false;
+ String projectPath = component.getProjectPath();
+ String assetsPath = component.getAssetsPath();
+ File projectFile = new File(projectPath);
+ if (projectFile.isDirectory()) {
+ component.enableAssetsPath(true);
+ File assetsFile = new File(projectPath + assetsPath);
+ if (assetsFile.isDirectory()) {
+ return true;
+ }
+ } else {
+ component.enableAssetsPath(false);
+ }
+ return false;
}
public final void addChangeListener(ChangeListener l) {
+ synchronized (listeners) {
+ listeners.add(l);
+ }
}
public final void removeChangeListener(ChangeListener l) {
+ synchronized (listeners) {
+ listeners.remove(l);
+ }
}
- /*
- private final Set listeners = new HashSet(1); // or can use ChangeSupport in NB 6.0
- public final void addChangeListener(ChangeListener l) {
- synchronized (listeners) {
- listeners.add(l);
- }
- }
- public final void removeChangeListener(ChangeListener l) {
- synchronized (listeners) {
- listeners.remove(l);
- }
- }
+
protected final void fireChangeEvent() {
- Iterator it;
- synchronized (listeners) {
- it = new HashSet(listeners).iterator();
- }
- ChangeEvent ev = new ChangeEvent(this);
- while (it.hasNext()) {
- it.next().stateChanged(ev);
- }
+ Iterator it;
+ synchronized (listeners) {
+ it = new HashSet(listeners).iterator();
+ }
+ ChangeEvent ev = new ChangeEvent(this);
+ while (it.hasNext()) {
+ it.next().stateChanged(ev);
+ }
}
- */
// You can use a settings object to keep track of state. Normally the
// settings object will be the WizardDescriptor, so you can use
// WizardDescriptor.getProperty & putProperty to store information entered
// by the user.
public void readSettings(Object settings) {
- ActionListener listener=((WizardDescriptor)settings).getButtonListener();
+ ActionListener listener = ((WizardDescriptor) settings).getButtonListener();
getComponent().setListener(listener);
}