OpenJGraph Release Notes
$Id: RELEASENOTES.html,v 1.5 2002/10/05 07:17:49 jmsalvo Exp $
Release Notes for 0.9.2
Release Notes for 0.9.1
Release Notes for 0.9.0
Release Notes for 0.8.1
Release Notes for 0.8.0
Release Notes for 0.7.6
Release Notes for 0.7.5
Release Notes for 0.7.4
Release Notes for 0.7.3
Release Notes for 0.7.2
OpenJGraph 0.9.2 Release Notes
Most of the changes here were done by John V. Sichi ( jsichi@yahoo.com ).
What's New
- New GraphListener interface - John Sichi
A new interface for listening for graph changes, GraphListener, allows pre and post changes events.
Pre-change events allow preventing of changes to the graph, while post-change events are executed after the changes
has been made to the graph. The previous method of receiving notificatons due to graph changes, via methods defined
in the Graph interface itself, is now declared as deprecated.
- Internal maintenance of adjacent Edges of a Vertex - John Sichi
An internal class with GraphImpl now maintains the adjacent edges of a vertex. As a result of this change,
some methods of GraphImpl now return an unmodifiable collection. These include:
getAdjacentVertices()
getConnectedSet()
getEdge()
getVertexSet()
- Added JUnit test classes - John Sichi
Added package test that handles unit tests on some of the classes.
- Graph Component Labelling - John Sichi
Added LabeledGraphComponent interface. Implementations of this interface now handle labelling of
vertices and edges. Vertex and Edge now extend this interface.
I have also extended this functionality to VisualGraphComponents. Previous method of
labelling via setText() and getText() are now no longer available.
- Radial Tree Layout - me
Added a new layout class for drawing trees in a radial layout.
- Fixes for JDK 1.4 - me
Bug fixes for JDK 1.4 to display VisualGraphs.
OpenJGraph 0.9.1 Release Notes
What's New
- State machine
GraphPanelState now acts as a state machine in that an input to a state
may return the same or a different state. Input can either be mouse or keyboard events,
via the mouseXXX() and keyXXX() methods,
or ChangeStateEvents via the recommendState() method. recommendState()
is automatically called by the processChangeStateEvent() of the GraphPanel() class.
Thanks to Armin Groll
- Euler circle finder
Added a class named EulerCircleFinder that finds the Euler circle in a given graph.
Thanks to David Dannberg
Bug Fixes
- Label of the VisualVertex maybe painted outside of VisualVertex border
When changing the font of a VisualVertex and the new font is wider than the previous font,
the new font may be written outside of the VisualVertex. This was due to a bug in the
rescale() method of VisualVertexPainterImpl, wherein it was not using a
FontMetrics based on the VisualVertex's Font.
This is now fixed by defining a new method getFontMetrics() in VisualGraphComponent,
which is set everytime the font is changed via setFont(). Both VisualVertexPainterImpl
and VisualEdgePainterImpl now uses the getFontMetrics().
Thanks to an anonymous person who reported this bug.
- Reading an XGMML source that is not a VisualGraph will cause an Exception when
opened via GraphToolBar
If the XGMML source has the Graphic attribute of the graph element
set to 0, it indicates a non-visual graph. If such an XGMML source is read via the
GraphToolBar open button, drawing the VisualGraph causes an exception,
because will XGMMLContentHandler return null for getVisualGraph().
This is now fixed such that getVisualGraph() will return a new instance of
VisualGraph that wraps around the Graph object generated as a result of
parsing the XGMML source, even if the XGMML source dis a non-visual graph. The resulting
VisualGraph, just like sample1 and sample2, will have its visual vertices
in random positions.
Thanks to Egon Willighagen for reporting this bug.
- GraphImpl.addEdge( Vertex, Vertex ) no longer requires that the vertices
of the edge being added be already existing in the graph. This makes it consistent with
GraphImpl.addEdge( Edge ).
Thanks to Jürgen Failenschmid
Known Issues
- All known issues in release 0.9.0 are still open
OpenJGraph 0.9.0 Release Notes
What's New
- ArrayList
Changed all usage of Vector to ArrayList. In certain cases, method parameters require a List instead
of explicitly asking for an ArrayList.
- Log4J
IBM's Log4J is used internally in various classes to log debugging, informational, and error messages to a file named
openjgraph.log
- Factory Patterns
Factory pattern is now used for Graphs to create Vertices and Edges
via the GraphFactory interface. Implementations include GraphImplFactory,
DirectedGraphImplFactory, DirectedAcyclicGraphImplFactory, and
WeightedGraphImplFactory classes.
GraphPanelVertexState now uses the Graph's GraphFactory to interactively create a new instances
of a Vertex and Edge.
The addition of the VisualGraphComponentEditorFactory will allow developers to add
custom tab pages to de displayed for a specific VisualGraphComponent selected. Add custom
tab pages by creating an instance of the VisualGraphComponentEditorFactory interface
add registering that instance with the VisualGraph via the
setVisualGraphComponentEditorFactory() and getVisualGraphComponentEditorFactory()
methods.
Factory pattern is again used to determine the Painters for
VisualVertex and VisualEdge, via the methods setVisualVertexPainterFactory(),
getVisualVertexPainterFactory(), setVisualEdgePainterFactory(),
and getVisualEdgePainterFactory() in the VisualGraph class.
These methods allow the factories to be instance-specific instead of global as in the
previous release.
- ForceDirectedLayout
An implementation of a force-directed layout using logarithmic springs as discussed
in Chapter 10 of the book "Graph Drawing". See the example by running
the script runsampleforcedirectedlayout.sh.
- Shape
Minimal customisation of a VisualVertex's shape is now possible via the addition
of the ShapePanelList in GraphTabbedPane.java. This also allows you
to highlight each segment of the shape via a JList on the left side of the tab page.
- Grid
Gridis now a non-proportional grid. This mean that each column can have different number of rows. As a result,
methods appendToBottom() and insertEmptyGrid() were added.
- DTDResolver
The XGMML DTD can now be resolved locally instead of retrieving the
DTD via an HTTP call. Thanks to Egon Willighagen.
- XGMML
VisualGraphs can now be serliazed to and recreated from XGMML to a certain degree.
This works well with straight line graphs. However, the full shape definition of the
VisualVertex is now serialized since the current XGMML DTD does not allow
custom definitions for the shape. The font style and size is also not serialized.
It also does not recreate a VisualGraph from XGMML properly if the
edges are orthogonal, because the state of the OrthogonalLayoutManager
( such as the port points of the edges on a node ) are not serialized into XGMML.
The API for XML serialization has also been reworked to make it easier to use
the same API for different XML applications. For example, XMLToGraphHandler
and XMLToGraphDelegatorHandler uses reflection to call specific
startXXXElement() and endXXXElement() method calls,
using the name of the element as the qualifier.
- Printing
Printing capability ( limited to 1 page ) has been added using
Marty Hall's PrintUtilities class.
http://www.apl.jhu.edu/~hall/java/Swing-Tutorial/Swing-Tutorial-Printing.html
Bug Fixes
- In certain situations, the arrowhead of a DirectedEdge are not drawn. These are caused
by more than one factor: Conversion from double to int, and the Intersection.getIntersection()
method needs to handle the case where there is more than one intersection between two lines
( e.g.: they have the same slope ). This issue is partially addressed, but there are still instances
where the arrowhead is not drawn.
- A rescale() is now forced on a VisualVertex when its GeneralPath is changed
via setGeneralPath().
Known Issues
- Arrowhead drawing and Intersections in general
If the VisualVertex does has curved segments, portions of the arrowhead is drawn
behind the node. This is due to the Intersection.getIntersection() method treating each
segment of the PathIterator as a straight line. This needs to be reworked to determine
the intersection point(s) between any two segments ( straight or curved or quadratic ).
Anyone care to provide the algorithm?
- Printing
Printing is limited to a single page.
- XGMML Serialization
Recreating an orthogonal VisualGraph from XGMML will draw the edges as straight-lines
instead of orthogonal as should be expected. It is easy to draw them back, but not easy what exactly
to do once you drag the vertices after recreting the VisualGraph.
For this to work, the state of the OrthogonalLayoutManager needs serialized too.
Shape of the VisualVertex is not restored, since XGMML currently does not allow custom
shapes.
The font style and size is also not restored, since XGMML does not attributes for these.
OpenJGraph 0.8.1 Release Notes
What's New
- Minimal support for XGMML 1.0 Draft Specification
Support for XGMML 1.0 has been added via the salvo.jesus.graph.xml package. However, the support is minimal
that at this time such that only Strings in a Vertex can be serialized to XGMML. To be more precise,
it currently uses the Vertex.toString() method as the label attribute of a node in XGMML.
There are two serializers in this package: XGMMLDOMSerializer and XGMMLSAXSerializer. Although
SAX was supposed to be only a parser, using the Apache's Xerces XML parser allows serializing via SAX to minimise
the memory required when serializing to an XML file. The class XGMMLReader is used to read an XGMML file.
When using XGMML with OpenJGraph, you will need the Apache Xerces XML parser for Java,
and a Internet connection for the XML parser to retrieve the XGMML DTD from the XGMML site.
I have only tested with Apache Xerces 1.3.0.
Run the script runsamplexgmmlserialization.[sh | bat] for a demonstration. This will create a file graph-xgmml.xml.
For more information about XGMML, see the XGMML 1.0 Draft Specification
- Graph mutator methods now throws Exception
All methods that mutates a Graph now throws an Exception. "Mutate" here means any method that adds or
remove a Vertex or an Edge.
- Tree classes added
A Tree interface and TreeImpl class has been added, together with Tree-specific Exceptions.
Note that although a BinaryTree interface exist, there is currently no implementation for this interface. These
interfaces extends the Graph interface.
The Tree interface is a free-tree. This means that at any point in time, you can always change the root of the Tree
to any of the Vertex in the Tree.
- Tree layout
A new drawing layout called TreeLayout has been added that takes a Tree and draws it using a
vertical layered drawing. Run the script runsampletreelayout.[sh | bat] to view an example.
- Additional methods in the DirectedGraph interface
As a result of a fix to a bug with TopologicalSorting, two methods have been added to the DirectedGraph interface
to easily get the outgoing and incoming adjacent vertices of a Vertex.
- Visitor is now an interface
Visitor is now an interface instead of a class. What was previously the Visitor class is now the
NullVisitor class.
Bugs fixed in this release
- VisualGraphComponents' MouseListeners and MouseMotionListeners was not receiving mouse events
The VisualGraphComponent interface provided methods for adding and removing MouseListeners and
MouseMotionListeners. However, these events were in fact not being sent by the GraphPanel, since
a VisualGraphComponent is neither an AWT or Swing component.
GraphPanelNormalState, GraphPanelVertexState, and GraphPanelEdgeState has been
rectified such that these events are passed on to the VisualGraphComponent.
Thanks to Thierry Bodhuin ( thierry.bodhuin-AT-artal.fr ) for pointing this out and providing a fix.
- Fixed infinite looping with TopologicalSorting
Topoligcal sorting was performing an infinite loop or call stack fault since the method used to determine the adjacent Vertex did not take
into account the direction of the Edge. This means that a method in the Graph interface was used instead
of a method in the DirectedGraph interface.
As a result, two methods have been added to the DirectedGraph interface to easily get the outgoing and
incoming adjacent vertices of a Vertex.
Thanks to Manu Sridharan ( msridhar-AT-mit.edu ) for pointing this out and also providing a fix.
OpenJGraph 0.8.0 Release Notes
License
- Upon requests of other opensource projects that does not use GPL compatible license
that wanted to use OpenJGraph, this release and future releases of OpenJGraph will be
distributed under the LPGL license.
Serialization
- In release 0.7.4, Graph objects are serializable, so long as the objects encapsulated
in vertices are also serializable. VisualGraphs were not really serializable then because
GeneralPath is not serializable and is declared final.
With release 0.8.0, I have overcome that limitation by implementing my own PathIterator
and called it SerializablePathIterator. This allowed us to serialize a GeneralPath.
VisualGraphs are now therefore serializable.
- As a demonstration, a sample application named SampleVisualGraphSerialization has been added
and you can run this via the script runvisualgraphserialization.[sh | bat].
- Please note that such serialization, in particular of VisualGraph, is not intended for long term persistence.
You cannot, for example, serialize a VisualGraph on one platform and deserialize it on another
platform, as this will require instances of classes in the sun package that are specific to each platform.
You also cannot serialize a VisualGraph from a 1.2.2 JVM and deserialize it on a 1.3 JVM,
as the serialVerUID of the Swing classes have changed between 1.2.2 and 1.3.
Moving of classes to new packages
- Several classes have been moved to their new package locations in 0.8.0.
In particular, all classes that represent or store visual attributes of graphs are now in the
salvo.jesus.graph.visual package. Layout managers for VisualGraphs are now in
salvo.jesus.graph.visual.layout.
OpenJGraph 0.7.6 Release Notes
Bugs Fixed
- Fixed a bug in release 0.7.5 where right-clicking on an area that is far away
from an VisualEdge will still show a pop-up menu for the VisualEdge
that is nearest to the point clicked. The bug fix will require that the point that was clicked
be less than 5.0 away from any VisualEdge.
OpenJGraph 0.7.5 Release Notes
Specifying your own Painter Factory
- You can implement your own factory and specify your own Painters
by calling the setFactory() method of VisualVertexPainterFactory and / or
VisualEdgePainterFactory.
- By default, the factories are VisualVertexPainterFactoryImpl
and VisualEdgePainterFactoryImpl and will therefore use VisualVertexPainterImpl
as the default painter for VisualVertex and one of ( VisualEdgePainterImpl,
VisualDirectedEdgePainterImpl, VisualWeightedEdgePainterImpl,
VisualDirectedWeightedEdgePainterImpl ) for VisualEdges, depending on the
type of Edge encapsulated.
Bugs Fixed
- When right-clicking on an area near a VisualEdge, the properties
of a different VisualEdge is sometimes shown instead of the
VisualEdge which is really more closer to the point that was clicked.
This seems to have been fixed by using Line2D.getSegDist() instead of
Line2D.getLineDist().
- Each VisualVertex was having its own instance of an implementation of a Painter,
while VisualGraph.emphasizeSubGraph() replaces the painters with the same
instance, making the behaviour inconsistent. This is now fixed such that a single instance
of an implementation of a Painter is used by several instances of
VisualVertex and VisualEdge.
Coordinates for Position of VisualVertex
- Before, setting the location of a VisualVertex to point ( x, y ) will move
it where ( x, y ) are the upperleft coordinates of the VisualVertex. This is now
changed so that such point is now the center coordinate of the VisualVertex.
Examples
- New sample SampleVisualShortestPathSpanningTree.java is added.
- SampleVisualMinimumSpanningTree.java changed to show a more meaningful / useful
demonstration of change a painter to emphasize the minimum spanning tree of a weighted graph.
OpenJGraph 0.7.4 Release Notes
OpenJGraph 0.7.3 Release Notes
- ShortestPathDijkstraAlgorithm has been changed to use a Heap for its fringe.
- Sample script runtraversal.sh has been added to demonstrate traversal, switching between depth-first search and breadth-first search, and a visitor to control the traversal.
- If you are using Blackdown's JDK 1.2.2 RC4 On Linux and compile the sources using JBuilder 3.5,
running the sample application SampleTraversals either from within JBuilder or from the command line (runtraversal.sh)
will result in a SIGSEGV. The workaround is to run the application with JIT turned off (-Djava.compiler=none)
or run JBuilder with Sun's JDK 1.2.2, making sure that the JDK set for the project is also using Sun's JDK.
OpenJGraph 0.7.2 Release Notes
- Support for shortest path algorithm for weighted graphs are added.
The default and only implementation uses Dijsktra's method.
- The algorithm using Dijkstra's method currently does not use a heap for the fringe,
but the next release will.
- Run the sample application runshortestpath.sh or runshortest.bat.
I encourage everyone to try and test out the shortest path algorithm by creating your
own weighted graph just like in examples/SampleShortestPath.java
and try to predetermine the shortest path spanning tree from a particular vertex and compare
that with the output of this implementation. However, note that there may be more than one
shortest spanning tree for every vertex in a weighted graph.