diff options
| -rw-r--r-- | gs-ui-1.3/gs-ui-1.3-javadoc.jar | bin | 0 -> 1190756 bytes | |||
| -rw-r--r-- | gs-ui-1.3/gs-ui-1.3-javadoc.jar.asc | 17 | ||||
| -rw-r--r-- | gs-ui-1.3/gs-ui-1.3-sources.jar | bin | 0 -> 150783 bytes | |||
| -rw-r--r-- | gs-ui-1.3/gs-ui-1.3-sources.jar.asc | 17 | ||||
| -rw-r--r-- | gs-ui-1.3/gs-ui-1.3.jar | bin | 0 -> 7581232 bytes | |||
| -rw-r--r-- | gs-ui-1.3/gs-ui-1.3.jar.asc | 17 | ||||
| -rw-r--r-- | gs-ui-1.3/gs-ui-1.3.pom | 369 | ||||
| -rw-r--r-- | gs-ui-1.3/gs-ui-1.3.pom.asc | 17 | ||||
| -rw-r--r-- | main/Main.java | 13 | ||||
| -rw-r--r-- | structure/Grid.java | 6 |
10 files changed, 445 insertions, 11 deletions
diff --git a/gs-ui-1.3/gs-ui-1.3-javadoc.jar b/gs-ui-1.3/gs-ui-1.3-javadoc.jar Binary files differnew file mode 100644 index 0000000..f1d03f0 --- /dev/null +++ b/gs-ui-1.3/gs-ui-1.3-javadoc.jar diff --git a/gs-ui-1.3/gs-ui-1.3-javadoc.jar.asc b/gs-ui-1.3/gs-ui-1.3-javadoc.jar.asc new file mode 100644 index 0000000..54170e5 --- /dev/null +++ b/gs-ui-1.3/gs-ui-1.3-javadoc.jar.asc @@ -0,0 +1,17 @@ +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v2 + +iQIcBAABCAAGBQJVI85YAAoJEFcic6tDtcUcvnoP+QFbmAiUFHOY5NzZ+TXory/+ +vPys1yfmc3bDtCrVoSSY7IDBXOKHgWyFbpHvIriFB/03NdbOWeKv4wkwLzaZ1UQB +03fuHjLbzzXgXx5gtH5kjzar04DOMVOt/uAZObtgF+zksHbeJgTX5I/puj2qXYSM +T1d7wh2hqufxwXJFSHfsKO0RS4Q35eqRJffprZG7o40j/1Jew05dxm+7n7jkNyF8 +zXtAEUAd8XCFxyxM/4Mig6aXJn1TZ4GOPgRt/N5WH3MJ12qPIakPUNU7qCyK+VHS +habbi07pmQ0q9maYp1zKcVauOd3jNeDr1jHrvJRZN2oK70jBhNNRMn26WNKU8SFt +YwlxlO3jkzmuKlML2C86eQpLYnqiqEY7080i0BOvWgWuPIFQgBrUOLnBqaNiEl+H +wy0OTWRXtx9nmsIl08OdmqF5IYIyXnUA3Rg9WdxM6dL2HANyNiBf0TT/g7zhrjID +YxZaSI9sb/DFBg6CDAqKR9B9qWo6SceLEX4LYK6uL3Ar9u9QCM+v7gDf+5vs97nt +tQkT/uhPKgFfFuU1Cflm3qlh7/x63qgtq0qT5P3cljKl3Zr7qVGdOuLlqGJyvV6w +A/7pnGK3QeVa8ygir/QZQDoNXla6busU7NWFGcejRL6smoJ5GBPh3bDIIrJyB74/ +j263b0HdiYvEsQHo8V/B +=ddRY +-----END PGP SIGNATURE----- diff --git a/gs-ui-1.3/gs-ui-1.3-sources.jar b/gs-ui-1.3/gs-ui-1.3-sources.jar Binary files differnew file mode 100644 index 0000000..3ea95c3 --- /dev/null +++ b/gs-ui-1.3/gs-ui-1.3-sources.jar diff --git a/gs-ui-1.3/gs-ui-1.3-sources.jar.asc b/gs-ui-1.3/gs-ui-1.3-sources.jar.asc new file mode 100644 index 0000000..2f340b6 --- /dev/null +++ b/gs-ui-1.3/gs-ui-1.3-sources.jar.asc @@ -0,0 +1,17 @@ +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v2 + +iQIcBAABCAAGBQJVI84tAAoJEFcic6tDtcUcP2kP/0YnPFOaKqxqIio68UwHZp7Y +fMfp1a1pJt1Tu93fyr/zGA7MCrJ020pwW4V8qFJrsc/Bz2mV8Q013vTTBc3g/zmy +aClw1WItf5IrNIJ25s66U2xmqzBSzcEKjPIeI6aQfBRa10yQbLQ80hw0XtzoS55p ++ZgtgnoXfgvEDsOi/n5pc24P37JHbX2ZHVHFu2+hi5vhVdih8BUnRntf5Kc/t47r +d/vGEIhEe89UgWJOwsrkkaMDI/9O1/c9A7uvJIrT/nvRLBEbQsyeuZZsmCM0gP5d +ugetYRj6Y8/j0nMspQqYfVATdlTKQCr5rUhREB49hatU8mt9bBIkdXzpYl784zX5 +Vi5HmVBLQx9ETBgItSYfifsT80kcnYu+azJzSXSQiP2Kpyphi4+Za7o+jTGucW/M +ncKciq3kZOVlBpodn2k4Bl0x+uDwMrvyF4roR7X05OPwAQQpRS6Wz4hnDFz24pbC +vSggRZtoDLWdluY9/VgPpzMkC9BZnzwY8mgHX7GMq+gQFF9/BTJhvDx2MTU8qOF0 +P149EIiYL4d47L7djtiale07b3KN1muMeh2d3yFSAwJfL/X2I98eZDgOwz15EGWG +7KyHeJSUzOjfhIk6OGqmol3WrERsE6RRmdOHFfboCdd2yLbtCgiBBve9GnwE63ew +p7sjKHK+gu8hobzH8Jla +=8Uq+ +-----END PGP SIGNATURE----- diff --git a/gs-ui-1.3/gs-ui-1.3.jar b/gs-ui-1.3/gs-ui-1.3.jar Binary files differnew file mode 100644 index 0000000..4661b87 --- /dev/null +++ b/gs-ui-1.3/gs-ui-1.3.jar diff --git a/gs-ui-1.3/gs-ui-1.3.jar.asc b/gs-ui-1.3/gs-ui-1.3.jar.asc new file mode 100644 index 0000000..71d2ced --- /dev/null +++ b/gs-ui-1.3/gs-ui-1.3.jar.asc @@ -0,0 +1,17 @@ +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v2 + +iQIcBAABCAAGBQJVI84tAAoJEFcic6tDtcUcGOYQAJxx6xLnze2kiv6dWSaiJMwc +Lq5IrJPAWn1Ed89g3Ay2E8cYSTwYxGafBkGTyL3KyefS6W2xrnJjhHOj4GckZqSU +O8x6vLJL5/i4uXY3EtN594nRH23U1fXCFz+oVXBREprrUZ9Z+x3DiD3zzjMHCI9H +Js349kbLXkTM9JNdA9I7Zf4rJyENwQznG5Q7X6s2YHebulh9rdJnG9aVGm66Hx5+ +AktlcctqwUd9fdK50lo+UBHOI/RksX88WR+JyNh/mMzRdLJuHyxotAPQl9sXnJdq +qX7P4vI2i4V2parPuk4JFe0weJ0NQCYL//0E81KPABj2F859K6DtsoHn8Zqw5dtw +J0Luj5GNGPirQRPgDdmVc7ewKAKOdJAFmejMAR8ShKNK9E1D+gp/wgbzgsQqy9t0 +f47d2dWOk1WZa5Q5LzU8gpJc4IV7t6EAbbSMj4uS+gkVWpTwRnQcUMl0dsOg8fw+ +Z9bL6zenamyD8boE7e/jCrDMaYvZCm/hD9Y9qtWupbYYX3c95Yy3WTeQSITBAq11 +gdHG6GDPdb3A1wm+h8oI2xVLgB/7Al1a/jnppnDuORZBhAdLKXevef6dYyIa5Ppc +PzYNwjqbybARLW9HtjGtKqGNt8EzMYyipC9eaGYEqJC2ZkcYLKhSg1UM1ItJTXmr +6AuIR0liKH3Oyp+Q4KxH +=Qoor +-----END PGP SIGNATURE----- diff --git a/gs-ui-1.3/gs-ui-1.3.pom b/gs-ui-1.3/gs-ui-1.3.pom new file mode 100644 index 0000000..c32c408 --- /dev/null +++ b/gs-ui-1.3/gs-ui-1.3.pom @@ -0,0 +1,369 @@ +<?xml version="1.0" encoding="UTF-8"?> + <!-- + This file is part of GraphStream <http://graphstream-project.org>. + GraphStream is a library whose purpose is to handle static or dynamic + graph, create them from scratch, file or any source and display them. + This program is free software distributed under the terms of two + licenses, the CeCILL-C license that fits European law, and the GNU + Lesser General Public License. You can use, modify and/ or + redistribute the software under the terms of the CeCILL-C license as + circulated by CEA, CNRS and INRIA at the following URL + <http://www.cecill.info> or under the terms of the GNU LGPL as + published by the Free Software Foundation, either version 3 of the + License, or (at your option) any later version. This program is + distributed in the hope that it will be useful, but WITHOUT ANY + WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. You should have received a copy of the GNU + Lesser General Public License along with this program. If not, see + <http://www.gnu.org/licenses/>. The fact that you are presently + reading this means that you have had knowledge of the CeCILL-C and + LGPL licenses and that you accept their terms. + --> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>org.sonatype.oss</groupId> + <artifactId>oss-parent</artifactId> + <version>7</version> + </parent> + + <groupId>org.graphstream</groupId> + <artifactId>gs-ui</artifactId> + <version>1.3</version> + + <name>gs-ui</name> + <description> + The GraphStream library. With GraphStream you deal with + graphs. Static and Dynamic. You create them from scratch, from a file + or any source. You display and render them. + </description> + <url>http://graphstream-project.org</url> + + <!-- Source code of GraphStream is hosted on GitHub. --> + <scm> + <connection>scm:git:git://github.com/graphstream/gs-ui.git</connection> + <developerConnection>scm:git:git://github.com/graphstream/gs-ui.git</developerConnection> + <url>https://github.com/graphstream/gs-ui</url> + </scm> + + <!-- GraphStream is using the GitHub issue tracker. --> + <issueManagement> + <system>github</system> + <url>https://github.com/graphstream/gs-core/issues</url> + </issueManagement> + + <properties> + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> + <scala.version>2.10.1</scala.version> + </properties> + + <!-- The GraphStream Team. Members are sorted in alphabetically. --> + <developers> + <developer> + <id>sbalev</id> + <name>Stefan Balev</name> + <email>stefan.balev@graphstream-project.org</email> + <organization>LITIS</organization> + <organizationUrl>http://www.litislab.eu</organizationUrl> + </developer> + + <developer> + <id>jbaudry</id> + <name>Julien Baudry</name> + <email>julien.baudry@graphstream-project.org</email> + <organization>LITIS</organization> + <organizationUrl>http://www.litislab.eu</organizationUrl> + </developer> + + <developer> + <id>adutot</id> + <name>Antoine Dutot</name> + <email>antoine.dutot@graphstream-project.org</email> + <organization>LITIS</organization> + <organizationUrl>http://www.litislab.eu</organizationUrl> + </developer> + + <developer> + <id>ypigne</id> + <name>Yoann Pigné</name> + <email>yoann.pigne@graphstream-project.org</email> + <organization>University of Luxembourg</organization> + <organizationUrl>http://www.uni.lu</organizationUrl> + </developer> + + <developer> + <id>gsavin</id> + <name>Guilhelm Savin</name> + <email>guilhelm.savin@graphstream-project.org</email> + <organization>LITIS</organization> + <organizationUrl>http://www.litislab.eu</organizationUrl> + </developer> + </developers> + + <licenses> + <license> + <name>LGPL3</name> + <url>http://www.gnu.org/copyleft/lesser.html</url> + </license> + + <license> + <name>Cecill-C</name> + <url>http://www.cecill.info/licences/Licence_CeCILL-C_V1-en.html + </url> + </license> + </licenses> + + <profiles> + <profile> + <!-- + This profile uses the proguard plugin to reduce the size of the + output jar. It is usefull when combined with nodeps profile which + includes scalalib : size gain is about 9Mo. + --> + <id>proguard</id> + <build> + <plugins> + <plugin> + <groupId>com.github.wvengen</groupId> + <artifactId>proguard-maven-plugin</artifactId> + <executions> + <execution> + <phase>package</phase> + <goals> + <goal>proguard</goal> + </goals> + </execution> + </executions> + <configuration> + <options> + <option>-dontwarn scala.**</option> + <option>-keep public class + org.graphstream.**</option> + </options> + <libs> + <lib>${java.home}/lib/rt.jar</lib> + </libs> + </configuration> + </plugin> + </plugins> + </build> + </profile> + <profile> + <!-- + This profile includes the scalalib in the output jar. One who want + to use this profile has to provide a scalalib folder at the same + hierarchic level that this project and that contains scalalib + classes. + --> + <id>nodeps</id> + <build> + <resources> + <resource> + <directory>../scalalib</directory> + <includes> + <include>scala/**/*.class</include> + </includes> + </resource> + </resources> + </build> + </profile> + <profile> + <!-- + This profile has to be enabled when releasing the package. It will + enable the sign phase. + --> + <id>release</id> + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-gpg-plugin</artifactId> + <configuration> + <keyname><![CDATA[GraphStream Team <team@graphstream-project.org>]]></keyname> + <skip>false</skip> + </configuration> + <executions> + <execution> + <id>sign-artifacts</id> + <phase>package</phase> + <goals> + <goal>sign</goal> + </goals> + </execution> + </executions> + </plugin> + </plugins> + </build> + </profile> + <profile> + <id>scala-2.9.0</id> + <properties> + <scala.version>2.9.0</scala.version> + </properties> + </profile> + <profile> + <id>scala-2.10.1</id> + <properties> + <scala.version>2.10.1</scala.version> + </properties> + </profile> + </profiles> + + <build> + <sourceDirectory>src-scala</sourceDirectory> + <outputDirectory>bin/classes</outputDirectory> + <defaultGoal>compile</defaultGoal> + + <resources> + <!-- Resources other than classes are included here. --> + <!-- --> + </resources> + + <plugins> + <plugin> + <artifactId>maven-compiler-plugin</artifactId> + <version>3.3</version> + <configuration> + <source>1.7</source> + <target>1.7</target> + </configuration> + </plugin> + + <plugin> + <artifactId>maven-eclipse-plugin</artifactId> + <groupId>org.apache.maven.plugins</groupId> + <version>2.9</version> + <configuration> + <sourceIncludes> + <include>**</include> + </sourceIncludes> + </configuration> + </plugin> + + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-jar-plugin</artifactId> + <version>2.6</version> + <configuration> + <excludes> + <exclude>org/graphstream/ui/j2dviewer/renderer/test</exclude> + <exclude>org/graphstream/ui/j2dviewer/renderer/test/**</exclude> + </excludes> + </configuration> + <executions> + <execution> + <id>default-jar</id> + <configuration> + <!--<classifier>${scala.version}</classifier>--> + </configuration> + </execution> + </executions> + </plugin> + + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-javadoc-plugin</artifactId> + <version>2.10.2</version> + <configuration> + <tags> + <tag> + <name>complexity</name> + <placement>a</placement> + <head>Computational Complexity :</head> + </tag> + <tag> + <name>reference</name> + <placement>a</placement> + <head>Scientific Reference :</head> + </tag> + </tags> + <author>true</author> + <nodeprecated>false</nodeprecated> + <nodeprecatedlist>false</nodeprecatedlist> + <noindex>false</noindex> + <nonavbar>false</nonavbar> + <notree>false</notree> + <show>public</show> + <source>1.5</source> + <splitindex>true</splitindex> + <use>true</use> + <version>true</version> + <windowtitle>The GraphStream ${project.version} API</windowtitle> + <includes> + <include>**.scala</include> + </includes> + </configuration> + </plugin> + + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-surefire-plugin</artifactId> + <version>2.18.1</version> + </plugin> + + <plugin> + <groupId>org.scala-tools</groupId> + <artifactId>maven-scala-plugin</artifactId> + <version>2.15.2</version> + <executions> + <execution> + <goals> + <goal>compile</goal> + <goal>testCompile</goal> + </goals> + </execution> + </executions> + <!--<configuration> + <scalaVersion>${scala.version}</scalaVersion> + </configuration>--> + </plugin> + + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-clean-plugin</artifactId> + <version>2.6.1</version> + <configuration> + <filesets> + <fileset> + <directory>bin/</directory> + <includes> + <include>classes.timestamp</include> + </includes> + <followSymlinks>false</followSymlinks> + </fileset> + </filesets> + </configuration> + </plugin> + </plugins> + </build> + + <dependencies> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>4.12</version> + <optional>false</optional> + </dependency> + <dependency> + <groupId>org.graphstream</groupId> + <artifactId>gs-core</artifactId> + <version>${project.version}</version> + <optional>false</optional> + </dependency> + <dependency> + <groupId>org.graphstream</groupId> + <artifactId>gs-algo</artifactId> + <version>${project.version}</version> + <optional>false</optional> + </dependency> + <dependency> + <groupId>org.scala-lang</groupId> + <artifactId>scala-library</artifactId> + <version>${scala.version}</version> + <optional>false</optional> + </dependency> + </dependencies> +</project> diff --git a/gs-ui-1.3/gs-ui-1.3.pom.asc b/gs-ui-1.3/gs-ui-1.3.pom.asc new file mode 100644 index 0000000..92ef141 --- /dev/null +++ b/gs-ui-1.3/gs-ui-1.3.pom.asc @@ -0,0 +1,17 @@ +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v2 + +iQIcBAABCAAGBQJVI84tAAoJEFcic6tDtcUcTBoP/2T2fMfMkEevIGuDkvwnDTlv +M2EVbe8zvUuYoX9AWtvv5K2SmsilCfjhw1mfgcMOa2ckgs2ke6F6u+cAY08yKd/7 +prFUxN8BAVmIp7Z7Dk+APOjfyTKbxCug/zESseN6WUb1Q2z2fsSdDLvHE5olTM+J +Kbi0w7xrBKD0/4WZ17v/P8FC2u2mtQAi9a4/OAqR7bmh09CRfEI9M4RfPfyg/Rjx +O/vxdyPO8TdRlDYfrL992At+GvsEPO1nfRJPP2CHHZEB9xWziET0MDQxrLFicE8G +sRVZuJV+Hp7Z7XDWk63VTtcECCrQbUjX1PGGXlIZsamouUosnuf9WeCtlpgQAYQd +zK6O394Z2rHCF/2ZxIKJle6z0wr7YRg+X/O8nLO4scLPU+JYMn3jKmAQBFGEKJKe +l5lVbYRlRPgFt0wk13G5X+/nvhOrfN+IF1BASGLC/R0aybqz7iPnYxWEDJrFayPq +zJeQJsClq5QeZYgYlNATB/9hKgEjuvryUE+mQ7ZMiD0zYAvcfcOqPetqNxWv/O7r +JYZetfE0CDPEr+p6IOCGX0xghFxpMk+fMxTwbnD7nUqXubykfqWytZXlMap01ycG +okVD0zDcCTKA4n5EeCGeCzyrDbvq8xjm/fR1uO3qjzKSNbpX/3cjtwp70kH/xQT8 +r6Lo4IgCX7utoBQTDZrT +=lZ+K +-----END PGP SIGNATURE----- diff --git a/main/Main.java b/main/Main.java index 26fcc5b..ff9217e 100644 --- a/main/Main.java +++ b/main/Main.java @@ -1,6 +1,5 @@ package main; -import java.awt.RenderingHints.Key; import java.util.ArrayList; import java.util.HashMap; import java.util.Iterator; @@ -16,13 +15,13 @@ public class Main { public static void main(String[] args) { Grid g=new Grid(); - //g.printLinkWeight(); - // System.out.println("Best link : " + g.getBestLinkIndex()); + + System.setProperty("gs.ui.renderer", "org.graphstream.ui.j2dviewer.J2DGraphRenderer"); Graph graph = new SingleGraph("Tutorial 1"); - - ArrayList<Router> grid=g.getGrid(); - ArrayList<ArrayList<Integer>> links=g.getLinks(); + graph.addAttribute("ui.stylesheet", "url('resources/style.css')"); + + ArrayList<Router> grid=g.getGrid(); for(Router r : grid){ graph.addNode(r.name); @@ -30,7 +29,7 @@ public class Main { for(Router r : grid){ String current=r.name; HashMap<Router, Integer> relier=r.getLinks(); - Set k=relier.keySet(); + Set<Router> k=relier.keySet(); Iterator<Router> i=k.iterator(); while(i.hasNext()){ Router currentRouter=i.next(); diff --git a/structure/Grid.java b/structure/Grid.java index 35c82f0..eb76638 100644 --- a/structure/Grid.java +++ b/structure/Grid.java @@ -1,8 +1,6 @@ package structure; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.Random; +import java.util.*; public class Grid { @@ -13,7 +11,7 @@ public class Grid { private Random rand = new Random(); - private static final int maxWeight=100; + private final int maxWeight=100; /** * Build a 3x3 Grid |
