diff --git a/lib/appframework-1.0.3.jar b/lib/appframework-1.0.3.jar
new file mode 100755
index 0000000..9f5cdbf
Binary files /dev/null and b/lib/appframework-1.0.3.jar differ
diff --git a/lib/jcommon-1.0.8.jar b/lib/jcommon-1.0.8.jar
deleted file mode 100755
index e56d742..0000000
Binary files a/lib/jcommon-1.0.8.jar and /dev/null differ
diff --git a/lib/jfreechart-1.0.4.jar b/lib/jfreechart-1.0.4.jar
deleted file mode 100755
index 908e28d..0000000
Binary files a/lib/jfreechart-1.0.4.jar and /dev/null differ
diff --git a/lib/jyaml-1.3.jar b/lib/jyaml-1.3.jar
deleted file mode 100755
index 9450088..0000000
Binary files a/lib/jyaml-1.3.jar and /dev/null differ
diff --git a/lib/mysql-connector-java-5.0.5-bin.jar b/lib/mysql-connector-java-5.0.5-bin.jar
new file mode 100644
index 0000000..af8ec67
Binary files /dev/null and b/lib/mysql-connector-java-5.0.5-bin.jar differ
diff --git a/lib/org-jdesktop-layout.jar b/lib/org-jdesktop-layout.jar
new file mode 100644
index 0000000..e55c842
Binary files /dev/null and b/lib/org-jdesktop-layout.jar differ
diff --git a/lib/org-openide-awt.jar b/lib/org-openide-awt.jar
new file mode 100644
index 0000000..2fd17e6
Binary files /dev/null and b/lib/org-openide-awt.jar differ
diff --git a/lib/org-openide-dialogs.jar b/lib/org-openide-dialogs.jar
new file mode 100644
index 0000000..590005d
Binary files /dev/null and b/lib/org-openide-dialogs.jar differ
diff --git a/lib/org-openide-util.jar b/lib/org-openide-util.jar
new file mode 100644
index 0000000..f818b25
Binary files /dev/null and b/lib/org-openide-util.jar differ
diff --git a/lib/xpp3_min-1.1.4c.jar b/lib/xpp3_min-1.1.4c.jar
deleted file mode 100755
index 813a9a8..0000000
Binary files a/lib/xpp3_min-1.1.4c.jar and /dev/null differ
diff --git a/lib/xstream-1.2.2-20061111.171510-1.jar b/lib/xstream-1.2.2-20061111.171510-1.jar
deleted file mode 100755
index fd89de2..0000000
Binary files a/lib/xstream-1.2.2-20061111.171510-1.jar and /dev/null differ
diff --git a/nbproject/private/private.properties b/nbproject/private/private.properties
index 879b2a2..45c68d5 100644
--- a/nbproject/private/private.properties
+++ b/nbproject/private/private.properties
@@ -1,7 +1,6 @@
compile.on.save=false
do.depend=false
do.jar=true
-file.reference.mysql-connector-java-5.0.5-bin.jar=/Users/Stefano/Desktop/FreimapSte/Freimap/hg/lib/mysql-connector-java-5.1.12-bin.jar
javac.debug=true
javadoc.preview=true
jaxbwiz.endorsed.dirs=/Applications/NetBeans/NetBeans 6.8.app/Contents/Resources/NetBeans/ide12/modules/ext/jaxb/api
diff --git a/nbproject/project.properties b/nbproject/project.properties
index ac29ec7..1d36e51 100755
--- a/nbproject/project.properties
+++ b/nbproject/project.properties
@@ -22,12 +22,21 @@ dist.jar=${dist.dir}/FreimapGSoC.jar
dist.javadoc.dir=${dist.dir}/javadoc
endorsed.classpath=
excludes=
+file.reference.AbsoluteLayout.jar=lib/absolutelayout/AbsoluteLayout.jar
+file.reference.appframework-1.0.3.jar=lib/appframework-1.0.3.jar
file.reference.jcommon-1.0.8.jar=lib/jcommon-1.0.8.jar
file.reference.jfreechart-1.0.4.jar=lib/jfreechart-1.0.4.jar
file.reference.jmdns.jar=lib/jmdns.jar
file.reference.jyaml-1.3.jar=lib/jyaml-1.3.jar
file.reference.mysql-connector-java-5.0.5-bin.jar=lib/mysql-connector-java-5.0.5-bin.jar
file.reference.mysql-connector-java-5.1.12-bin.jar=lib/mysql-connector-java-5.1.12-bin.jar
+file.reference.org-jdesktop-layout.jar=lib/org-jdesktop-layout.jar
+file.reference.org-netbeans-modules-java-j2seproject-copylibstask.jar=lib/CopyLibs/org-netbeans-modules-java-j2seproject-copylibstask.jar
+file.reference.org-openide-awt.jar=lib/org-openide-awt.jar
+file.reference.org-openide-dialogs.jar=lib/org-openide-dialogs.jar
+file.reference.org-openide-util.jar=lib/org-openide-util.jar
+file.reference.swing-desktop-utils-r10.jar=lib/swing-desktop-utils-r10.jar
+file.reference.swing-layout-1.0.4.jar=lib/swing-layout/swing-layout-1.0.4.jar
file.reference.swing-worker.jar=lib/swing-worker.jar
file.reference.swingx-bean.jar=lib/swingx-bean.jar
file.reference.swingx-ws-2009_06_14.jar=lib/swingx-ws-2009_06_14.jar
@@ -37,21 +46,27 @@ file.reference.xstream-1.2.2-20061111.171510-1.jar=lib/xstream-1.2.2-20061111.17
includes=**
jar.compress=false
javac.classpath=\
- ${libs.swing-app-framework.classpath}:\
- ${file.reference.swingx-ws-2009_06_14.jar}:\
${file.reference.jcommon-1.0.8.jar}:\
${file.reference.jfreechart-1.0.4.jar}:\
+ ${file.reference.jmdns.jar}:\
${file.reference.jyaml-1.3.jar}:\
- ${file.reference.mysql-connector-java-5.0.5-bin.jar}:\
- ${file.reference.xpp3_min-1.1.4c.jar}:\
- ${file.reference.xstream-1.2.2-20061111.171510-1.jar}:\
+ ${file.reference.mysql-connector-java-5.1.12-bin.jar}:\
+ ${file.reference.org-openide-awt.jar}:\
+ ${file.reference.org-openide-dialogs.jar}:\
+ ${file.reference.org-openide-util.jar}:\
+ ${file.reference.swing-desktop-utils-r10.jar}:\
${file.reference.swing-worker.jar}:\
${file.reference.swingx-bean.jar}:\
+ ${file.reference.swingx-ws-2009_06_14.jar}:\
${file.reference.swingx.jar}:\
- ${libs.absolutelayout.classpath}:\
- ${libs.swing-layout.classpath}:\
- ${file.reference.mysql-connector-java-5.1.12-bin.jar}:\
- ${file.reference.jmdns.jar}
+ ${file.reference.xpp3_min-1.1.4c.jar}:\
+ ${file.reference.xstream-1.2.2-20061111.171510-1.jar}:\
+ ${file.reference.org-jdesktop-layout.jar}:\
+ ${file.reference.org-netbeans-modules-java-j2seproject-copylibstask.jar}:\
+ ${file.reference.swing-layout-1.0.4.jar}:\
+ ${file.reference.mysql-connector-java-5.0.5-bin.jar}:\
+ ${file.reference.appframework-1.0.3.jar}:\
+ ${file.reference.AbsoluteLayout.jar}
# Space-separated list of extra javac options
javac.compilerargs=
javac.deprecation=false
diff --git a/src/Wizard/Bundle.properties b/src/Wizard/Bundle.properties
deleted file mode 100644
index 87a16f9..0000000
--- a/src/Wizard/Bundle.properties
+++ /dev/null
@@ -1,42 +0,0 @@
-OpenIDE-Module-Name=Wizard
-FreimapVisualPanel1.jLabel1.text=Information About Freimap and this Wizard - SKIP BUTTON?
-FreimapVisualPanel2.logLabel.text=\
-FreimapVisualPanel2.jLabel5.text=Host:
-FreimapVisualPanel2.jLabel2.text=Password:
-FreimapVisualPanel2.jLabel6.text=:
-FreimapVisualPanel2.jLabel1.text=UserName:
-FreimapVisualPanel2.loadDb.text=Load Avaible Databse
-FreimapVisualPanel2.jButton1.text=Example
-FreimapVisualPanel2.jLabel7.text=Avaible Database:
-FreimapVisualPanel2.portText.text=3306
-FreimapVisualPanel2.jLabel4.text=For security reason you cannot store User/Pass
-FreimapVisualPanel2.connectButton.text=Connect
-FreimapVisualPanel2.jLabel3.text=Insert MySQL Requirements to store data
-FreimapVisualPanel3.jLabel1.text=Name Service Plugin:
-FreimapVisualPanel3.jLabel2.text=Olsr Config File:
-FreimapVisualPanel3.jLabel3.text=DotDraw Plugin Port:
-FreimapVisualPanel4.jLabel1.text=UserName:
-FreimapVisualPanel4.jLabel2.text=MySQL Database:
-FreimapVisualPanel4.jLabel3.text=Password:
-FreimapVisualPanel4.jLabel4.text=OLSRd Config file path:
-FreimapVisualPanel4.jLabel5.text=Nameservice LatLon.js file path:
-FreimapVisualPanel4.jLabel6.text=DotDraw Plugin port:
-FreimapVisualPanel3.jButton1.text=Browse
-FreimapVisualPanel3.jButton2.text=Read Config File
-FreimapVisualPanel3.olsrdPath.text=
-FreimapVisualPanel3.nameServicePath.text=
-FreimapVisualPanel3.dotDrawPort.text=
-FreimapVisualPanel2.jLabel5.text=Database:
-FreimapVisualPanel4.mySQLLabel.text=\
-FreimapVisualPanel4.UserNameLabel.text=jLabel7
-FreimapVisualPanel4.passwordLabel.text=\
-FreimapVisualPanel4.olsrdLabel.text=jLabel7
-FreimapVisualPanel4.NameServiceLabel.text=\
-FreimapVisualPanel4.dotDrawPortLabel.text=jLabel7
-FreimapVisualPanel4.UserNameLabel.text=\
-FreimapVisualPanel4.olsrdLabel.text=\
-FreimapVisualPanel4.dotDrawPortLabel.text=\
-FreimapVisualPanel4.jLabel7.text=jLabel7
-FreimapVisualPanel4.jLabel7.text=You have put this information:
-FreimapVisualPanel4.jLabel8.text=HostName/port:
-FreimapVisualPanel4.hostNameLabel.text=\
diff --git a/src/Wizard/FreimapVisualPanel1.form b/src/Wizard/FreimapVisualPanel1.form
deleted file mode 100644
index 4846818..0000000
--- a/src/Wizard/FreimapVisualPanel1.form
+++ /dev/null
@@ -1,45 +0,0 @@
-
-
-
diff --git a/src/Wizard/FreimapVisualPanel4.java b/src/Wizard/FreimapVisualPanel4.java
deleted file mode 100644
index 872a6c1..0000000
--- a/src/Wizard/FreimapVisualPanel4.java
+++ /dev/null
@@ -1,177 +0,0 @@
-/*
- * To change this template, choose Tools | Templates
- * and open the template in the editor.
- */
-package Wizard;
-
-import javax.swing.JPanel;
-
-public final class FreimapVisualPanel4 extends JPanel {
-
- /** Creates new form FreimapVisualPanel4 */
- public FreimapVisualPanel4() {
- initComponents();
- }
-
- @Override
- public String getName() {
- return "Confirm Data";
- }
-
- /** 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() {
-
- jLabel1 = new javax.swing.JLabel();
- jLabel2 = new javax.swing.JLabel();
- jLabel3 = new javax.swing.JLabel();
- jLabel4 = new javax.swing.JLabel();
- jLabel5 = new javax.swing.JLabel();
- jLabel6 = new javax.swing.JLabel();
- mySQLLabel = new javax.swing.JLabel();
- UserNameLabel = new javax.swing.JLabel();
- passwordLabel = new javax.swing.JLabel();
- olsrdLabel = new javax.swing.JLabel();
- NameServiceLabel = new javax.swing.JLabel();
- dotDrawPortLabel = new javax.swing.JLabel();
- jLabel7 = new javax.swing.JLabel();
- hostNameLabel = new javax.swing.JLabel();
- jLabel8 = new javax.swing.JLabel();
-
- jLabel1.setFont(new java.awt.Font("Lucida Grande", 0, 12)); // NOI18N
- org.openide.awt.Mnemonics.setLocalizedText(jLabel1, org.openide.util.NbBundle.getMessage(FreimapVisualPanel4.class, "FreimapVisualPanel4.jLabel1.text")); // NOI18N
-
- jLabel2.setFont(new java.awt.Font("Lucida Grande", 0, 12)); // NOI18N
- org.openide.awt.Mnemonics.setLocalizedText(jLabel2, org.openide.util.NbBundle.getMessage(FreimapVisualPanel4.class, "FreimapVisualPanel4.jLabel2.text")); // NOI18N
-
- jLabel3.setFont(new java.awt.Font("Lucida Grande", 0, 12)); // NOI18N
- org.openide.awt.Mnemonics.setLocalizedText(jLabel3, org.openide.util.NbBundle.getMessage(FreimapVisualPanel4.class, "FreimapVisualPanel4.jLabel3.text")); // NOI18N
-
- jLabel4.setFont(new java.awt.Font("Lucida Grande", 0, 12)); // NOI18N
- org.openide.awt.Mnemonics.setLocalizedText(jLabel4, org.openide.util.NbBundle.getMessage(FreimapVisualPanel4.class, "FreimapVisualPanel4.jLabel4.text")); // NOI18N
-
- jLabel5.setFont(new java.awt.Font("Lucida Grande", 0, 12)); // NOI18N
- org.openide.awt.Mnemonics.setLocalizedText(jLabel5, org.openide.util.NbBundle.getMessage(FreimapVisualPanel4.class, "FreimapVisualPanel4.jLabel5.text")); // NOI18N
-
- jLabel6.setFont(new java.awt.Font("Lucida Grande", 0, 12)); // NOI18N
- org.openide.awt.Mnemonics.setLocalizedText(jLabel6, org.openide.util.NbBundle.getMessage(FreimapVisualPanel4.class, "FreimapVisualPanel4.jLabel6.text")); // NOI18N
-
- mySQLLabel.setFont(new java.awt.Font("Lucida Grande", 0, 12)); // NOI18N
- org.openide.awt.Mnemonics.setLocalizedText(mySQLLabel, org.openide.util.NbBundle.getMessage(FreimapVisualPanel4.class, "FreimapVisualPanel4.mySQLLabel.text")); // NOI18N
-
- UserNameLabel.setFont(new java.awt.Font("Lucida Grande", 0, 12)); // NOI18N
- org.openide.awt.Mnemonics.setLocalizedText(UserNameLabel, org.openide.util.NbBundle.getMessage(FreimapVisualPanel4.class, "FreimapVisualPanel4.UserNameLabel.text")); // NOI18N
-
- passwordLabel.setFont(new java.awt.Font("Lucida Grande", 0, 12)); // NOI18N
- org.openide.awt.Mnemonics.setLocalizedText(passwordLabel, org.openide.util.NbBundle.getMessage(FreimapVisualPanel4.class, "FreimapVisualPanel4.passwordLabel.text")); // NOI18N
-
- olsrdLabel.setFont(new java.awt.Font("Lucida Grande", 0, 12)); // NOI18N
- org.openide.awt.Mnemonics.setLocalizedText(olsrdLabel, org.openide.util.NbBundle.getMessage(FreimapVisualPanel4.class, "FreimapVisualPanel4.olsrdLabel.text")); // NOI18N
-
- NameServiceLabel.setFont(new java.awt.Font("Lucida Grande", 0, 12)); // NOI18N
- org.openide.awt.Mnemonics.setLocalizedText(NameServiceLabel, org.openide.util.NbBundle.getMessage(FreimapVisualPanel4.class, "FreimapVisualPanel4.NameServiceLabel.text")); // NOI18N
-
- dotDrawPortLabel.setFont(new java.awt.Font("Lucida Grande", 0, 12)); // NOI18N
- org.openide.awt.Mnemonics.setLocalizedText(dotDrawPortLabel, org.openide.util.NbBundle.getMessage(FreimapVisualPanel4.class, "FreimapVisualPanel4.dotDrawPortLabel.text")); // NOI18N
-
- org.openide.awt.Mnemonics.setLocalizedText(jLabel7, org.openide.util.NbBundle.getMessage(FreimapVisualPanel4.class, "FreimapVisualPanel4.jLabel7.text")); // NOI18N
-
- hostNameLabel.setFont(new java.awt.Font("Lucida Grande", 0, 12)); // NOI18N
- org.openide.awt.Mnemonics.setLocalizedText(hostNameLabel, org.openide.util.NbBundle.getMessage(FreimapVisualPanel4.class, "FreimapVisualPanel4.hostNameLabel.text")); // NOI18N
-
- jLabel8.setFont(new java.awt.Font("Lucida Grande", 0, 12)); // NOI18N
- org.openide.awt.Mnemonics.setLocalizedText(jLabel8, org.openide.util.NbBundle.getMessage(FreimapVisualPanel4.class, "FreimapVisualPanel4.jLabel8.text")); // NOI18N
-
- org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(this);
- this.setLayout(layout);
- layout.setHorizontalGroup(
- layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
- .add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup()
- .addContainerGap(45, Short.MAX_VALUE)
- .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
- .add(layout.createSequentialGroup()
- .add(jLabel6)
- .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
- .add(dotDrawPortLabel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 155, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
- .add(layout.createSequentialGroup()
- .add(jLabel5)
- .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
- .add(NameServiceLabel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 155, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
- .add(layout.createSequentialGroup()
- .add(jLabel4)
- .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
- .add(olsrdLabel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 155, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
- .add(jLabel7, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 315, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
- .add(layout.createSequentialGroup()
- .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
- .add(jLabel2)
- .add(jLabel1)
- .add(jLabel3)
- .add(jLabel8))
- .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
- .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
- .add(hostNameLabel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 155, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
- .add(passwordLabel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 155, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
- .add(UserNameLabel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 155, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
- .add(mySQLLabel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 155, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))))
- .add(31, 31, 31))
- );
- layout.setVerticalGroup(
- layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
- .add(layout.createSequentialGroup()
- .add(20, 20, 20)
- .add(jLabel7)
- .add(19, 19, 19)
- .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
- .add(jLabel8)
- .add(hostNameLabel))
- .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
- .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
- .add(jLabel2)
- .add(mySQLLabel))
- .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
- .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
- .add(jLabel1)
- .add(UserNameLabel))
- .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
- .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
- .add(jLabel3)
- .add(passwordLabel))
- .add(18, 18, 18)
- .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
- .add(jLabel4)
- .add(olsrdLabel))
- .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
- .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
- .add(jLabel5)
- .add(NameServiceLabel))
- .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
- .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
- .add(jLabel6)
- .add(dotDrawPortLabel))
- .addContainerGap(74, Short.MAX_VALUE))
- );
- }// //GEN-END:initComponents
- // Variables declaration - do not modify//GEN-BEGIN:variables
- private javax.swing.JLabel NameServiceLabel;
- private javax.swing.JLabel UserNameLabel;
- private javax.swing.JLabel dotDrawPortLabel;
- private javax.swing.JLabel hostNameLabel;
- private javax.swing.JLabel jLabel1;
- 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.JLabel mySQLLabel;
- private javax.swing.JLabel olsrdLabel;
- private javax.swing.JLabel passwordLabel;
- // End of variables declaration//GEN-END:variables
-}
-
diff --git a/src/freimapgsoc/Bundle.properties b/src/freimapgsoc/Bundle.properties
new file mode 100644
index 0000000..05e37c1
--- /dev/null
+++ b/src/freimapgsoc/Bundle.properties
@@ -0,0 +1,42 @@
+OpenIDE-Module-Name=Wizard
+FreimapVisualPanel1.jLabel1.text=With this Wizard you can configure all OLSRd information.
+FreimapVisualPanel2.logLabel.text=\
+
+FreimapVisualPanel2.jLabel2.text=Password:
+FreimapVisualPanel2.jLabel6.text=:
+FreimapVisualPanel2.jLabel1.text=UserName:
+FreimapVisualPanel2.loadDb.text=Load Avaible Databse
+FreimapVisualPanel2.jButton1.text=Example
+FreimapVisualPanel2.jLabel7.text=Avaible Database:
+FreimapVisualPanel2.portText.text=3306
+FreimapVisualPanel2.jLabel4.text=For security reason you cannot store User/Pass
+FreimapVisualPanel2.connectButton.text=Connect
+FreimapVisualPanel2.jLabel3.text=Insert MySQL Information to store the live Stream
+FreimapVisualPanel3.jLabel1.text=Name Service Plugin:
+FreimapVisualPanel3.jLabel2.text=OLSRd Config File:
+FreimapVisualPanel3.jLabel3.text=DotDraw Plugin Port:
+FreimapVisualPanel3.jButton1.text=Browse
+FreimapVisualPanel3.olsrdPath.text=
+FreimapVisualPanel3.nameServicePath.text=
+FreimapVisualPanel3.dotDrawPort.text=
+FreimapVisualPanel2.jLabel5.text=Database:
+FreimapVisualPanel4.jLabel7.text=You have put this information:
+FreimapVisualPanel2.storeCheck.text=No Store Live Stream
+FreimapVisualPanel3.readConfigButton.text=Read Config File
+FreimapVisualPanel1.jTextArea1.text=With this Wizard you can configure Freimap to store live stream\ntaking data from OLSR.\n\nThere will be 3 steps:\n\n1) Database Information as Username, password, host \nand the name of the database where you want to store live \nstream of the mesh network.\n\n2) OLSRd Information as OLSRd config file position, latlon.js \nposition etc...\n\n3) Confirmation Step
+FreimapVisualPanel4.jLabel1.text=Host:
+FreimapVisualPanel4.jLabel2.text=Database:
+FreimapVisualPanel4.jLabel3.text=UserName:
+FreimapVisualPanel4.jLabel4.text=Password:
+FreimapVisualPanel4.jLabel5.text=OLSRd config file is:
+FreimapVisualPanel4.jLabel6.text=LatLon.js file is:
+FreimapVisualPanel4.jLabel8.text=DotDraw port is:
+FreimapVisualPanel4.hostText.text=
+FreimapVisualPanel4.usernameText.text=
+FreimapVisualPanel4.passwordText.text=
+FreimapVisualPanel4.olsrdText.text=
+FreimapVisualPanel4.nameServiceText.text=
+FreimapVisualPanel4.dotDrawText.text=
+FreimapVisualPanel4.databaseText.text=
+FreimapVisualPanel4.jLabel9.text=:
+FreimapVisualPanel4.portText.text=
diff --git a/src/freimapgsoc/FreimapGSoCAboutBox.form b/src/freimapgsoc/FreimapGSoCAboutBox.form
index 0ea1a38..eb71b0a 100755
--- a/src/freimapgsoc/FreimapGSoCAboutBox.form
+++ b/src/freimapgsoc/FreimapGSoCAboutBox.form
@@ -118,10 +118,10 @@
-
+
-
+
diff --git a/src/freimapgsoc/FreimapVisualPanel1.form b/src/freimapgsoc/FreimapVisualPanel1.form
new file mode 100644
index 0000000..e9d2963
--- /dev/null
+++ b/src/freimapgsoc/FreimapVisualPanel1.form
@@ -0,0 +1,74 @@
+
+
+
diff --git a/src/Wizard/FreimapVisualPanel1.java b/src/freimapgsoc/FreimapVisualPanel1.java
similarity index 52%
rename from src/Wizard/FreimapVisualPanel1.java
rename to src/freimapgsoc/FreimapVisualPanel1.java
index 6380d47..86a4f04 100644
--- a/src/Wizard/FreimapVisualPanel1.java
+++ b/src/freimapgsoc/FreimapVisualPanel1.java
@@ -2,9 +2,10 @@
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
-package Wizard;
+package freimapgsoc;
import javax.swing.JPanel;
+;
public final class FreimapVisualPanel1 extends JPanel {
@@ -15,7 +16,7 @@ public FreimapVisualPanel1() {
@Override
public String getName() {
- return "Step #1";
+ return "Information";
}
/** This method is called from within the constructor to
@@ -27,28 +28,45 @@ public String getName() {
private void initComponents() {
jLabel1 = new javax.swing.JLabel();
+ jScrollPane1 = new javax.swing.JScrollPane();
+ jTextArea1 = new javax.swing.JTextArea();
+ jLabel1.setFont(new java.awt.Font("Lucida Grande", 1, 12));
org.openide.awt.Mnemonics.setLocalizedText(jLabel1, org.openide.util.NbBundle.getMessage(FreimapVisualPanel1.class, "FreimapVisualPanel1.jLabel1.text")); // NOI18N
+ jTextArea1.setColumns(20);
+ jTextArea1.setEditable(false);
+ jTextArea1.setRows(5);
+ jTextArea1.setText(org.openide.util.NbBundle.getMessage(FreimapVisualPanel1.class, "FreimapVisualPanel1.jTextArea1.text")); // NOI18N
+ jScrollPane1.setViewportView(jTextArea1);
+
org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(this);
this.setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(layout.createSequentialGroup()
.addContainerGap()
- .add(jLabel1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
- .addContainerGap())
+ .add(jScrollPane1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 421, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
+ .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
+ .add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup()
+ .addContainerGap(51, Short.MAX_VALUE)
+ .add(jLabel1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 369, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
+ .add(41, 41, 41))
);
layout.setVerticalGroup(
layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(layout.createSequentialGroup()
- .addContainerGap()
- .add(jLabel1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 260, Short.MAX_VALUE)
+ .add(10, 10, 10)
+ .add(jLabel1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 26, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
+ .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
+ .add(jScrollPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 232, Short.MAX_VALUE)
.addContainerGap())
);
}// //GEN-END:initComponents
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JLabel jLabel1;
+ private javax.swing.JScrollPane jScrollPane1;
+ private javax.swing.JTextArea jTextArea1;
// End of variables declaration//GEN-END:variables
}
diff --git a/src/Wizard/FreimapVisualPanel2.form b/src/freimapgsoc/FreimapVisualPanel2.form
similarity index 91%
rename from src/Wizard/FreimapVisualPanel2.form
rename to src/freimapgsoc/FreimapVisualPanel2.form
index 72289c1..4a000a0 100644
--- a/src/Wizard/FreimapVisualPanel2.form
+++ b/src/freimapgsoc/FreimapVisualPanel2.form
@@ -18,10 +18,6 @@
-
-
-
-
@@ -65,9 +61,16 @@
+
+
-
+
+
+
+
+
+
@@ -107,6 +110,7 @@
+
@@ -257,10 +261,23 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Wizard/FreimapVisualPanel2.java b/src/freimapgsoc/FreimapVisualPanel2.java
similarity index 92%
rename from src/Wizard/FreimapVisualPanel2.java
rename to src/freimapgsoc/FreimapVisualPanel2.java
index 0d3df10..2bd9e49 100644
--- a/src/Wizard/FreimapVisualPanel2.java
+++ b/src/freimapgsoc/FreimapVisualPanel2.java
@@ -2,7 +2,7 @@
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
-package Wizard;
+package freimapgsoc;
import java.awt.Color;
import java.sql.Connection;
@@ -46,6 +46,10 @@ public String getPassword() {
return passwordText.getText();
}
+ public boolean getStore(){
+ return storeCheck.isSelected();
+ }
+
/** This method is called from within the constructor to
* initialize the form.
* WARNING: Do NOT modify this code. The content of this method is
@@ -70,6 +74,7 @@ private void initComponents() {
logLabel = new javax.swing.JLabel();
passwordText = new javax.swing.JPasswordField();
jLabel3 = new javax.swing.JLabel();
+ storeCheck = new javax.swing.JCheckBox();
org.openide.awt.Mnemonics.setLocalizedText(connectButton, org.openide.util.NbBundle.getMessage(FreimapVisualPanel2.class, "FreimapVisualPanel2.connectButton.text")); // NOI18N
connectButton.addActionListener(new java.awt.event.ActionListener() {
@@ -86,7 +91,7 @@ public void actionPerformed(java.awt.event.ActionEvent evt) {
portText.setFont(new java.awt.Font("Lucida Grande", 0, 12));
portText.setText(org.openide.util.NbBundle.getMessage(FreimapVisualPanel2.class, "FreimapVisualPanel2.portText.text")); // NOI18N
- dbText.setFont(new java.awt.Font("Lucida Grande", 0, 12));
+ dbText.setFont(new java.awt.Font("Lucida Grande", 0, 12)); // NOI18N
jLabel7.setFont(new java.awt.Font("Lucida Grande", 0, 10));
org.openide.awt.Mnemonics.setLocalizedText(jLabel7, org.openide.util.NbBundle.getMessage(FreimapVisualPanel2.class, "FreimapVisualPanel2.jLabel7.text")); // NOI18N
@@ -124,17 +129,18 @@ public void actionPerformed(java.awt.event.ActionEvent evt) {
passwordText.setFont(new java.awt.Font("Lucida Grande", 0, 12));
+ jLabel3.setFont(new java.awt.Font("Lucida Grande", 1, 13)); // NOI18N
org.openide.awt.Mnemonics.setLocalizedText(jLabel3, org.openide.util.NbBundle.getMessage(FreimapVisualPanel2.class, "FreimapVisualPanel2.jLabel3.text")); // NOI18N
+ storeCheck.setFont(new java.awt.Font("Lucida Grande", 0, 10)); // NOI18N
+ org.openide.awt.Mnemonics.setLocalizedText(storeCheck, org.openide.util.NbBundle.getMessage(FreimapVisualPanel2.class, "FreimapVisualPanel2.storeCheck.text")); // NOI18N
+
org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(this);
this.setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(layout.createSequentialGroup()
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
- .add(layout.createSequentialGroup()
- .add(56, 56, 56)
- .add(jLabel3))
.add(layout.createSequentialGroup()
.add(22, 22, 22)
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
@@ -167,8 +173,14 @@ public void actionPerformed(java.awt.event.ActionEvent evt) {
.addContainerGap()
.add(loadDb, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 166, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
- .add(connectButton, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 106, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))
+ .add(connectButton, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 106, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
+ .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
+ .add(storeCheck)))
.addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
+ .add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup()
+ .addContainerGap(40, Short.MAX_VALUE)
+ .add(jLabel3)
+ .add(62, 62, 62))
);
layout.setVerticalGroup(
layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
@@ -201,7 +213,8 @@ public void actionPerformed(java.awt.event.ActionEvent evt) {
.add(18, 18, 18)
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
.add(loadDb, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 29, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
- .add(connectButton))
+ .add(connectButton)
+ .add(storeCheck))
.addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
}// //GEN-END:initComponents
@@ -211,11 +224,10 @@ public void findDatabase(String host, String port, String username, String passw
logLabel.setText("Getting connection...");
Thread.sleep(1000);
Class.forName("com.mysql.jdbc.Driver");
- c = (Connection) DriverManager.getConnection("jdbc:mysql://" + host + ":" + port + "/" + database, username, password);
+ c = DriverManager.getConnection("jdbc:mysql://" + host + ":" + port + "/" + database, username, password);
if (!c.isClosed()) {
logLabel.setForeground(Color.green);
logLabel.setText("Connected!");
- Thread.sleep(3000);
}
} catch (Exception ex) {
logLabel.setForeground(Color.red);
@@ -230,7 +242,7 @@ private void connectButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN
port = portText.getText();
username = userText.getText();
password = passwordText.getText();
- if (dbText.getSelectedItem().equals(null)) {
+ if (dbText.getSelectedItem().equals("")) {
logLabel.setForeground(Color.red);
logLabel.setText("Select a valid Database!");
} else {
@@ -252,7 +264,6 @@ private void connectButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN
}//GEN-LAST:event_connectButtonActionPerformed
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
-
userText.setText("root");
passwordText.setText("CiscoSte5785");
hostText.setText("127.0.0.1");
@@ -272,9 +283,9 @@ private void loadDbActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:
logLabel.setText("Add host address and port number!");
} else {
Class.forName("com.mysql.jdbc.Driver");
- c = (Connection) DriverManager.getConnection("jdbc:mysql://" + host + ":" + port, username, password);
+ c = DriverManager.getConnection("jdbc:mysql://" + host + ":" + port, username, password);
if (!c.isClosed()) {
- stmt = (Statement) c.createStatement();
+ stmt = c.createStatement();
rss = stmt.executeQuery("SHOW DATABASES");
int i = 0;
while (rss.next()) {
@@ -289,7 +300,6 @@ private void loadDbActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:
logLabel.setForeground(Color.red);
logLabel.setText(ex.getMessage());
}
- // TODO add your handling code here:
}//GEN-LAST:event_loadDbActionPerformed
private String host,port,username,password,database;
private Statement stmt;
@@ -312,6 +322,7 @@ private void loadDbActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:
private javax.swing.JLabel logLabel;
private javax.swing.JPasswordField passwordText;
private javax.swing.JTextField portText;
+ private javax.swing.JCheckBox storeCheck;
private javax.swing.JTextField userText;
// End of variables declaration//GEN-END:variables
}
diff --git a/src/Wizard/FreimapVisualPanel3.form b/src/freimapgsoc/FreimapVisualPanel3.form
similarity index 78%
rename from src/Wizard/FreimapVisualPanel3.form
rename to src/freimapgsoc/FreimapVisualPanel3.form
index 8bc0008..7ba375b 100644
--- a/src/Wizard/FreimapVisualPanel3.form
+++ b/src/freimapgsoc/FreimapVisualPanel3.form
@@ -1,6 +1,10 @@
diff --git a/src/Wizard/FreimapVisualPanel3.java b/src/freimapgsoc/FreimapVisualPanel3.java
similarity index 57%
rename from src/Wizard/FreimapVisualPanel3.java
rename to src/freimapgsoc/FreimapVisualPanel3.java
index a1619b2..ac55715 100644
--- a/src/Wizard/FreimapVisualPanel3.java
+++ b/src/freimapgsoc/FreimapVisualPanel3.java
@@ -2,10 +2,19 @@
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
-package Wizard;
+package freimapgsoc;
+import java.awt.Component;
+import java.io.BufferedReader;
import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.StringTokenizer;
import javax.swing.JFileChooser;
+import javax.swing.JOptionPane;
import javax.swing.JPanel;
public final class FreimapVisualPanel3 extends JPanel {
@@ -20,14 +29,15 @@ public String getName() {
return "OLSRd Configuration";
}
- public String getOlsrPath() {
+ public String getOlsrdPath() {
return olsrdPath.getText();
}
- public String getNameServicePath() {
+ public String getNameServicePath() {
return nameServicePath.getText();
}
- public String getDotDrawPort() {
+
+ public String getDotDrawPort() {
return dotDrawPort.getText();
}
@@ -39,6 +49,7 @@ public String getDotDrawPort() {
// //GEN-BEGIN:initComponents
private void initComponents() {
+ buttonGroup1 = new javax.swing.ButtonGroup();
jLabel1 = new javax.swing.JLabel();
jLabel2 = new javax.swing.JLabel();
jLabel3 = new javax.swing.JLabel();
@@ -46,7 +57,7 @@ private void initComponents() {
nameServicePath = new javax.swing.JTextField();
dotDrawPort = new javax.swing.JTextField();
jButton1 = new javax.swing.JButton();
- jButton2 = new javax.swing.JButton();
+ readConfigButton = new javax.swing.JButton();
jLabel1.setFont(new java.awt.Font("Lucida Grande", 0, 12));
org.openide.awt.Mnemonics.setLocalizedText(jLabel1, org.openide.util.NbBundle.getMessage(FreimapVisualPanel3.class, "FreimapVisualPanel3.jLabel1.text")); // NOI18N
@@ -79,8 +90,13 @@ public void actionPerformed(java.awt.event.ActionEvent evt) {
}
});
- jButton2.setFont(new java.awt.Font("Lucida Grande", 0, 12));
- org.openide.awt.Mnemonics.setLocalizedText(jButton2, org.openide.util.NbBundle.getMessage(FreimapVisualPanel3.class, "FreimapVisualPanel3.jButton2.text")); // NOI18N
+ readConfigButton.setFont(new java.awt.Font("Lucida Grande", 0, 12));
+ org.openide.awt.Mnemonics.setLocalizedText(readConfigButton, org.openide.util.NbBundle.getMessage(FreimapVisualPanel3.class, "FreimapVisualPanel3.readConfigButton.text")); // NOI18N
+ readConfigButton.addActionListener(new java.awt.event.ActionListener() {
+ public void actionPerformed(java.awt.event.ActionEvent evt) {
+ readConfigButtonActionPerformed(evt);
+ }
+ });
org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(this);
this.setLayout(layout);
@@ -88,26 +104,24 @@ public void actionPerformed(java.awt.event.ActionEvent evt) {
layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(layout.createSequentialGroup()
.add(29, 29, 29)
- .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
- .add(layout.createSequentialGroup()
- .add(jLabel3)
- .add(18, 18, 18)
- .add(dotDrawPort, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 126, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
+ .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
+ .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
+ .add(org.jdesktop.layout.GroupLayout.TRAILING, readConfigButton)
+ .add(layout.createSequentialGroup()
+ .add(jLabel2)
+ .add(19, 19, 19)
+ .add(olsrdPath, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 126, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
+ .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
+ .add(jButton1)))
.add(layout.createSequentialGroup()
- .add(jLabel1)
+ .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
+ .add(jLabel3)
+ .add(jLabel1))
.add(18, 18, 18)
- .add(nameServicePath, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 126, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
- .add(layout.createSequentialGroup()
- .add(jLabel2)
- .add(19, 19, 19)
- .add(olsrdPath, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 126, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))
- .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
- .add(jButton1)
- .addContainerGap(49, Short.MAX_VALUE))
- .add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup()
- .addContainerGap(288, Short.MAX_VALUE)
- .add(jButton2)
- .addContainerGap())
+ .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
+ .add(dotDrawPort, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 126, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
+ .add(nameServicePath, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 126, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))))
+ .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
layout.setVerticalGroup(
layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
@@ -118,16 +132,16 @@ public void actionPerformed(java.awt.event.ActionEvent evt) {
.add(jLabel2)
.add(olsrdPath, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
- .add(jButton2)
- .add(20, 20, 20)
+ .add(readConfigButton)
+ .add(53, 53, 53)
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
.add(nameServicePath, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(jLabel1))
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
- .add(dotDrawPort, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
- .add(jLabel3))
- .addContainerGap(109, Short.MAX_VALUE))
+ .add(jLabel3)
+ .add(dotDrawPort, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
+ .addContainerGap(76, Short.MAX_VALUE))
);
}// //GEN-END:initComponents
@@ -145,19 +159,65 @@ private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRS
olsrdPath.setText(file.getPath());
} else if (returnVal == JFileChooser.CANCEL_OPTION) {
System.out.println("Browse command cancelled by user." + "\n");
- } // TODO add your handling code here:
+ }
}//GEN-LAST:event_jButton1ActionPerformed
+
+ private void addPath(){
+ try {
+ olsr = olsrdPath.getText();
+ BufferedReader in = new BufferedReader(new InputStreamReader(new URL("file://" + olsr).openStream()));
+ String line = in.readLine();
+ while (true) {
+ line = in.readLine();
+ if (line == null) {
+ break;
+ }
+ if (line.contains("latlon-file")) {
+ StringTokenizer st = new StringTokenizer(line.substring(31, line.length() - 1), "\"", false);
+ nameServicePath.setText(st.nextToken());
+ }
+ if (line.contains("LoadPlugin \"olsrd_dot_draw.so.0.3\"")) {
+ while (!in.readLine().equals("}")) {
+ String line2 = in.readLine();
+ if (line2.contains("port")) {
+ StringTokenizer st = new StringTokenizer(line2.substring(15, line2.length() - 1), "\"", false);
+ dotDrawPort.setText(st.nextToken());
+ }
+ }
+ }
+ }
+ } catch (MalformedURLException mue) {
+ System.out.println("failed! Invalid server URL: " + olsr);
+ mue.printStackTrace();
+ } catch (IOException ioe) {
+ String s=JOptionPane.showInputDialog(this, "File Not Found!\n Please Insert a valid path: ", "/etc/olsrd.conf");
+ olsrdPath.setText(s);
+ ioe.printStackTrace();
+ }
+ }
+
+ private void readConfigButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_readConfigButtonActionPerformed
+ if (olsrdPath.getText().equals("")) {
+ JOptionPane.showMessageDialog(this, "Will be used the default position for the OLSRd config file!");
+ olsrdPath.setText("/etc/olsrd.conf");
+ addPath();
+ } else {
+ addPath();
+ }
+ }//GEN-LAST:event_readConfigButtonActionPerformed
+ private String olsr;
// Variables declaration - do not modify//GEN-BEGIN:variables
+ private javax.swing.ButtonGroup buttonGroup1;
private javax.swing.JTextField dotDrawPort;
private javax.swing.JButton jButton1;
- private javax.swing.JButton jButton2;
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel2;
private javax.swing.JLabel jLabel3;
private javax.swing.JTextField nameServicePath;
private javax.swing.JTextField olsrdPath;
+ private javax.swing.JButton readConfigButton;
// End of variables declaration//GEN-END:variables
}
diff --git a/src/Wizard/FreimapVisualPanel4.form b/src/freimapgsoc/FreimapVisualPanel4.form
similarity index 64%
rename from src/Wizard/FreimapVisualPanel4.form
rename to src/freimapgsoc/FreimapVisualPanel4.form
index 56b2622..48cb805 100644
--- a/src/Wizard/FreimapVisualPanel4.form
+++ b/src/freimapgsoc/FreimapVisualPanel4.form
@@ -16,42 +16,49 @@
-
-
+
+
-
-
-
-
-
-
-
-
+
+
+
-
+
+
+
+
+
-
+
+
+
+
+
-
-
+
-
-
+
-
-
-
-
+
+
+
+
+
+
+
+
+
+
-
+
@@ -60,47 +67,59 @@
-
+
-
-
+
+
-
-
-
-
-
-
+
-
+
+
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -161,91 +180,93 @@
-
+
-
+
-
+
-
-
-
+
-
+
+
-
+
-
-
-
+
-
+
+
-
+
-
-
-
+
-
+
+
-
+
-
-
-
+
-
+
+
-
+
-
-
-
+
-
+
+
-
+
+
-
+
+
-
+
-
-
-
+
-
+
+
-
+
-
-
+
+
+
+
+
+
+
-
+
+
diff --git a/src/freimapgsoc/FreimapVisualPanel4.java b/src/freimapgsoc/FreimapVisualPanel4.java
new file mode 100644
index 0000000..c415b4c
--- /dev/null
+++ b/src/freimapgsoc/FreimapVisualPanel4.java
@@ -0,0 +1,246 @@
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+package freimapgsoc;
+
+import javax.swing.JPanel;
+import org.openide.util.NbPreferences;
+
+public final class FreimapVisualPanel4 extends JPanel {
+
+ /** Creates new form FreimapVisualPanel4 */
+ public FreimapVisualPanel4() {
+ initComponents();
+ hostText.setText(NbPreferences.forModule(FreimapWizardPanel2.class).get("host", "/etc/olsrdDEF.conf"));
+ databaseText.setText(NbPreferences.forModule(FreimapVisualPanel2.class).get("dbText", "freimapDEF"));
+ portText.setText(NbPreferences.forModule(FreimapVisualPanel2.class).get("port", "3306DEF"));
+ usernameText.setText(NbPreferences.forModule(FreimapVisualPanel2.class).get("username", "rootDEF"));
+ passwordText.setText(NbPreferences.forModule(FreimapVisualPanel2.class).get("password", "DEF"));
+ nameServiceText.setText(NbPreferences.forModule(FreimapVisualPanel2.class).get("nameServicePath", "/var/run/latlon.jsDEF"));
+ dotDrawText.setText(NbPreferences.forModule(FreimapVisualPanel2.class).get("dotDrawPort", "2004DEF"));
+ olsrdText.setText(NbPreferences.forModule(FreimapVisualPanel2.class).get("olsrdPath", "/etc/olsrd.confDEF"));
+ }
+
+ @Override
+ public String getName() {
+ return "Completed Wizard";
+ }
+
+ public String getHost() {
+ return hostText.getText();
+ }
+
+ public String getPort() {
+ return portText.getText();
+ }
+
+ public String getDatabase() {
+ return databaseText.getText();
+ }
+
+ public String getUserName() {
+ return usernameText.getText();
+ }
+
+ public String getPassword() {
+ return passwordText.getText();
+ }
+
+ public String getOlsrdPath(){
+ return olsrdText.getText();
+ }
+
+ public String getDotDrawPort(){
+ return dotDrawText.getText();
+ }
+
+ public String getNameServicePath(){
+ return nameServiceText.getText();
+ }
+
+
+
+
+ /** 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() {
+
+ jLabel7 = new javax.swing.JLabel();
+ jLabel1 = new javax.swing.JLabel();
+ jLabel2 = new javax.swing.JLabel();
+ jLabel3 = new javax.swing.JLabel();
+ jLabel4 = new javax.swing.JLabel();
+ jLabel5 = new javax.swing.JLabel();
+ jLabel6 = new javax.swing.JLabel();
+ jLabel8 = new javax.swing.JLabel();
+ hostText = new javax.swing.JTextField();
+ databaseText = new javax.swing.JTextField();
+ usernameText = new javax.swing.JTextField();
+ passwordText = new javax.swing.JTextField();
+ olsrdText = new javax.swing.JTextField();
+ nameServiceText = new javax.swing.JTextField();
+ dotDrawText = new javax.swing.JTextField();
+ jLabel9 = new javax.swing.JLabel();
+ portText = new javax.swing.JTextField();
+
+ jLabel7.setFont(new java.awt.Font("Lucida Grande", 1, 12)); // NOI18N
+ org.openide.awt.Mnemonics.setLocalizedText(jLabel7, org.openide.util.NbBundle.getMessage(FreimapVisualPanel4.class, "FreimapVisualPanel4.jLabel7.text")); // NOI18N
+
+ jLabel1.setFont(new java.awt.Font("Lucida Grande", 0, 12)); // NOI18N
+ org.openide.awt.Mnemonics.setLocalizedText(jLabel1, org.openide.util.NbBundle.getMessage(FreimapVisualPanel4.class, "FreimapVisualPanel4.jLabel1.text")); // NOI18N
+
+ jLabel2.setFont(new java.awt.Font("Lucida Grande", 0, 12)); // NOI18N
+ org.openide.awt.Mnemonics.setLocalizedText(jLabel2, org.openide.util.NbBundle.getMessage(FreimapVisualPanel4.class, "FreimapVisualPanel4.jLabel2.text")); // NOI18N
+
+ jLabel3.setFont(new java.awt.Font("Lucida Grande", 0, 12)); // NOI18N
+ org.openide.awt.Mnemonics.setLocalizedText(jLabel3, org.openide.util.NbBundle.getMessage(FreimapVisualPanel4.class, "FreimapVisualPanel4.jLabel3.text")); // NOI18N
+
+ jLabel4.setFont(new java.awt.Font("Lucida Grande", 0, 12)); // NOI18N
+ org.openide.awt.Mnemonics.setLocalizedText(jLabel4, org.openide.util.NbBundle.getMessage(FreimapVisualPanel4.class, "FreimapVisualPanel4.jLabel4.text")); // NOI18N
+
+ jLabel5.setFont(new java.awt.Font("Lucida Grande", 0, 12)); // NOI18N
+ org.openide.awt.Mnemonics.setLocalizedText(jLabel5, org.openide.util.NbBundle.getMessage(FreimapVisualPanel4.class, "FreimapVisualPanel4.jLabel5.text")); // NOI18N
+
+ jLabel6.setFont(new java.awt.Font("Lucida Grande", 0, 12)); // NOI18N
+ org.openide.awt.Mnemonics.setLocalizedText(jLabel6, org.openide.util.NbBundle.getMessage(FreimapVisualPanel4.class, "FreimapVisualPanel4.jLabel6.text")); // NOI18N
+
+ jLabel8.setFont(new java.awt.Font("Lucida Grande", 0, 12)); // NOI18N
+ org.openide.awt.Mnemonics.setLocalizedText(jLabel8, org.openide.util.NbBundle.getMessage(FreimapVisualPanel4.class, "FreimapVisualPanel4.jLabel8.text")); // NOI18N
+
+ hostText.setEditable(false);
+ hostText.setText(org.openide.util.NbBundle.getMessage(FreimapVisualPanel4.class, "FreimapVisualPanel4.hostText.text")); // NOI18N
+ hostText.setEnabled(false);
+
+ databaseText.setEditable(false);
+ databaseText.setText(org.openide.util.NbBundle.getMessage(FreimapVisualPanel4.class, "FreimapVisualPanel4.databaseText.text")); // NOI18N
+ databaseText.setEnabled(false);
+
+ usernameText.setEditable(false);
+ usernameText.setText(org.openide.util.NbBundle.getMessage(FreimapVisualPanel4.class, "FreimapVisualPanel4.usernameText.text")); // NOI18N
+ usernameText.setEnabled(false);
+
+ passwordText.setEditable(false);
+ passwordText.setText(org.openide.util.NbBundle.getMessage(FreimapVisualPanel4.class, "FreimapVisualPanel4.passwordText.text")); // NOI18N
+ passwordText.setEnabled(false);
+
+ olsrdText.setEditable(false);
+ olsrdText.setText(org.openide.util.NbBundle.getMessage(FreimapVisualPanel4.class, "FreimapVisualPanel4.olsrdText.text")); // NOI18N
+ olsrdText.setEnabled(false);
+
+ nameServiceText.setEditable(false);
+ nameServiceText.setText(org.openide.util.NbBundle.getMessage(FreimapVisualPanel4.class, "FreimapVisualPanel4.nameServiceText.text")); // NOI18N
+ nameServiceText.setEnabled(false);
+
+ dotDrawText.setEditable(false);
+ dotDrawText.setText(org.openide.util.NbBundle.getMessage(FreimapVisualPanel4.class, "FreimapVisualPanel4.dotDrawText.text")); // NOI18N
+ dotDrawText.setEnabled(false);
+
+ org.openide.awt.Mnemonics.setLocalizedText(jLabel9, org.openide.util.NbBundle.getMessage(FreimapVisualPanel4.class, "FreimapVisualPanel4.jLabel9.text")); // NOI18N
+
+ portText.setEditable(false);
+ portText.setText(org.openide.util.NbBundle.getMessage(FreimapVisualPanel4.class, "FreimapVisualPanel4.portText.text")); // NOI18N
+ portText.setEnabled(false);
+
+ org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(this);
+ this.setLayout(layout);
+ layout.setHorizontalGroup(
+ layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
+ .add(layout.createSequentialGroup()
+ .addContainerGap()
+ .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
+ .add(layout.createSequentialGroup()
+ .add(jLabel4)
+ .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
+ .add(passwordText, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 168, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
+ .add(layout.createSequentialGroup()
+ .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
+ .add(jLabel5)
+ .add(jLabel6)
+ .add(jLabel8))
+ .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
+ .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
+ .add(dotDrawText, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 168, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
+ .add(nameServiceText, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 168, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
+ .add(olsrdText, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 168, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))
+ .add(layout.createSequentialGroup()
+ .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
+ .add(jLabel2)
+ .add(jLabel3)
+ .add(jLabel1))
+ .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
+ .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
+ .add(hostText, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 168, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
+ .add(databaseText, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 168, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
+ .add(layout.createSequentialGroup()
+ .add(usernameText, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 168, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
+ .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
+ .add(jLabel9)
+ .add(10, 10, 10)
+ .add(portText, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 55, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))))
+ .add(jLabel7, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 315, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
+ .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
+ );
+ layout.setVerticalGroup(
+ layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
+ .add(layout.createSequentialGroup()
+ .add(20, 20, 20)
+ .add(jLabel7)
+ .add(18, 18, 18)
+ .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
+ .add(jLabel1)
+ .add(hostText, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
+ .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
+ .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
+ .add(jLabel2)
+ .add(databaseText, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
+ .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
+ .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
+ .add(jLabel3)
+ .add(usernameText, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
+ .add(jLabel9)
+ .add(portText, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
+ .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
+ .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
+ .add(jLabel4)
+ .add(passwordText, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
+ .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
+ .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
+ .add(jLabel5)
+ .add(olsrdText, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
+ .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
+ .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
+ .add(jLabel6)
+ .add(nameServiceText, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
+ .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
+ .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
+ .add(jLabel8)
+ .add(dotDrawText, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
+ .addContainerGap(21, Short.MAX_VALUE))
+ );
+ }// //GEN-END:initComponents
+ // Variables declaration - do not modify//GEN-BEGIN:variables
+ private javax.swing.JTextField databaseText;
+ private javax.swing.JTextField dotDrawText;
+ private javax.swing.JTextField hostText;
+ private javax.swing.JLabel jLabel1;
+ 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.JLabel jLabel9;
+ private javax.swing.JTextField nameServiceText;
+ private javax.swing.JTextField olsrdText;
+ private javax.swing.JTextField passwordText;
+ private javax.swing.JTextField portText;
+ private javax.swing.JTextField usernameText;
+ // End of variables declaration//GEN-END:variables
+}
+
diff --git a/src/Wizard/FreimapWizardAction.java b/src/freimapgsoc/FreimapWizardAction.java
similarity index 98%
rename from src/Wizard/FreimapWizardAction.java
rename to src/freimapgsoc/FreimapWizardAction.java
index fe61474..7ab2afa 100644
--- a/src/Wizard/FreimapWizardAction.java
+++ b/src/freimapgsoc/FreimapWizardAction.java
@@ -1,4 +1,4 @@
-package Wizard;
+package freimapgsoc;
import java.awt.Component;
import java.awt.Dialog;
@@ -74,6 +74,6 @@ private WizardDescriptor.Panel[] getPanels() {
}
public String getName() {
- return "Start Sample Wizard";
+ return "Freimap Wizard Start";
}
}
diff --git a/src/Wizard/FreimapWizardPanel1.java b/src/freimapgsoc/FreimapWizardPanel1.java
similarity index 99%
rename from src/Wizard/FreimapWizardPanel1.java
rename to src/freimapgsoc/FreimapWizardPanel1.java
index 63072e6..44233db 100644
--- a/src/Wizard/FreimapWizardPanel1.java
+++ b/src/freimapgsoc/FreimapWizardPanel1.java
@@ -2,7 +2,7 @@
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
-package Wizard;
+package freimapgsoc;
import java.awt.Component;
import javax.swing.event.ChangeListener;
diff --git a/src/Wizard/FreimapWizardPanel2.java b/src/freimapgsoc/FreimapWizardPanel2.java
similarity index 79%
rename from src/Wizard/FreimapWizardPanel2.java
rename to src/freimapgsoc/FreimapWizardPanel2.java
index c85b3d3..e4219a6 100644
--- a/src/Wizard/FreimapWizardPanel2.java
+++ b/src/freimapgsoc/FreimapWizardPanel2.java
@@ -2,7 +2,7 @@
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
-package Wizard;
+package freimapgsoc;
import java.awt.Component;
import javax.swing.JOptionPane;
@@ -85,11 +85,19 @@ public void readSettings(Object settings) {
}
public void storeSettings(Object settings) {
- ((WizardDescriptor) settings).putProperty("host", ((FreimapVisualPanel2) getComponent()).getHost());
- ((WizardDescriptor) settings).putProperty("username", ((FreimapVisualPanel2) getComponent()).getUserName());
- ((WizardDescriptor) settings).putProperty("password", ((FreimapVisualPanel2) getComponent()).getPassword());
- ((WizardDescriptor) settings).putProperty("dbText", ((FreimapVisualPanel2) getComponent()).getDatabase());
- ((WizardDescriptor) settings).putProperty("port", ((FreimapVisualPanel2) getComponent()).getPort());
+ if (!component.getStore()) {
+ ((WizardDescriptor) settings).putProperty("host", ((FreimapVisualPanel2) getComponent()).getHost());
+ ((WizardDescriptor) settings).putProperty("username", ((FreimapVisualPanel2) getComponent()).getUserName());
+ ((WizardDescriptor) settings).putProperty("password", ((FreimapVisualPanel2) getComponent()).getPassword());
+ ((WizardDescriptor) settings).putProperty("dbText", ((FreimapVisualPanel2) getComponent()).getDatabase());
+ ((WizardDescriptor) settings).putProperty("port", ((FreimapVisualPanel2) getComponent()).getPort());
+ } else {
+ int i=JOptionPane.showConfirmDialog(component, "You have selected \"No Store\" checkbox,\nthe wizard now will be closed.\nAre you sure?", "Freimap Wizard", JOptionPane.OK_CANCEL_OPTION);
+ if (i==0){
+ component.setVisible(false);
+ }
+
+ }
}
@@ -99,7 +107,8 @@ public void validate() throws WizardValidationException {
String port = component.getPort();
String username = component.getUserName();
- if (host.equals("")) {
+
+ if (host.equals("") || host.length() < 2) {
isValid = false;
throw new WizardValidationException(null, "Invalid Host", null);
}
@@ -117,7 +126,6 @@ public void validate() throws WizardValidationException {
}
if (database.equals("")) {
isValid = false;
-
throw new WizardValidationException(null, "Please select a Database", null);
}
diff --git a/src/Wizard/FreimapWizardPanel3.java b/src/freimapgsoc/FreimapWizardPanel3.java
similarity index 92%
rename from src/Wizard/FreimapWizardPanel3.java
rename to src/freimapgsoc/FreimapWizardPanel3.java
index 936defa..035e7ab 100644
--- a/src/Wizard/FreimapWizardPanel3.java
+++ b/src/freimapgsoc/FreimapWizardPanel3.java
@@ -2,7 +2,7 @@
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
-package Wizard;
+package freimapgsoc;
import java.awt.Component;
import javax.swing.JOptionPane;
@@ -80,29 +80,29 @@ protected final void fireChangeEvent() {
// 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) {
-
+ public void readSettings(Object settings) {
}
public void storeSettings(Object settings) {
- ((WizardDescriptor) settings).putProperty("olsrdPath", ((FreimapVisualPanel3)getComponent()).getOlsrPath());
+ ((WizardDescriptor) settings).putProperty("olsrdPath", ((FreimapVisualPanel3)getComponent()).getOlsrdPath());
((WizardDescriptor) settings).putProperty("nameServicePath", ((FreimapVisualPanel3)getComponent()).getNameServicePath());
((WizardDescriptor) settings).putProperty("dotDrawPort", ((FreimapVisualPanel3)getComponent()).getDotDrawPort());
}
public void validate() throws WizardValidationException {
- String olsrdPath=component.getOlsrPath();
+ String olsrdPath=component.getOlsrdPath();
String nameServicePath=component.getNameServicePath();
String dotDrawPort=component.getDotDrawPort();
if(olsrdPath.equals("") && nameServicePath.equals("") && dotDrawPort.equals("")){
- olsrdPath="/etc/olsr.conf";
+ olsrdPath="/etc/olsrd.conf";
nameServicePath="/var/run/latlon.js";
dotDrawPort="2004";
+ JOptionPane.showMessageDialog(component, "Will be used the OLSRd default value");
throw new WizardValidationException(null, "Will be used default value for the following values:\nOLSRd Config File: /etc/olsr.conf\nNameService LatLon.js file: /var/run/latlon.js\ndotDrawPort: 2004 ", null);
- }else if(olsrdPath.equals("") && nameServicePath.equals("")){
+ /*}else if(olsrdPath.equals("") && nameServicePath.equals("")){
olsrdPath="/etc/olsr.conf";
nameServicePath="/var/run/latlon.js";
throw new WizardValidationException(null, "Will be used default value for the following values:\nOLSRd Config File: /etc/olsr.conf\nNameService LatLon.js file: /var/run/latlon.js\n", null);
@@ -123,7 +123,10 @@ public void validate() throws WizardValidationException {
}else if(dotDrawPort.equals("")){
dotDrawPort="2004";
throw new WizardValidationException(null, "Will be used default position: \"/etc/olsr.conf\"", null);
- }
+ }*/
+
+
+ }
}
}
diff --git a/src/Wizard/FreimapWizardPanel4.java b/src/freimapgsoc/FreimapWizardPanel4.java
similarity index 60%
rename from src/Wizard/FreimapWizardPanel4.java
rename to src/freimapgsoc/FreimapWizardPanel4.java
index 7be3c75..4717404 100644
--- a/src/Wizard/FreimapWizardPanel4.java
+++ b/src/freimapgsoc/FreimapWizardPanel4.java
@@ -2,7 +2,7 @@
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
-package Wizard;
+package freimapgsoc;
import java.awt.Component;
import javax.swing.JLabel;
@@ -37,6 +37,10 @@ public HelpCtx getHelp() {
// return new HelpCtx(SampleWizardPanel1.class);
}
+
+
+
+
public boolean isValid() {
// If it is always OK to press Next or Finish, then:
return true;
@@ -79,21 +83,32 @@ protected final void fireChangeEvent() {
// settings object will be the WizardDescriptor, so you can use
// WizardDescriptor.getProperty & putProperty to store information entered
// by the user.
- JLabel hostNameLabel, mySQLLabel, mySQLPortLabel, usernameLabel, passwordLabel, olsrdLabel, NameServicePathLabel, dotDrawPortLabel;
- @Override
+ /*
+ hostNameLabel.setText(NbPreferences.forModule(FreimapWizardPanel2.class).get("host", "localhost"));
+ mySQLLabel.setText(NbPreferences.forModule(FreimapWizardPanel2.class).get("dbText", "freimap"));
+ mySQLPortLabel.setText(NbPreferences.forModule(FreimapWizardPanel2.class).get("port", "3306"));
+ usernameLabel.setText(NbPreferences.forModule(FreimapWizardPanel2.class).get("username", "root"));
+ passwordLabel.setText(NbPreferences.forModule(FreimapWizardPanel2.class).get("password", ""));
+ olsrdLabel.setText(NbPreferences.forModule(FreimapWizardPanel3.class).get("olsrdPath", "/etc/olsrd.conf"));
+ dotDrawPortLabel.setText(NbPreferences.forModule(FreimapWizardPanel3.class).get("dotDrawPort", "2004"));
+ NameServicePathLabel.setText(NbPreferences.forModule(FreimapWizardPanel3.class).get("nameServicePath", "/var/run/latlon.js"));
+ *
+ */
public void readSettings(Object settings) {
- hostNameLabel.setText(NbPreferences.forModule(FreimapWizardPanel2.class).get("host", "localhost"));
- mySQLLabel.setText(NbPreferences.forModule(FreimapWizardPanel2.class).get("dbText", "freimap"));
- mySQLPortLabel.setText(NbPreferences.forModule(FreimapWizardPanel2.class).get("port", "3306"));
- usernameLabel.setText(NbPreferences.forModule(FreimapWizardPanel2.class).get("username", "root"));
- passwordLabel.setText(NbPreferences.forModule(FreimapWizardPanel2.class).get("password", ""));
- olsrdLabel.setText(NbPreferences.forModule(FreimapWizardPanel3.class).get("olsrdPath", "/etc/olsr.conf"));
- dotDrawPortLabel.setText(NbPreferences.forModule(FreimapWizardPanel3.class).get("dotDrawPort", "2004"));
- NameServicePathLabel.setText(NbPreferences.forModule(FreimapWizardPanel3.class).get("nameServicePath", "/var/run/latlon.js"));
}
public void storeSettings(Object settings) {
+ ((WizardDescriptor) settings).putProperty("host", ((FreimapVisualPanel2) getComponent()).getHost());
+ ((WizardDescriptor) settings).putProperty("username", ((FreimapVisualPanel2) getComponent()).getUserName());
+ ((WizardDescriptor) settings).putProperty("password", ((FreimapVisualPanel2) getComponent()).getPassword());
+ ((WizardDescriptor) settings).putProperty("dbText", ((FreimapVisualPanel2) getComponent()).getDatabase());
+ ((WizardDescriptor) settings).putProperty("port", ((FreimapVisualPanel2) getComponent()).getPort());
+ ((WizardDescriptor) settings).putProperty("olsrdPath", ((FreimapVisualPanel3) getComponent()).getOlsrdPath());
+ ((WizardDescriptor) settings).putProperty("nameServicePath", ((FreimapVisualPanel3) getComponent()).getNameServicePath());
+ ((WizardDescriptor) settings).putProperty("dotDrawPort", ((FreimapVisualPanel3) getComponent()).getDotDrawPort());
+
+
}
}
diff --git a/src/freimapgsoc/Test.java b/src/freimapgsoc/Test.java
new file mode 100644
index 0000000..7d0ade0
--- /dev/null
+++ b/src/freimapgsoc/Test.java
@@ -0,0 +1,44 @@
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.*;
+
+public class Test {
+
+ public Test() throws IOException {
+ read();
+ }
+
+ public void read() throws MalformedURLException, IOException {
+
+ String olsr = "file:///etc/olsrd.conf";
+ System.out.println("Fetching data from: " + olsr);
+ System.out.println("This may take a while ... ");
+ BufferedReader in = new BufferedReader(new InputStreamReader(new URL(olsr).openStream()));
+ String line = in.readLine();
+ while (true) {
+ line = in.readLine();
+ if (line == null) {
+ break;
+ }
+ if (line.contains("LoadPlugin \"olsrd_dot_draw.so.0.3\"")) {
+ while(!in.readLine().equals("}")){
+ String line2=in.readLine();
+ if(line2.contains("port")){
+ StringTokenizer st = new StringTokenizer(line2.substring(15, line2.length() - 1), "\"", false);
+ System.out.println(st.nextToken());
+ }
+ }
+
+ }
+
+ }
+ }
+
+ public static void main(String args[]) throws IOException {
+ new Test();
+ }
+}
diff --git a/src/Wizard/layer.xml b/src/freimapgsoc/layer.xml
similarity index 100%
rename from src/Wizard/layer.xml
rename to src/freimapgsoc/layer.xml
diff --git a/test/freimapgsoc/Test.java b/test/freimapgsoc/Test.java
deleted file mode 100644
index c017a4a..0000000
--- a/test/freimapgsoc/Test.java
+++ /dev/null
@@ -1,287 +0,0 @@
-
-import freimapgsoc.Configurator;
-import freimapgsoc.DataSource;
-import freimapgsoc.DataSourceListener;
-import freimapgsoc.Link;
-import freimapgsoc.MapNode;
-import freimapgsoc.InfoPopUp;
-import freimapgsoc.LatLonJsDataSource;
-import freimapgsoc.LinkInfo;
-import freimapgsoc.NodeInfo;
-import freimapgsoc.Utils;
-import freimapgsoc.log;
-import freimapgsoc.xmlDataSource;
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.HashMap;
-import java.util.Hashtable;
-import java.util.Iterator;
-import java.util.StringTokenizer;
-import java.util.Vector;
-import org.w3c.dom.NamedNodeMap;
-import java.io.IOException;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.*;
-
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.parsers.ParserConfigurationException;
-
-import org.w3c.dom.Document;
-import org.w3c.dom.NamedNodeMap;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-import org.xml.sax.SAXException;
-
-public class Test implements DataSource {
-
- private static Vector nodes = new Vector();
- private static Vector links = new Vector();
- HashMap nodeByName = new HashMap();
- public static Configurator config;
- public static HashMap sources;
- //NodeLayer nl;
- long initTime = System.currentTimeMillis() / 1000;
- boolean fetchLinks = true;
-
- public void init(String path) {
- HashMap configuration = new HashMap();
- configuration.put("freimapgsoc.xmlDataSource", path);
- String sServerURL = null;
- try {
- sServerURL = path;
- URL serverURL = new URL(sServerURL);
- System.out.println("fetching node data from URL: " + serverURL);
- System.out.print("This may take a while ... ");
- Document dom = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(serverURL.openStream());
- System.out.println("finished.");
- parseXml(dom);
- } catch (MalformedURLException mue) {
- System.out.println("failed!");
- throw new IllegalStateException("Invalid server URL: " + sServerURL);
- } catch (IOException ioe) {
- log.append("IOException while receiving XML");
- new InfoPopUp("IOException while receiving XML", "ERROR").setVisible(true);
- throw new IllegalStateException("IOException while receiving XML");
- } catch (ParserConfigurationException pce) {
- log.append("Class library broken. No suitable XML parser.");
- new InfoPopUp("Class library broken. No suitable XML parser.", "ERROR").setVisible(true);
- throw new IllegalStateException("Class library broken. No suitable XML parser.");
- } catch (SAXException saxe) {
- log.append("XML Broken. Not Valid.");
- new InfoPopUp("XML Broken. Not Valid.", "ERROR").setVisible(true);
- throw new IllegalStateException("XML broken. Not valid.");
- }
- }
-
- String getValue(Node n) {
- if (n != null) {
- return n.getNodeValue();
- }
-
- return null;
- }
-
- private void parseXml(Document dom) {
- Node ffmap = dom.getElementsByTagName("ffmap").item(0);
- if (ffmap == null) {
- throw new IllegalStateException("XML data contains no tag. Aborting ...");
- }
-
- Node versionNode = ffmap.getAttributes().getNamedItem("version");
- if (versionNode == null || Double.parseDouble(versionNode.getNodeValue()) != 1.0) {
- throw new IllegalStateException("Version info in XML does not exist or is invalid. Aborting ...");
- }
-
- NodeList nl = dom.getElementsByTagName("node");
- int size = nl.getLength();
- for (int i = 0; i < size; i++) {
- Node node = nl.item(i);
- NamedNodeMap attr = node.getAttributes();
- String klass = getValue(attr.getNamedItem("class"));
- String coords = getValue(attr.getNamedItem("coords"));
- String tooltip = getValue(attr.getNamedItem("tooltip"));
- String ip = getValue(attr.getNamedItem("ip"));
- String height = getValue(attr.getNamedItem("height"));
-
- // Skips old geo data for now.
- if (klass != null && klass.equals("old")) {
- continue;
- }
-
- if ((ip != null) && (ip.equals(""))) {
- ip = null; //empty ips == null
- }
- // Use ip or coordinates as fqid if tooltip is missing
- if (tooltip == null) {
- if (ip == null) {
- tooltip = coords;
- } else {
- tooltip = ip;
- }
- }
-
- String[] splitCoords = coords.split("\\s*,\\s*");
-
- if (ip == null) { //we need at least one identifier
- ip = tooltip;
- } else if (ip.indexOf(',') > -1) { //someone abused XML to stuff several ips into a single attribute.
- StringTokenizer stip = new StringTokenizer(ip, ",", false);
- while (stip.hasMoreTokens()) {
- String oneip = stip.nextToken();
- MapNode nnode = new MapNode(oneip, tooltip, Double.parseDouble(splitCoords[1]), Double.parseDouble(splitCoords[0]));
- if (height != null) {
- nnode.attributes.put("height", new Integer(Integer.parseInt(height)));
- }
- nodes.add(nnode);
- nodeByName.put(nnode.id, nnode);
- }
- continue;
- }
- MapNode nnode = new MapNode(ip, tooltip, Double.parseDouble(splitCoords[1]), Double.parseDouble(splitCoords[0]));
- if (height != null) {
- nnode.attributes.put("height", new Integer(Integer.parseInt(height)));
- }
- nodes.add(nnode);
- nodeByName.put(nnode.id, nnode);
- }
- }
-
- public void init(HashMap configuration) {
- throw new UnsupportedOperationException("Not supported yet.");
- }
-
- public Vector getNodeList() {
- throw new UnsupportedOperationException("Not supported yet.");
- }
-
- public Hashtable getNodeAvailability(long time) {
- throw new UnsupportedOperationException("Not supported yet.");
- }
-
- public long getFirstUpdateTime() {
- throw new UnsupportedOperationException("Not supported yet.");
- }
-
- public long getLastUpdateTime() {
- throw new UnsupportedOperationException("Not supported yet.");
- }
-
- public long getLastAvailableTime() {
- throw new UnsupportedOperationException("Not supported yet.");
- }
-
- public long getFirstAvailableTime() {
- throw new UnsupportedOperationException("Not supported yet.");
- }
-
- public long getClosestUpdateTime(long time) {
- throw new UnsupportedOperationException("Not supported yet.");
- }
-
- public MapNode getNodeByName(String id) {
- throw new UnsupportedOperationException("Not supported yet.");
- }
-
- public Vector getLinks(long time) {
- throw new UnsupportedOperationException("Not supported yet.");
- }
-
- public void addDataSourceListener(DataSourceListener dsl) {
- throw new UnsupportedOperationException("Not supported yet.");
- }
-
- public void getLinkProfile(Link link, LinkInfo info) {
- throw new UnsupportedOperationException("Not supported yet.");
- }
-
- public void getLinkCountProfile(MapNode node, NodeInfo info) {
- throw new UnsupportedOperationException("Not supported yet.");
- }
-
- private String stripQuotes(String str) {
- if (str.length() <= 2) {
- return null;
- }
- return str.substring(1, str.length() - 1);
- }
-
- public static void storeLatLon(Vector nodes) {
- latlon = new HashMap();
- for (int i = 0; i < nodes.size(); i++) {
- Vector latlon2 = new Vector();
- latlon2.add(String.format("%.2f", nodes.elementAt(i).lat));
- latlon2.add(String.format("%.2f", nodes.elementAt(i).lon));
- //System.out.println("LatLon vector: " + latlon2);
- //System.out.println("Value:" + nodes.elementAt(i).toString());
- latlon.put(latlon2, nodes.elementAt(i).toString());
-
- }
- }
-
- public static void main(String[] args) {
- String path = "file:/Users/stefanopilla/Desktop/FreiFunk/freimap/trunk/data/ffmap.xml";
- try {
- String id = "xmlFile";
- File f = new File(path);
- String extension = Utils.getExtension(f);
- DataSource source = null;
- if (extension != null) {
- if (extension.equals(Utils.js)) {
- source = new LatLonJsDataSource();
- }
- if (extension.equals(Utils.xml)) {
- source = new xmlDataSource();
- }
- if (extension.equals(Utils.txt)) {
- //IMPLEMENT ME
- // source = new txtDataSource();
- }
- }
- System.out.println("file:" + path);
- source.init(path); //initialize datasource with file's path
- System.out.println("NodeList: " + source.getNodeList());
- System.out.println("LinksList: " + source.getLinks(0));
- nodes = new Vector(); //list of jnow nodes
- links = new Vector(); //list of know links
-
- for (int t = 0; t < links.size(); t++) {
- System.out.println("Links Element(" + t + "):" + links.elementAt(t));
- }
-
- links = source.getLinks(0);
- nodes = source.getNodeList();
- System.out.println(source.getNodeList());
- storeLatLon(nodes);
- System.out.println(latlon);
- for (int k = 0; k < nodes.size(); k++) {
- System.out.println("id: " + nodes.get(k) + " lat: " + nodes.get(k).lat + " lon: " + nodes.get(k).lon);
- //locatedN.addElement(nodes.get(k));
- //System.out.println("to:" + links.get(k).to);
- //System.out.println("from: " + links.get(k).from);
- //System.out.println("HNA:" + links.get(k).HNA);
- //System.out.println("udp:" + links.get(k).udp);
- //System.out.println("udp:" + links.get(k).tcp);
- //System.out.println("udp:" + links.get(k).packets);
- //System.out.println("nlq:" + links.get(k).bytes);
- //System.out.println("etx:" + links.get(k).etx);
- //System.out.println("lq:" + links.get(k).lq);
- //System.out.println("nlq:" + links.get(k).nlq);
- //System.out.println("other:" + links.get(k).other);
- //System.out.println("icmp:" + links.get(k).icmp);
- }
- } catch (Exception ex) {
- ex.printStackTrace();
- return;
- }
- }
-
-
-
- private static HashMap latlon;
-
-}