Description
JUNG — the Java Universal Network/Graph Framework--is a software library that provides a common and extendible language for the modeling, analysis, and visualization of data that can be represented as a graph or network.
Installation
The current version of griffon-jung-plugin is 0.4
To install just issue the following command
Usage
The following nodes will become available on a View script upon installing this plugin
Node |
Property |
Type |
Default |
Required |
Bindable |
Notes |
|---|---|---|---|---|---|---|
basicVisualizationViewer |
graph |
Graph |
|
|
|
either set a value for this property or set a value for the node |
|
graphLayout |
Layout |
|
|
|
either set a value for this property or set a value for the node |
visualizationViewer |
graph |
Graph |
|
|
|
either set a value for this property or set a value for the node |
|
graphLayout |
Layout |
|
|
|
either set a value for this property or set a value for the node |
balloonLayout |
graph |
Forest |
|
|
|
either set a value for this property or set a value for the node |
circleLayout |
graph |
Graph |
|
|
|
either set a value for this property or set a value for the node |
dagLayout |
graph |
Graph |
|
|
|
either set a value for this property or set a value for the node |
frLayout |
graph |
Graph |
|
|
|
either set a value for this property or set a value for the node |
frLayout2 |
graph |
Graph |
|
|
|
either set a value for this property or set a value for the node |
isomLayout |
graph |
Graph |
|
|
|
either set a value for this property or set a value for the node |
kkLayout |
graph |
Graph |
|
|
|
either set a value for this property or set a value for the node |
radialTreeLayout |
graph |
Forest |
|
|
|
either set a value for this property or set a value for the node |
springLayout |
graph |
Graph |
|
|
|
either set a value for this property or set a value for the node |
springLayout2 |
graph |
Graph |
|
|
|
either set a value for this property or set a value for the node |
staticLayout2 |
graph |
Graph |
|
|
|
either set a value for this property or set a value for the node |
treeLayout |
graph |
Forest |
|
|
|
either set a value for this property or set a value for the node |
defaultModalGraphMouse |
|
|
|
|
|
nest it inside a |
You can set a Graph value or graph: property on each layout node, if not specified it will use its parent's graph.
This plugin includes a few vertex decorators that will allow you to tweak a vertex's shape:
griffon.jung.visualization.decorators.BasicVertexShapeTransformer
Constructor signatures are:
- BasicVertexShapeTransformer(groovy.lang.Closure shapeTransformer, boolean cacheShapes = true)
- BasicVertexShapeTransformer(Transformer<V,Shape> shapeTransformer, boolean cacheShapes = true)
- BasicVertexShapeTransformer(Transformer vsf<V,Integer>, Transformer<V,Float> varf, groovy.lang.Closure shapeTransformer, boolean cacheShapes = true)
- BasicVertexShapeTransformer(Transformer vsf<V,Integer>, Transformer<V,Float> varf, Transformer<V,Shape> shapeTransformer, boolean cacheShapes = true)
Either set a Closure or a Transformer<V,Shape> that hols the logic of computing a vertex's (v) shape. This decorator will cache all generated shapes by default.
griffon.jung.visualization.decorators.TemplateVertexShapeTransformer
Constructor signatures are:
- TemplateVertexShapeTransformer(Shape template = new Rectangle2D.Double(0d,0d,1d,1d))
- TemplateVertexShapeTransformer(Transformer vsf<V,Integer>, Transformer<V,Float> varf, Shape template = new Rectangle2D.Double(0d,0d,1d,1d))
You just need to set a template Shape. All shapes will be cached.
| Simplified Transitive Properties Both |
Here is an example graph visualization that uses TemplateVertexShapeTransformer coupled with jSilhouette's Star shape, it also attaches a few decorators and helpers.

For more information consult JUNG's Documentation page, the tutorial is quite good!
History
Version |
Date |
Notes |
|---|---|---|
0.4 |
02-24-11 |
Release sync with Griffon 0.9.2 |
0.3 |
07-22-10 |
Release sync with Griffon 0.9 |
0.2 |
03-01-10 |
Upgraded to Griffon 0.3 |
0.1.1 |
11-16-09 |
fixed a typo on the plugin's descriptor that prevent it from being installed correctly |
0.1 |
09-25-09 |
first release |
1 Comment
Hide/Show CommentsSep 16, 2011
leisurelyj
JUNG lib dependencies declared in the pom.xml file changed so when you add this plugin you only get the jung api libraries. To get the implementation libraries add 'net.sf.jung:jung-graph-impl:2.0'.
Also, for the example above, JSilhouette changed package names from org.kordamp to org.codehaus.griffon.