JViews 3.0 Graph Layout Release Notes
This document describes the main changes that have been made to the JViews
Graph Layout module since version 2.1.
Incompatibilities
General Changes
Library Changes
Demonstration Changes
Incompatibilities
Package renaming
The ilog.views.graphLayout package has been split into several
packages:
ilog.views.graphlayout
Provides the base classes of the Graph Layout Framework.
ilog.views.graphlayout.bus
Provides a layout algorithm for bus network topologies.
ilog.views.graphlayout.circular
Provides a layout algorithm to display graphs representing
interconnected ring and/or star network topologies.
ilog.views.graphlayout.orthogonallink
Provides a link layout algorithm that reshapes the links of
a graph without moving the nodes.
ilog.views.graphlayout.hierarchical
Provides a layout algorithm that arranges the nodes of the
graph in horizontal or vertical levels, such that the majority of the links
point in the same direction.
ilog.views.graphlayout.radialtree
Provides a layout algorithm that arranges the nodes on concentric
circles around the root of the tree.
ilog.views.graphlayout.random
Provides a layout algorithm that moves the nodes of the graph
at randomly computed positions inside a user-defined region.
ilog.views.graphlayout.springembedder
Provides a layout algorithm that can be used to lay out any
type of graph.
ilog.views.graphlayout.swing
Provides Swing components useful for creating applications
mixing JViews Graph Layout and Swing.
ilog.views.graphlayout.topologicalmesh
Provides a layout algorithm that can be used to lay out cyclic
graphs, both planar and nonplanar.
ilog.views.graphlayout.tree
Provides a layout algorithm that arranges the nodes of a tree
horizontally or vertically, starting from the root of the tree.
ilog.views.graphlayout.uniformlengthedges
Provides a layout algorithm that can be used to lay out any
type of graph; it allows you to specify the length of the links.
Note that the name of the Graph Layout base package has also changed (ilog.views.graphlayout
instead of ilog.views.graphLayout). Due to the package renaming,
the import statements of the code based on JViews 2.1 and
previous versions must be updated. Note that you also need to update IVL
files containing
IlvClusterInfoProperty objects (used for the
Circular Layout), because this class is now located in the package ilog.views.graphlayout.circular.
Modified Behaviors
Several changes to the default behavior concern all the layout algorithms:
-
The call to the method IlvGraphLayout.performLayout() now automatically
redraws the grapher. You no longer need to redraw the grapher after the
layout. To disable this behavior, call the method performLayout(boolean,
boolean) with the second argument at false.
-
The call to the method IlvGraphLayout.performLayout() now automatically
replaces links that are not appropriate with new links that can be reshaped
as required. For instance, links of type IlvOneLinkImage cannot
be reshaped and are replaced with links of type IlvPolylineLinkImage.
If a link connector is needed by the layout algorithm (for instance, to
enable the change of the connection points of the links), it is automatically
installed. To disable this behavior, call the method IlvGraphLayout.setLinkReplacementAllowed(boolean)
or IlvGraphLayout.setLinkConnectorReplacementAllowed(boolean)
with a false argument.
-
The specification of the bus object for the Bus Layout and of the root
node for the Tree Layout are no longer mandatory (default choice if no
specification).
General
Changes
The main general changes are the following:
-
The main JViews Graph Layout classes are now compliant with the JavaBeans
standard.
The new JAR file JViewsBeans.jar is the JAR file suitable to be
used in an IDE. It contains all the JViews classes as well as additional
classes needed to use the beans in an IDE (such as property editor, customizers,
and bean icons).
-
Three new layout algorithms: Hierarchical Layout, Orthogonal Link Layout,
Radial Tree Layout.
-
A new option of the Tree Layout for orthogonal reshape of the links.
-
A new option of the Circular Layout for reducing the total area of the
layout (recommended for large graphs).
-
It is now possible to specify the root cluster for the Circular Layout.
-
A new option of the Uniform Length Edges Layout to indicate whether the
algorithm must try to respect the size of the nodes.
-
It is now possible to apply the Graph Layout algorithms on data that is
not stored in the JViews Graphics Framework IlvGrapher class.
For details, see the class ilog.views.graphlayout.IlvGraphModel.
Library
Changes
New Graph Layout Algorithms
-
Orthogonal Link Layout (ilog.views.graphlayout.orthogonallink.IlvOrthogonalLinkLayout)
-
Hierarchical Layout (ilog.views.graphlayout.hierarchical.IlvHierarchicalLayout)
-
Radial Tree Layout (ilog.views.graphlayout.radialtree.IlvRadialTreeLayout)
New Packages
(New packages containing layout algorithms that
already existed in JViews 2.1 have been mentioned above.)
-
ilog.views.graphlayout.orthogonallink.IlvOrthogonalLinkLayout:
The Orthogonal Link Layout algorithm.
-
ilog.views.graphlayout.hierarchical.IlvHierarchicalLayout: The
Hierarchical Layout algorithm.
-
ilog.views.graphlayout.radialtree: The Radial Tree Layout algorithm.
-
ilog.views.graphlayout.swing: Utilities for integrating Graph
Layout features in Swing applications.
New Classes in ilog.views.graphlayout
-
ilog.views.graphlayout.IlvGraphModel: An abstract class that defines
a suitable generic API for graphs that have to be laid out with JViews
graph layout algorithms.
-
ilog.views.graphlayout.IlvGrapherAdapter: A Graph Model adapter
for JViews graphers (IlvGrapher).
-
ilog.views.graphlayout.GraphModelListener: An interface for objects
that listen for changes in a Graph Model.
-
ilog.views.graphlayout.GraphModelEvent: Encapsulates information
describing changes to a graph.
-
ilog.views.graphlayout.IlvRelativeLinkConnector: A link connector
that preserves the relative location of the specified connection points
with respect to the nodes. (Recommended particularly for Orthogonal Link
Layout and Hierarchical Layout.)
Modified Classes
ilog.views.graphlayout.IlvGraphLayout
-
This class is now a JavaBean.
-
New methods
-
attach(IlvGraphModel): Specifies the Graph
Model to be laid out.
-
getGraphModel: Returns the attached Graph
Model.
-
setGrapher(IlvGrapher): Specifies the JViews
grapher to be laid out.
-
performLayout(boolean, boolean): Performs
the layout with the specified force and redraw arguments.
-
isStructureUpToDate: Replaces the method
isTopologyUpToDate,
which is deprecated.
-
isGeometryUpToDate: Replaces the method
isPositionUpToDate,
which is deprecated.
-
setParametersUpToDate: Replaces the method
parameterChanged,
which is deprecated.
-
setFixed(Object, boolean): Replaces the
method setFixed(IlvGraphic, boolean).
-
isFixed(Object): Replaces the method isFixed(IlvGraphic).
-
supportsPreserveFixedLinks: Indicates if
a layout algorithm is able to preserve the shape of some links.
-
isPreserveFixedLinks: Indicates if the layout
algorithm preserves the shape of the fixed links.
-
setPreserveFixedLinks: Indicates to the layout
algorithm whether it must preserve the shape of the fixed links.
-
unfixAllLinks: Specifies all the links as
non-fixed.
-
setLinkReplacementAllowed: Enables or disables
the link replacement.
-
isLinkReplacementAllowed: Returns true
if replacement of the links is allowed. Returns false otherwise.
-
setLinkConnectorReplacementAllowed: Enables
or disables the link connector replacement.
-
isLinkConnectorReplacementAllowed: Returns
true
if replacement of the link connectors is allowed. Returns
false
otherwise.
-
Modified behaviors
-
performLayout(): Now equivalent to a call
to the method performLayout(boolean, boolean) with the force
argument at false and the redraw argument at true.
(Note that now, by default, the graph is automatically redrawn.)
ilog.views.graphlayout.IlvGraphLayoutReport
-
Now provides special code for the beginning and the
end of the layout process. This allows you, using the GraphLayoutEventListener,
to receive notification about the beginning and the end of the layout process,
without needing to subclass the layout algorithms.
-
New fields
-
NO_RESHAPEABLE_LINK: Returned by getCode()
if all links are fixed.
-
LAYOUT_STARTED: Returned by getCode()
when the layout is started.
-
LAYOUT_FINISHED: Returned by getCode()
when the layout is finished.
ilog.views.graphlayout.bus.IlvBusLayout
-
This class is now a JavaBean.
-
New fields
-
STRAIGHT_LINE_STYLE: Valid argument for
the method setLinkStyle.
-
NO_RESHAPE_STYLE: Valid argument for the
method setLinkStyle.
-
New methods
-
setLinkStyle: Specifies the links reshape
option. If required, all the intermediate points of the links are removed.
-
getLinkStyle: Returns the current link reshape
option.
-
setIndex(Object, index): Replaces the method
setIndex(IlvGraphic,
int).
-
getIndex(Object): Replaces the method getIndex(IlvGraphic).
-
setBus(IlvPolyPointsInterface): Replaces
the method setBus(IlvPolyline).
-
IlvPolyPointsInterface getBus: Replaces
the method IlvPolyline getBus.
-
getConnectionPoint: Returns the connection
point for the links connected to the bus. To be used when non-JViews graphers
are laid out.
-
Modified behaviors
-
getBus: If no bus object is specified, the
method now automatically searches for an appropriate one among the nodes
of the graph.
-
layout(): When an IlvGrapher is
laid out, by default the method now replaces the original links with new
links and removes inappropriate link connectors, if needed. (This actually
depends on the current setting for the link style and on the type of the
links.) To disable this behavior, call the method setLinkReplacementAllowed
and/or setLinkConnectorReplacement with a false argument.
ilog.views.graphlayout.circular.IlvCircularLayout
-
This class is now a JavaBean.
-
New fields
-
STRAIGHT_LINE_STYLE: Valid argument for
the method setLinkStyle.
-
NO_RESHAPE_STYLE: Valid argument for the
method setLinkStyle.
-
New methods
-
setLinkStyle: Specifies the links reshape
option. If required, all the intermediate points of the links are removed.
-
getLinkStyle: Returns the current link reshape
option.
-
setRootClusterId, removeRootClusterId, removeAllRootClusterIds,
getRootClusterIds: Specifies the root clusters.
-
clusterize: This protected method cuts the
graph into clusters.
-
setStarCenter(Object, boolean),isStarCenter(Object),
setClusterId(Object, IlvClusterId), setClusterId(Object, IlvClusterId,
int), addClusterId(Object, IlvClusterId), addClusterId(Object, IlvClusterId,
int), removeClusterId(Object, IlvClusterId), removeAllClusterIds(Object),
getClusterIds(Object), getClusterIdsCount(Object), getIndex(Object, IlvClusterId):
Replace the methods with IlvGraphic arguments.
-
setAreaMinimizationEnabled, isAreaMinimizationEnabled:
Enable or disable the "reduced radius" mode (recommended for large graphs).
-
Modified behaviors
-
layout(): If no cluster information is provided
for a JViews grapher (IlvGrapher), the method now automatically
searches for IlvClusterInfoProperty objects.
-
layout() When an IlvGrapher is
laid out, by default the method now replaces the original links with new
links and removes inappropriate link connectors, if needed. (This actually
depends on the current setting for the link style and on the type of the
links.) To disable this behavior, call the method setLinkReplacementAllowed
and/or setLinkConnectorReplacement with a false argument.
ilog.views.graphlayout.topologicalmesh.IlvTopologicalMeshLayout
-
This class is now a JavaBean.
-
New fields
-
STRAIGHT_LINE_STYLE: Valid argument for
the method setLinkStyle.
-
NO_RESHAPE_STYLE: Valid argument for the
method setLinkStyle.
-
New methods
-
setLinkStyle: Specifies the links reshape
option. If required, all the intermediate points of the links are removed.
-
getLinkStyle: Returns the current link reshape
option.
-
isExteriorNode: Indicates if a node belongs
to the exterior cycle.
-
setFixed(Object, boolean): Replaces the
method setFixed(IlvGraphic, boolean).
-
isFixed(Object): Replaces the method isFixed(IlvGraphic).
-
setStartingNode(Object): Replaces the method
setStartingNode(IlvGraphic).
-
Object getStartingNode: Replaces the method
IlvGraphic
getStartingNode.
-
getIndex(Object): Replaces the method getIndex(IlvGraphic).
-
setBus(IlvPolyPointsInterface): Replaces
the method setBus(IlvPolyline).
-
IlvPolyPointsInterface getBus: Replaces
the method IlvPolyline getBus.
-
getConnectionPoint: Returns the connection
point for the links connected to the bus. To be used when non-JViews graphers
are laid out.
-
Modified behaviors
-
layout(): When an IlvGrapher is
laid out, by default the method now replaces the original links with new
links and removes inappropriate link connectors, if needed. (This actually
depends on the current setting for the link style and on the type of the
links.) To disable this behavior, call the method setLinkReplacementAllowed
and/or setLinkConnectorReplacement with a false argument.
ilog.views.graphlayout.tree.IlvTreeLayout
-
This class is now a JavaBean.
-
New fields
-
STRAIGHT_LINE_STYLE: Valid argument for
the method setLinkStyle.
-
ORTHOGONAL_STYLE: Valid argument for the
method setLinkStyle.
-
NO_RESHAPE_STYLE: Valid argument for the
method setLinkStyle.
-
New methods
-
setLinkStyle: Specifies the links reshape
option. If required, the links are reshaped in an orthogonal or straight-line
style.
-
getLinkStyle: Returns the current link reshape
option.
-
setRoot(Object): Replaces the method setRoot(IlvGraphic).
-
Object getRoot: Replaces the method IlvGraphic
getRoot.
-
getBendCoordinate: Returns the coordinate
of the bends for the Orthogonal link style.
-
Modified behaviors
-
getRoot(): If no root is specified, the
method now returns an arbitrary node, if any.
-
layout(): the algorithm now moves the connection
points of the links to appropriate locations.
-
layout(): When an IlvGrapher is
laid out, by default the method now replaces the original links with new
links and removes inappropriate link connectors, if needed. (This actually
depends on the current setting for the link style and on the type of the
links.) To disable this behavior, call the method setLinkReplacementAllowed
and/or setLinkConnectorReplacement with a false argument.
ilog.views.graphlayout.springembedder.IlvSpringEmbedderLayout
-
This class is now a JavaBean.
-
New fields
-
STRAIGHT_LINE_STYLE: Valid argument for
the method setLinkStyle.
-
NO_RESHAPE_STYLE: Valid argument for the
method setLinkStyle.
-
New methods
-
setLinkStyle: Specifies the links reshape
option. If required, all the intermediate points of the links are removed.
-
getLinkStyle: Returns the current link reshape
option.
-
Modified behaviors
-
layout(): When an IlvGrapher is
laid out, by default the method now replaces the original links with new
links and removes inappropriate link connectors, if needed. (This actually
depends on the current setting for the link style and on the type of the
links.) To disable this behavior, call the method setLinkReplacementAllowed
and/or setLinkConnectorReplacement with a false argument.
ilog.views.graphlayout.uniformlengthedges.IlvUniformLengthEdgesLayout
-
This class is now a JavaBean.
-
New fields
-
STRAIGHT_LINE_STYLE: Valid argument for
the method setLinkStyle.
-
NO_RESHAPE_STYLE: Valid argument for the
method setLinkStyle.
-
New methods
-
setLinkStyle: Specifies the links reshape
option. If required, all the intermediate points of the links are removed.
-
getLinkStyle: Returns the current link reshape
option.
-
setRespectNodeSizes: Specifies whether the
algorithm tries to respect the node sizes or not.
-
isRespectNodeSizes: Returns true
if the algorithm tries to respect the node sizes. Returns false
otherwise.
-
Modified behaviors
-
layout(): When an IlvGrapher is
laid out, by default the method now replaces the original links with new
links and removes inappropriate link connectors, if needed. (This actually
depends on the current setting for the link style and on the type of the
links.) To disable this behavior, call the method setLinkReplacementAllowed
and/or setLinkConnectorReplacement with a false argument.
ilog.views.graphlayout.random.IlvRandomLayout
-
This class is now a JavaBean.
-
New fields
-
STRAIGHT_LINE_STYLE: Valid argument for
the method setLinkStyle.
-
NO_RESHAPE_STYLE: Valid argument for the
method setLinkStyle.
-
New methods
-
setLinkStyle: Specifies the links reshape
option. If required, all the intermediate points of the links are removed.
-
getLinkStyle: Returns the current link reshape
option.
-
Modified behaviors
-
layout(): When an IlvGrapher is
laid out, by default the method now replaces the original links with new
links and removes inappropriate link connectors, if needed. (This actually
depends on the current setting for the link style and on the type of the
links.) To disable this behavior, call the method setLinkReplacementAllowed
and/or setLinkConnectorReplacement with a false argument.
Deprecated Methods
For details about methods that have been deprecated,
see this.
Demonstration
Changes
Graph Layout Viewer
JViews Composer now provides graph
layout capabilities. The old "Graph Layout Viewer" demonstration no longer
exists.