Skip to content

Commit 17662fd

Browse files
committed
Delete JGraph dependency.
Upgrade JGraphX dependency to 3.4.1.3, and touch up demo. Bring a few release notes up to date.
1 parent 20acb73 commit 17662fd

File tree

7 files changed

+41
-1235
lines changed

7 files changed

+41
-1235
lines changed

README.md

+18-18
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,7 @@ or the
3030
* Eclipse Public License (EPL)
3131
http://www.eclipse.org/org/documents/epl-v10.php
3232

33-
As a recipient of JGraphT, you may choose
34-
which license to receive the code under.
33+
As a recipient of JGraphT, you may choose which license to receive the code under.
3534

3635
For a detailed information on the dual license approach, see https://github.com/jgrapht/jgrapht/wiki/Relicensing.
3736

@@ -41,23 +40,26 @@ Please note that JGraphT is distributed WITHOUT ANY WARRANTY; without even the i
4140

4241
Please refer to the license for details.
4342

44-
## Contents ##
43+
## Release Contents ##
44+
45+
The files below make up the table of contents for a release distribution archive:
4546

4647
- `README.md` this file
4748
- `CONTRIBUTORS.md` list of contributors
4849
- `HISTORY.md` changelog
4950
- `license-EPL.txt` Eclipse Public License 1.0
5051
- `license-LGPL.txt` GNU Lesser General Public License 2.1
5152
- `javadoc/` Javadoc documentation
52-
- `lib/` JGraphT libraries:
53-
- `jgrapht-core-x.y.z.jar` core library
54-
- `jgrapht-demo-x.y.z.jar` demo classes
55-
- `jgrapht-ext-x.y.z.jar` extensions
56-
- `jgrapht-ext-x.y.z-uber.jar` all libraries rolled into one
57-
- `jgrapht-io-x.y.z.jar` Importers/Exporters for various graph formats
58-
- `jgrapht-io-x.y.z-uber.jar` all libraries rolled into one
59-
- `jgraph-a.b.c.jar` JGraph dependency library
60-
- `jgraphx-a.b.c.jar` JGraphX dependency library
53+
- `lib/` JGraphT libraries and dependencies:
54+
- `antlr4-runtime-x.y.jar` ANTLR parser runtime
55+
- `commons-lang3-x.y.jar` Apache Commons Lang library
56+
- `jgrapht-core-x.y.z.jar` core library
57+
- `jgrapht-demo-x.y.z.jar` demo classes
58+
- `jgrapht-ext-x.y.z.jar` extensions
59+
- `jgrapht-ext-x.y.z-uber.jar` all libraries rolled into one
60+
- `jgrapht-io-x.y.z.jar` Importers/Exporters for various graph formats
61+
- `jgrapht-io-x.y.z-uber.jar` all libraries rolled into one
62+
- `jgraphx-a.b.c.jar` JGraphX dependency library
6163
- `source/` complete source tree used to build this release
6264

6365
## Getting Started ##
@@ -115,16 +117,14 @@ Reading the [change history](HISTORY.md) is always recommended.
115117

116118
## Documentation ##
117119

118-
A local copy of the Javadoc HTML files is included in this distribution. The latest version of these files is also available [on-line](http://www.jgrapht.org/javadoc).
120+
A local copy of the Javadoc HTML files is included in the distribution. The latest version of these files is also available [on-line](http://www.jgrapht.org/javadoc).
119121

120122
## Dependencies ##
121123

122124
- JGraphT requires JDK 1.8 or later to build starting with version 1.0.0.
123-
- [JUnit](http://www.junit.org) is a unit testing framework. You need JUnit only if you want to run the unit tests. JUnit is licensed under the terms of the IBM Common Public License. The JUnit tests included with JGraphT have been created using JUnit `3.8.1`.
124-
- [XMLUnit](http://xmlunit.sourceforge.net) extends JUnit with XML capabilities. You need XMLUnit only if you want to run the unit tests. XMLUnit is licensed under the terms of the BSD
125-
License.
126-
- [JGraph](http://sourceforge.net/projects/jgraph) is a graph visualization and editing component. You need JGraph only if you want to create graph visualizations using the JGraphT-to-JGraph adapter. JGraph is licensed under the terms of the GNU Lesser General Public License (LGPL).
127-
- [JGraphX](http://www.jgraph.com/jgraph.html) is the successor to JGraph. You need JGraphX only if you want to use the JGraphXAdapter to visualize the JGraphT graph interactively via JGraphX. JGraphX is licensed under the terms of the BSD license.
125+
- [JUnit](http://www.junit.org) is a unit testing framework. You need JUnit only if you want to run the unit tests. JUnit is licensed under the terms of the IBM Common Public License. The JUnit tests included with JGraphT have been created using JUnit 4.
126+
- [XMLUnit](http://xmlunit.sourceforge.net) extends JUnit with XML capabilities. You need XMLUnit only if you want to run the unit tests. XMLUnit is licensed under the terms of the BSD License.
127+
- [JGraphX](http://www.jgraph.com/jgraph.html) is a graph visualizations and editing component (the successor to the older JGraph library). You need JGraphX only if you want to use the JGraphXAdapter to visualize the JGraphT graph interactively via JGraphX. JGraphX is licensed under the terms of the BSD license.
128128
- [Touchgraph](http://sourceforge.net/projects/touchgraph) is a graph visualization and layout component. You need Touchgraph only if you want to create graph visualizations using the JGraphT-to-Touchgraph converter. Touchgraph is licensed under the terms of an Apache-style License.
129129
- [ANTLR](http://www.antlr.org) is a parser generator. It is used for reading text files containing graph representations, and is only required by the jgrapht-io module. ANTLR v4 is licensed under the terms of the [BSD license](http://www.antlr.org/license.html).
130130

jgrapht-demo/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
<configuration>
3030
<archive>
3131
<manifest>
32-
<mainClass>org.jgrapht.demo.JGraphAdapterDemo</mainClass>
32+
<mainClass>org.jgrapht.demo.JGraphXAdapterDemo</mainClass>
3333
<addClasspath>true</addClasspath>
3434
</manifest>
3535
<manifestEntries>

jgrapht-demo/src/main/java/org/jgrapht/demo/JGraphAdapterDemo.java

-153
This file was deleted.

jgrapht-demo/src/main/java/org/jgrapht/demo/JGraphXAdapterDemo.java

+13-2
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,11 @@ public void init()
7272
// create a visualization using JGraph, via an adapter
7373
jgxAdapter = new JGraphXAdapter<>(g);
7474

75-
getContentPane().add(new mxGraphComponent(jgxAdapter));
75+
setPreferredSize(DEFAULT_SIZE);
76+
mxGraphComponent component = new mxGraphComponent(jgxAdapter);
77+
component.setConnectable(false);
78+
component.getGraph().setAllowDanglingEdges(false);
79+
getContentPane().add(component);
7680
resize(DEFAULT_SIZE);
7781

7882
String v1 = "v1";
@@ -93,8 +97,15 @@ public void init()
9397

9498
// positioning via jgraphx layouts
9599
mxCircleLayout layout = new mxCircleLayout(jgxAdapter);
96-
layout.execute(jgxAdapter.getDefaultParent());
97100

101+
// center the circle
102+
int radius = 100;
103+
layout.setX0((DEFAULT_SIZE.width / 2.0) - radius);
104+
layout.setY0((DEFAULT_SIZE.height / 2.0) - radius);
105+
layout.setRadius(radius);
106+
layout.setMoveCircle(true);
107+
108+
layout.execute(jgxAdapter.getDefaultParent());
98109
// that's all there is to it!...
99110
}
100111
}

jgrapht-ext/pom.xml

+1-14
Original file line numberDiff line numberDiff line change
@@ -82,14 +82,6 @@
8282
<Automatic-Module-Name>org.jgrapht.ext</Automatic-Module-Name>
8383
<Bundle-Vendor>Barak Naveh, John V. Sichi and contributors (see
8484
http://sourceforge.net/projects/jgrapht/)</Bundle-Vendor>
85-
<!-- JGraph (source code at https://github.com/jgraph/legacy-jgraph5.git)
86-
is legacy and it does not have a Maven based build. Therefore it is unlikely
87-
that JGraph will be osgified. To be able to nevertheless use the jgraph-ext
88-
bundle in an OSGi context, we tell the maven bundle plugin to mark the JGraph
89-
dependencies as optional. Consequences: When using jgrapht-ext in an OSGi
90-
context you can not use one of it's classes which require packages from JGraph
91-
(org.jgraph.*). Otherwise you will get ClassNotFoundExceptions. -->
92-
<Import-Package>org.jgraph.*;resolution:=optional,*</Import-Package>
9385
</instructions>
9486
</configuration>
9587
</plugin>
@@ -103,12 +95,7 @@
10395
<dependency>
10496
<groupId>org.tinyjee.jgraphx</groupId>
10597
<artifactId>jgraphx</artifactId>
106-
<version>2.0.0.1</version>
107-
</dependency>
108-
<dependency>
109-
<groupId>jgraph</groupId>
110-
<artifactId>jgraph</artifactId>
111-
<version>5.13.0.0</version>
98+
<version>3.4.1.3</version>
11299
</dependency>
113100
<dependency>
114101
<groupId>junit</groupId>

0 commit comments

Comments
 (0)