Skip to content

Commit

Permalink
Repair some bugs with .form Netbeans file and refresh everything...
Browse files Browse the repository at this point in the history
  • Loading branch information
Stefano authored and Stefano committed Mar 10, 2010
1 parent 9f5ddb2 commit 9193086
Show file tree
Hide file tree
Showing 25 changed files with 385 additions and 3,795 deletions.
6 changes: 6 additions & 0 deletions lib/nblibraries.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
Binary file added lib/swing-layout/swing-layout-1.0.4-doc.zip
Binary file not shown.
Binary file added lib/swing-layout/swing-layout-1.0.4-src.zip
Binary file not shown.
Binary file added lib/swing-layout/swing-layout-1.0.4.jar
Binary file not shown.
184 changes: 146 additions & 38 deletions nbproject/build-impl.xml

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions nbproject/genfiles.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ [email protected]
# 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=[email protected]
Expand Down
4 changes: 2 additions & 2 deletions nbproject/private/private.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
14 changes: 11 additions & 3 deletions nbproject/project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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}:\
Expand All @@ -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
Expand Down
3 changes: 0 additions & 3 deletions src/PopUp/PopUp.form
Original file line number Diff line number Diff line change
Expand Up @@ -402,9 +402,6 @@
</Component>
<Component class="javax.swing.JButton" name="addServicesButton">
<Properties>
<Property name="action" type="javax.swing.Action" editor="org.netbeans.modules.swingapp.ActionEditor">
<action class="PopUp.PopUp" id="addServices" methodName="addServices"/>
</Property>
<Property name="text" type="java.lang.String" resourceKey="addServicesButton.text"/>
<Property name="actionCommand" type="java.lang.String" resourceKey="addServicesButton.actionCommand"/>
<Property name="name" type="java.lang.String" value="addServicesButton" noResource="true"/>
Expand Down
18 changes: 7 additions & 11 deletions src/PopUp/PopUp.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
import javax.swing.SwingUtilities;
import javax.swing.event.ListSelectionEvent;
import javax.swing.event.ListSelectionListener;
import org.jdesktop.application.Action;

/**
*
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -145,7 +144,7 @@ public PopUp(MapNode from, MapNode to, Link link) {
this.link = link;
aboutNodes();

n1Ip.setText(from.id);
n1Ip.setText(from.ip);

}

Expand Down Expand Up @@ -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();
Expand All @@ -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);
}
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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");
Expand Down
2 changes: 0 additions & 2 deletions src/PopUp/linkInfo.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
59 changes: 4 additions & 55 deletions src/freimapgsoc/DataSource.java
Original file line number Diff line number Diff line change
Expand Up @@ -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<String, Object> read_conf(HashMap<String, Object> configuration) {
//}
public HashMap<String, Object> read_conf(HashMap<String, Object> 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);
Expand Down Expand Up @@ -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;
}

4 changes: 0 additions & 4 deletions src/freimapgsoc/Flow.java
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
30 changes: 27 additions & 3 deletions src/freimapgsoc/LatLonJsDataSource.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@
*/
public class LatLonJsDataSource implements DataSource {

public LatLonJsDataSource(){

}

public LatLonJsDataSource(String path){
this.init(path);
}
Expand Down Expand Up @@ -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;
}

Expand Down Expand Up @@ -408,4 +412,24 @@ public static void main(String[] args) {
public HashMap<String, MapNode> nodeByName = new HashMap<String, MapNode>();
public long initTime = System.currentTimeMillis() / 1000;

@Override
public void init() {
throw new UnsupportedOperationException("Not supported yet.");
}

@Override
public HashMap<String, Object> read_conf(HashMap<String, Object> 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.");
}

}
7 changes: 3 additions & 4 deletions src/freimapgsoc/Layer.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ public class Layer {

public Layer(DataSource datasource){
this.currentDs=datasource;
new MainLayer(currentDs).setVisible(true);
}

public Layer(HashMap<Vector<MapNode>, Vector<Link>> datasources) {
Expand All @@ -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<Double> j = sources.keySet().iterator();
Expand All @@ -55,10 +55,9 @@ public void createLayer() {
return;
}
}
*/

public void initLayout() {

new MainLayer(currentDs).setVisible(true);
}

public double id;
Expand Down
Loading

0 comments on commit 9193086

Please sign in to comment.