Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
pillastefano committed Apr 10, 2010
1 parent a3da2e2 commit 6babeba
Show file tree
Hide file tree
Showing 47 changed files with 1,027 additions and 1,693 deletions.
Binary file removed lib/mysql-connector-java-5.0.5-bin.jar
Binary file not shown.
Binary file added lib/mysql-connector-java-5.1.12-bin.jar
Binary file not shown.
1 change: 1 addition & 0 deletions nbproject/private/private.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
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
Expand Down
4 changes: 3 additions & 1 deletion nbproject/project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ 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.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
Expand All @@ -49,7 +50,8 @@ javac.classpath=\
${file.reference.swingx-bean.jar}:\
${file.reference.swingx.jar}:\
${libs.absolutelayout.classpath}:\
${libs.swing-layout.classpath}
${libs.swing-layout.classpath}:\
${file.reference.mysql-connector-java-5.1.12-bin.jar}
# Space-separated list of extra javac options
javac.compilerargs=
javac.deprecation=false
Expand Down
100 changes: 100 additions & 0 deletions src/FileMngmt/FileMenu.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/

package FileMngmt;

import java.io.BufferedReader;
import java.io.FileReader;
import javax.swing.JMenu;
import javax.swing.JMenuItem;

/**
*
* @author stefanopilla
*/
public class FileMenu {
public FileMenu(String path){
addRecentFile(String path);
}


public void addRecentFile(String path) {
if (verifyRecentFile()) {
recentMenuItem.setEnabled(true);
try {
FileReader fr = new FileReader(path);
BufferedReader reader = new BufferedReader(fr);
String line;
int i = 0;
while ((line = reader.readLine()) != null) {
final String[] result = line.split(",");
for (i = 0; i < result.length; i = i + 2) {
freimapgsoc.LayerForm.recentMenuItem = new JMenuItem(result[i]);
freimapgsoc.LayerForm.recentMenuItem.setToolTipText(result[i + 1]);
freimapgsoc.LayerForm.recentMenuItem.add(freimapgsoc.LayerForm.recentMenuItem, i);
path = result[i + 1];
freimapgsoc.LayerForm.recentMenuItem.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {
freimapgsoc.newRecentFileActionPerformed(evt, path);
}
});


}
reader.close();
fr.close();

}
} catch (IOException e) {
System.out.println(e.getMessage());
}
}
}

/*
public void addRecentFile(final String path, String name) {
try {
if (verifyRecentFile()) {
recentFilesMenu.setEnabled(true);
JMenuItem newRecentFile = new JMenuItem(name);
recentFilesMenu.add(newRecentFile, recentFilesMenu.getItemCount() - 2);
newRecentFile.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
newRecentFileActionPerformed(evt, path);
}
});
newRecentFile.setToolTipText(path);
PrintStream output = new PrintStream(new FileOutputStream(recentFile.getPath()));
output.append(name + "," + path);
} else if (!verifyRecentFile()) {
recentFile.createNewFile();
recentFilesMenu.setEnabled(true);
JMenuItem newRecentFile = new JMenuItem(name);
newRecentFile.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
newRecentFileActionPerformed(evt, path);
}
});
recentFilesMenu.add(newRecentFile, recentFilesMenu.getItemCount() - 2);
newRecentFile.setToolTipText(path);
PrintStream output = new PrintStream(new FileOutputStream(recentFile.getPath()));
output.append(name + "," + path);
}
} catch (FileNotFoundException ex) {
ex.getMessage();
} catch (IOException io) {
io.getMessage();
}
}*/

private boolean verifyRecentFile() {
throw new UnsupportedOperationException("Not yet implemented");
}

private JMenu recentMenu;
}
19 changes: 13 additions & 6 deletions src/PopUp/PopUp.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,12 @@
*/
public class PopUp extends javax.swing.JFrame implements ServiceListener, ServiceTypeListener, ListSelectionListener {

@SuppressWarnings("static-access")
/**
*
* @param ip
* @return
*/
@SuppressWarnings("static-access")
public PopUp(String ip) {
System.out.println("Costructor PopUP(String ip)");
initComponents();
Expand Down Expand Up @@ -362,11 +367,13 @@ public void deleteDuplicate(JList list) {
//IMPLEMENT ME....!
}

/** 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.
*/
/**
* 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.
* @return
*/
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
Expand Down
12 changes: 7 additions & 5 deletions src/PopUp/linkInfo.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,13 @@ public linkInfo() {
initComponents();
}

/** 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.
*/
/**
* 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.
* @return
*/
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
Expand Down
126 changes: 126 additions & 0 deletions src/data/freimapdump.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
# Sequel Pro dump
# Version 1630
# http://code.google.com/p/sequel-pro
#
# Host: 127.0.0.1 (MySQL 5.1.44)
# Database: pinco
# Generation Time: 2010-03-20 22:56:25 +0100
# ************************************************************

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;


# Dump of table FLOWS
# ------------------------------------------------------------

DROP TABLE IF EXISTS `FLOWS`;

CREATE TABLE `FLOWS` (
`RECNUM` bigint(20) unsigned zerofill NOT NULL AUTO_INCREMENT,
`PROBE` varchar(16) NOT NULL DEFAULT '',
`TIME_RECEIVED` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`FLOW_VERSION` tinyint(4) NOT NULL DEFAULT '0',
`SEQUENCE` bigint(20) unsigned zerofill NOT NULL DEFAULT '00000000000000000000',
`SOURCE_IP` varchar(16) NOT NULL DEFAULT '',
`SOURCE_PORT` int(11) NOT NULL DEFAULT '0',
`DEST_IP` varchar(16) NOT NULL DEFAULT '',
`DEST_PORT` int(11) NOT NULL DEFAULT '0',
`NEXT_HOP` varchar(16) NOT NULL DEFAULT '',
`PROTOCOL` int(11) NOT NULL DEFAULT '0',
`TCP_FLAGS` int(11) NOT NULL DEFAULT '0',
`TOS` int(11) NOT NULL DEFAULT '0',
`BYTES` bigint(20) unsigned NOT NULL DEFAULT '0',
`PACKETS` bigint(20) unsigned NOT NULL DEFAULT '0',
`FLOW_BEGIN` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`FLOW_END` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`SOURCE_AS` int(11) NOT NULL DEFAULT '0',
`DEST_AS` int(11) NOT NULL DEFAULT '0',
`SOURCE_MASK` smallint(6) NOT NULL DEFAULT '0',
`DEST_MASK` smallint(6) NOT NULL DEFAULT '0',
PRIMARY KEY (`RECNUM`),
KEY `k_begin` (`FLOW_BEGIN`),
KEY `k_end` (`FLOW_END`),
KEY `k_time` (`TIME_RECEIVED`),
KEY `k_src` (`SOURCE_IP`),
KEY `k_dst` (`DEST_IP`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;



# Dump of table Layer
# ------------------------------------------------------------

DROP TABLE IF EXISTS `Layer`;

CREATE TABLE `Layer` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`srcnode` varchar(32) NOT NULL,
`clock` timestamp NULL DEFAULT NULL,
`destnode` varchar(32) NOT NULL,
PRIMARY KEY (`id`),
KEY `srcnode` (`srcnode`),
KEY `destnode` (`destnode`),
CONSTRAINT `layer_ibfk_1` FOREIGN KEY (`srcnode`) REFERENCES `links` (`src`),
CONSTRAINT `layer_ibfk_2` FOREIGN KEY (`destnode`) REFERENCES `links` (`dest`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;



# Dump of table links
# ------------------------------------------------------------

DROP TABLE IF EXISTS `links`;

CREATE TABLE `links` (
`clock` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`src` varchar(32) NOT NULL DEFAULT '',
`dest` varchar(32) NOT NULL DEFAULT '',
`lq` float DEFAULT NULL,
`nlq` float DEFAULT NULL,
`etx` float DEFAULT NULL,
PRIMARY KEY (`clock`,`src`,`dest`),
KEY `src` (`src`),
KEY `dest` (`dest`),
CONSTRAINT `links_ibfk_2` FOREIGN KEY (`dest`) REFERENCES `nodes` (`ip`),
CONSTRAINT `links_ibfk_1` FOREIGN KEY (`src`) REFERENCES `nodes` (`ip`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;



# Dump of table nodes
# ------------------------------------------------------------

DROP TABLE IF EXISTS `nodes`;

CREATE TABLE `nodes` (
`lon` float DEFAULT '12.5535',
`lat` float DEFAULT '41.8638',
`ip` varchar(32) NOT NULL,
`name` varchar(32) NOT NULL,
`isGateway` binary(1) NOT NULL,
`gatewayIp` varchar(32) NOT NULL,
`uptime` time DEFAULT NULL,
`interfaces` varchar(50) DEFAULT NULL,
PRIMARY KEY (`name`),
KEY `ip` (`ip`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
7 changes: 1 addition & 6 deletions src/data/latlon.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,13 @@ Node('104.128.30.21',52.525982,13.314444,0,'0.0.0.0','relet');
Node('77.87.50.121',52.544476,13.352702,0,'0.0.0.0','tfh-test');
Node('77.87.50.66',52.525986,13.314315,0,'0.0.0.0','fokus-3009');
Node('77.87.50.82',52.525986,13.314317,1,'0.0.0.0','hertz');
Node('104.128.30.21',52.525923,13.314374,0,'0.0.0.0','PincoPallino');
Node('104.128.30.8',52.533921,13.314374,1,'77.87.50.121','Prova1');
Node('104.128.30.51',52.521927,13.374374,0,'0.0.0.0','Prova4');
Node('104.128.30.24',52.545525,13.314374,0,'0.0.0.0','Prova2');
Node('77.87.48.78',52.55925,13.324374,0,'0.0.0.0','Prova3');
Node('104.128.30.51',52.521925,13.374374,0,'0.0.0.0','Prova4');
Link('77.87.50.121','104.128.30.8',1.000,1.000,1.000);
Link('104.128.30.51','104.128.30.21',1.000,0.420,2.383);
Link('104.128.30.51','104.128.30.21',0.851,0.918,1.281);
Link('77.87.48.78','77.87.48.35',0.165,0.596,10.186);
Link('104.128.30.21','104.128.30.51',0.420,1.000,2.383);
Link('104.128.30.21','104.128.30.51',0.910,0.839,1.310);
Link('77.87.48.78','77.87.50.66',1.000,1.000,1.000);
Link('77.87.48.78','77.87.50.72',1.000,1.000,1.000);
Expand All @@ -37,9 +34,7 @@ Link('77.87.50.70','77.87.48.78',1.000,1.000,1.000);
Link('77.87.50.71','77.87.48.78',1.000,1.000,1.000);
Link('77.87.50.72','77.87.48.78',1.000,1.000,1.000);
Link('77.87.50.82','77.87.48.78',1.000,1.000,1.000);
Link('104.128.30.21','104.128.30.21',1.000,0.408,2.452);
Link('77.87.50.66','104.128.30.21',0.655,0.929,1.643);
Link('104.128.30.21','104.128.30.21',0.431,1.000,2.318);
Link('77.87.50.66','77.87.50.82',1.000,1.000,1.000);
Link('77.87.50.70','77.87.50.82',0.988,1.000,1.012);
Link('77.87.50.71','77.87.50.82',1.000,1.000,1.000);
Expand Down
2 changes: 1 addition & 1 deletion src/data/log.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Problem with loading components in MainLayer.java: e.getmessage()
PopUp Message: There aren't input file to draw! Open a file from File -> Open menu
Loading

0 comments on commit 6babeba

Please sign in to comment.