diff --git a/lib/nblibraries.properties b/lib/nblibraries.properties
index f855391..04a8574 100755
--- a/lib/nblibraries.properties
+++ b/lib/nblibraries.properties
@@ -17,3 +17,9 @@ libs.CopyLibs.classpath=\
${base}/CopyLibs/org-netbeans-modules-java-j2seproject-copylibstask.jar
libs.absolutelayout.classpath=\
${base}/absolutelayout/AbsoluteLayout.jar
+libs.swing-layout.classpath=\
+ ${base}/swing-layout/swing-layout-1.0.4.jar
+libs.swing-layout.javadoc=\
+ ${base}/swing-layout/swing-layout-1.0.4-doc.zip
+libs.swing-layout.src=\
+ ${base}/swing-layout/swing-layout-1.0.4-src.zip
diff --git a/lib/swing-layout/swing-layout-1.0.4-doc.zip b/lib/swing-layout/swing-layout-1.0.4-doc.zip
new file mode 100644
index 0000000..6ea4f2b
Binary files /dev/null and b/lib/swing-layout/swing-layout-1.0.4-doc.zip differ
diff --git a/lib/swing-layout/swing-layout-1.0.4-src.zip b/lib/swing-layout/swing-layout-1.0.4-src.zip
new file mode 100644
index 0000000..ec9836e
Binary files /dev/null and b/lib/swing-layout/swing-layout-1.0.4-src.zip differ
diff --git a/lib/swing-layout/swing-layout-1.0.4.jar b/lib/swing-layout/swing-layout-1.0.4.jar
new file mode 100644
index 0000000..46fe3a2
Binary files /dev/null and b/lib/swing-layout/swing-layout-1.0.4.jar differ
diff --git a/nbproject/build-impl.xml b/nbproject/build-impl.xml
index baf7609..8d75fea 100755
--- a/nbproject/build-impl.xml
+++ b/nbproject/build-impl.xml
@@ -42,23 +42,27 @@ is divided into following sections:
-
-
-
-
-
+
+
+
+
+
-
-
-
+
+
+
+
+
-
+
-
+
+
+
-
+
@@ -113,21 +117,52 @@ is divided into following sections:
or ant -Dplatforms.${platform.active}.home=<path_to_JDK_home> jar (where no properties file is used)
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -162,6 +197,7 @@ is divided into following sections:
+
@@ -177,11 +213,9 @@ is divided into following sections:
-
-
-
-
-
+
+
+
@@ -232,7 +266,8 @@ is divided into following sections:
-
+
+
@@ -271,7 +306,7 @@ is divided into following sections:
-
+
@@ -286,6 +321,7 @@ is divided into following sections:
+
@@ -347,10 +383,11 @@ is divided into following sections:
+
-
-
+
+
@@ -371,8 +408,9 @@ is divided into following sections:
-
-
+
+
+
@@ -399,7 +437,22 @@ is divided into following sections:
COMPILATION SECTION
===================
-->
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -460,10 +513,10 @@ is divided into following sections:
-
+
-
+
@@ -506,7 +559,28 @@ is divided into following sections:
${platform.java} -jar "${dist.jar.resolved}"
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -522,13 +596,16 @@ is divided into following sections:
+
+
+
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/nbproject/genfiles.properties b/nbproject/genfiles.properties
index 2417afd..5fca1bc 100755
--- a/nbproject/genfiles.properties
+++ b/nbproject/genfiles.properties
@@ -4,8 +4,8 @@ build.xml.stylesheet.CRC32=958a1d3e@1.26.1.45
# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
nbproject/build-impl.xml.data.CRC32=56b42000
-nbproject/build-impl.xml.script.CRC32=b81a19ed
-nbproject/build-impl.xml.stylesheet.CRC32=5c621a33@1.26.2.45
+nbproject/build-impl.xml.script.CRC32=727f9f53
+nbproject/build-impl.xml.stylesheet.CRC32=576378a2@1.32.1.45
nbproject/management-build-impl.xml.data.CRC32=add1b344
nbproject/management-build-impl.xml.script.CRC32=253f0558
nbproject/management-build-impl.xml.stylesheet.CRC32=545273be@1.0.0.3
diff --git a/nbproject/private/private.properties b/nbproject/private/private.properties
index abc8363..a726549 100644
--- a/nbproject/private/private.properties
+++ b/nbproject/private/private.properties
@@ -3,5 +3,5 @@ do.depend=false
do.jar=true
javac.debug=true
javadoc.preview=true
-jaxws.endorsed.dir=/Applications/NetBeans/NetBeans 6.7.1.app/Contents/Resources/NetBeans/java2/modules/ext/jaxws21/api:/Applications/NetBeans/NetBeans 6.7.1.app/Contents/Resources/NetBeans/ide11/modules/ext/jaxb/api
-user.properties.file=/Users/stefanopilla/.netbeans/6.7/build.properties
+jaxbwiz.endorsed.dirs=/Applications/NetBeans/NetBeans 6.8.app/Contents/Resources/NetBeans/ide12/modules/ext/jaxb/api
+user.properties.file=/Users/Stefano/.netbeans/6.8/build.properties
diff --git a/nbproject/project.properties b/nbproject/project.properties
index e1243be..b0a9747 100755
--- a/nbproject/project.properties
+++ b/nbproject/project.properties
@@ -20,6 +20,7 @@ debug.test.classpath=\
dist.dir=dist
dist.jar=${dist.dir}/FreimapGSoC.jar
dist.javadoc.dir=${dist.dir}/javadoc
+endorsed.classpath=
excludes=
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
@@ -47,12 +48,13 @@ javac.classpath=\
${file.reference.swing-worker.jar}:\
${file.reference.swingx-bean.jar}:\
${file.reference.swingx.jar}:\
- ${libs.absolutelayout.classpath}
+ ${libs.absolutelayout.classpath}:\
+ ${libs.swing-layout.classpath}
# Space-separated list of extra javac options
javac.compilerargs=
javac.deprecation=false
-javac.source=1.5
-javac.target=1.5
+javac.source=1.6
+javac.target=1.6
javac.test.classpath=\
${javac.classpath}:\
${build.classes.dir}:\
@@ -69,6 +71,12 @@ javadoc.splitindex=true
javadoc.use=true
javadoc.version=false
javadoc.windowtitle=
+jaxbwiz.endorsed.dirs="${netbeans.home}/../ide12/modules/ext/jaxb/api"
+jnlp.codebase.type=local
+jnlp.descriptor=application
+jnlp.enabled=false
+jnlp.offline-allowed=false
+jnlp.signed=false
main.class=freimapgsoc.Start
manifest.file=manifest.mf
meta.inf.dir=${src.dir}/META-INF
diff --git a/src/PopUp/PopUp.form b/src/PopUp/PopUp.form
index 5354221..5303443 100755
--- a/src/PopUp/PopUp.form
+++ b/src/PopUp/PopUp.form
@@ -402,9 +402,6 @@
-
-
-
diff --git a/src/PopUp/PopUp.java b/src/PopUp/PopUp.java
index cde6573..c5a31c0 100755
--- a/src/PopUp/PopUp.java
+++ b/src/PopUp/PopUp.java
@@ -33,7 +33,6 @@
import javax.swing.SwingUtilities;
import javax.swing.event.ListSelectionEvent;
import javax.swing.event.ListSelectionListener;
-import org.jdesktop.application.Action;
/**
*
@@ -95,7 +94,7 @@ public PopUp(MapNode from) {
initComponents();
InetAddress address = null;
try {
- this.jmdns = JmDNS.create(address.getByName(from.id));
+ this.jmdns = JmDNS.create(address.getByName(from.ip));
jmdns.addServiceTypeListener(this);
infoNode(from);
} catch (IOException ex) {
@@ -145,7 +144,7 @@ public PopUp(MapNode from, MapNode to, Link link) {
this.link = link;
aboutNodes();
- n1Ip.setText(from.id);
+ n1Ip.setText(from.ip);
}
@@ -193,10 +192,10 @@ public PopUp(JmDNS jmdns) throws IOException {
}
public void infoNode(MapNode node) {
- n1Ip.setText(node.id);
+ n1Ip.setText(node.ip);
n1Name.setText(node.toString());
n1LatLon.setText(node.lat + " / " + node.lon);
- n1Avail.setText(node.fqid);
+ n1Avail.setText(node.ip);
//System.out.println(node.attributes.values());
Set i = node.attributes.entrySet();
Set keySet = node.attributes.keySet();
@@ -208,7 +207,7 @@ public void infoNode(MapNode node) {
}
public void aboutNodes() {
- n1Ip.setText(from.id);
+ n1Ip.setText(from.ip);
if (from.lat == 0 || from.lat == 0) {
n1LatLon.setText(from.DEFAULT_LAT + "/" + from.DEFAULT_LON);
}
@@ -402,7 +401,7 @@ private void initComponents() {
liveServicesButton = new javax.swing.JButton();
setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
- org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(freimapgsoc.FreimapGSoCApp.class).getContext().getResourceMap(PopUp.class);
+ org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance().getContext().getResourceMap(PopUp.class);
setTitle(resourceMap.getString("Form.title")); // NOI18N
setAlwaysOnTop(true);
setLocationByPlatform(true);
@@ -545,12 +544,11 @@ private void initComponents() {
jLabel3.setName("jLabel3"); // NOI18N
- javax.swing.ActionMap actionMap = org.jdesktop.application.Application.getInstance(freimapgsoc.FreimapGSoCApp.class).getContext().getActionMap(PopUp.class, this);
- addServicesButton.setAction(actionMap.get("addServices")); // NOI18N
addServicesButton.setText(resourceMap.getString("addServicesButton.text")); // NOI18N
addServicesButton.setActionCommand(resourceMap.getString("addServicesButton.actionCommand")); // NOI18N
addServicesButton.setName("addServicesButton"); // NOI18N
+ javax.swing.ActionMap actionMap = org.jdesktop.application.Application.getInstance().getContext().getActionMap(PopUp.class, this);
ReloadServicesButton.setAction(actionMap.get("reloadServices")); // NOI18N
ReloadServicesButton.setText(resourceMap.getString("reloadServices.text")); // NOI18N
ReloadServicesButton.setName("reloadServices"); // NOI18N
@@ -667,14 +665,12 @@ public void run() {
});
}
- @Action
public void addServices() {
new addServices(types, jmdns).setVisible(true);
// jmdns.registerServiceType(types.lastElement().toString());
}
- @Action
public void reloadServices() {
try {
sdLog.append("All Services Reloaded...\n");
diff --git a/src/PopUp/linkInfo.java b/src/PopUp/linkInfo.java
index 4344ee2..67076fc 100644
--- a/src/PopUp/linkInfo.java
+++ b/src/PopUp/linkInfo.java
@@ -36,8 +36,6 @@ private void initComponents() {
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
setName("Form"); // NOI18N
- org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(freimapgsoc.FreimapGSoCApp.class).getContext().getResourceMap(linkInfo.class);
- jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(resourceMap.getString("jPanel1.border.title"))); // NOI18N
jPanel1.setName("jPanel1"); // NOI18N
javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
diff --git a/src/freimapgsoc/DataSource.java b/src/freimapgsoc/DataSource.java
index 41ce919..96ee171 100755
--- a/src/freimapgsoc/DataSource.java
+++ b/src/freimapgsoc/DataSource.java
@@ -46,58 +46,14 @@ The core may also request to retrieve a LinkInfo profile (for Links) or a NodePr
*/
public interface DataSource {
- /* public DataSource(int dataid);{
- createNewDataSource(dataid);
- }*/
-
-
- /*public void createNewDataSource(int dataid) {
-
- if (dataid == 0000) {
- OlsrdDataSource olsr = new OlsrdDataSource();
- if (!currentID.equals("00000")) {
- currentID = String.valueOf(dataid) + String.valueOf(i);
- } else {
- i = 0;
- currentID = String.valueOf(dataid) + String.valueOf(i);
- }
- //OLSR DATASOURCE
- }
- if (dataid == 0001) {
- LatLonJsDataSource latlon = new LatLonJsDataSource();
- if (!currentID.equals("00010")) {
- currentID = String.valueOf(dataid) + String.valueOf(i);
- } else {
- i = 0;
- currentID = String.valueOf(dataid) + String.valueOf(i);
- }
- //NAMESERVICE
- }
- if (dataid == 0010) {
- MysqlDataSource mysql = new MysqlDataSource();
- if (!currentID.equals("00100")) {
- currentID = String.valueOf(dataid) + String.valueOf(i);
- } else {
- i = 0;
- currentID = String.valueOf(dataid) + String.valueOf(i);
- }
- //MYSQL
- }
-
- }
- * */
+ public void init();
/** Initialize this data source with its configuration parameters. **/
- // public HashMap read_conf(HashMap configuration) {
- //}
+ public HashMap read_conf(HashMap configuration);
- /*public String getId() {
- return this.id;
- }
+ public String getId();
- public String getCurrentID(){
- return this.currentID;
- }*/
+ public String getCurrentID();
/** Initialize this data source with path file. **/
//public void init(String path);
@@ -164,12 +120,5 @@ public String getCurrentID(){
public void getLinkCountProfile(MapNode node, NodeInfo info);
- //public String id=null;
- //public int i = 0;
- //String currentID;
- //String currentIDolsr;
- //String currentIDmysql;
- //String currentIDnameservice;
- //String currentIDfile;
}
diff --git a/src/freimapgsoc/Flow.java b/src/freimapgsoc/Flow.java
index 4cf77d4..186c965 100755
--- a/src/freimapgsoc/Flow.java
+++ b/src/freimapgsoc/Flow.java
@@ -61,10 +61,6 @@ private void initComponents() {
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
setName("Form"); // NOI18N
- org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(freimapgsoc.FreimapGSoCApp.class).getContext().getResourceMap(Flow.class);
- jLabel1.setText(resourceMap.getString("jLabel1.text")); // NOI18N
- jLabel1.setName("jLabel1"); // NOI18N
-
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
diff --git a/src/freimapgsoc/LatLonJsDataSource.java b/src/freimapgsoc/LatLonJsDataSource.java
index a55c4e9..e5b1ef8 100755
--- a/src/freimapgsoc/LatLonJsDataSource.java
+++ b/src/freimapgsoc/LatLonJsDataSource.java
@@ -21,6 +21,10 @@
*/
public class LatLonJsDataSource implements DataSource {
+ public LatLonJsDataSource(){
+
+ }
+
public LatLonJsDataSource(String path){
this.init(path);
}
@@ -53,15 +57,15 @@ else if ((line.length() > 4) && (line.substring(0, 4).equals("Link"))) {
addInterfaces(path);
}
} catch (MalformedURLException mue) {
- System.out.println("failed!");
- throw new IllegalStateException("Invalid server URL: " + sServerURL);
+ System.out.println("failed! Invalid server URL: " + sServerURL);
} catch (IOException ioe) {
System.out.println("failed! IOException in LatLonJSDataSource");
ioe.printStackTrace();
}
addInterfaces(path);
config.put(nodes, links);
-
+ Layer l=new Layer(this);
+ l.createLayer();
return config;
}
@@ -408,4 +412,24 @@ public static void main(String[] args) {
public HashMap nodeByName = new HashMap();
public long initTime = System.currentTimeMillis() / 1000;
+ @Override
+ public void init() {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public HashMap read_conf(HashMap configuration) {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public String getId() {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public String getCurrentID() {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
}
diff --git a/src/freimapgsoc/Layer.java b/src/freimapgsoc/Layer.java
index a9a784b..c638df0 100644
--- a/src/freimapgsoc/Layer.java
+++ b/src/freimapgsoc/Layer.java
@@ -16,6 +16,7 @@ public class Layer {
public Layer(DataSource datasource){
this.currentDs=datasource;
+ new MainLayer(currentDs).setVisible(true);
}
public Layer(HashMap, Vector> datasources) {
@@ -40,9 +41,8 @@ public boolean setCurrentTime(long crtTime) {
return false;
}
- /*
+
public void createLayer() {
- currentDs = new DataSource();
try {
sources.put(this.id, currentDs.getCurrentID());
Iterator j = sources.keySet().iterator();
@@ -55,10 +55,9 @@ public void createLayer() {
return;
}
}
-*/
public void initLayout() {
-
+ new MainLayer(currentDs).setVisible(true);
}
public double id;
diff --git a/src/freimapgsoc/LayerForm.form b/src/freimapgsoc/LayerForm.form
index cf8965d..daff577 100644
--- a/src/freimapgsoc/LayerForm.form
+++ b/src/freimapgsoc/LayerForm.form
@@ -25,13 +25,13 @@
-