IBM ILOG Dojo Diagrammer 1.1.1 API Documentation
Legend: Array Boolean Constructor Date DomNode Error Function Namespace Number Object RegExp Singleton String

ibm_ilog.graphlayout.circular

Object » ibm_ilog.graphlayout.circular

Method Summary

Attached Objects

Methods

CircularClusterId

The base class of the objects that are used to identify clusters. You can use one of its subclasses provided in this package or you can write your own subclasses.

Note that this class implements the PersistentObject interface. The implementation of the method write does nothing. If you write a subclass of ClusterId that needs to be persistent, you must create a constructor with the signature MyClusterId(InputStream stream) so that it can be read by InputStream, and you must override the method write to write the attributes of the cluster identifier.

CircularClusterName
An object that is used to identify a cluster by a unique name (a string).
ParameterTypeDescription
name
CircularClusterNumber
An object that identifies a cluster by a unique integer number.
ParameterTypeDescription
number
CircularLayout

The main class for the Circular Layout algorithm.

The Circular Layout algorithm displays graphs representing interconnected ring and/or star network topologies. The algorithm takes into account the size of the nodes and tries to avoid overlapping nodes.

Here are sample drawings produced by the Circular Layout algorithm:

Sample drawing produced with the Circular Layout

Sample drawing produced with the Circular Layout

For the layout algorithm to work, you must provide information about the topology of the network, that is about how the network should be divided into interconnected clusters.

The layout algorithm provides two clustering modes: clustering by cluster identifiers explicitly provided for each node and clustering by subgraphs (see CircularLayout.setClusteringMode()):

  • Clustering by cluster identifiers

    For each node of the graph, you must specify the cluster (that is, either the ring or the star) to which it belongs. Note that a node can belong to more than one cluster. To do this, you can use the methods CircularLayout.setClusterId() and CircularLayout.addClusterId(). The class CircularClusterId is the abstract base class that is used as the identifier for the clusters. You can use one of its subclasses provided in IBM ILOG Dojo Diagrammer ( CircularClusterName and CircularClusterNumber) or write your own subclass.

    In addition, for each cluster (ring or star), you can specify the order of the nodes along the cluster (with the exception of the central node for star clusters). To do this, you must use the methods CircularLayout.setClusterIdAndIndex() and CircularLayout.addClusterIdAndIndex(), where the last argument is an integer index value associated with the node and the cluster. If the index values are provided, the layout algorithm places the nodes on the cluster in the order specified by the indexes.

    Note that in this mode the initial position of the nodes (at the moment you start the layout) does not affect the resulting layout. However, nodes specified as fixed are not moved if you call the method ibm_ilog.graphlayout.GraphLayout.setPreserveFixedNodes() with a true argument.

  • Clustering automatically

    This mode works similar to the clustering by cluster identifiers, however you do not need to specify cluster information for all nodes. The topology of the graph is analyzed to determine the clusters. A link crossing reduction heuristic is used to determine the order of the nodes within the clusters. Additionally, you can specify cluster ids or cluster indexe for some nodes, in the same way as in the mode clustering by cluster identifiers.

  • Clustering by subgraphs

    In this mode, the algorithm handles a nested graph including intergraph links. It arranges the nodes of each subgraph on a circle, so that the number of link crossings is small. It respects the intergraph links and rotates the cluster so that the number of link crossings is small.

    It assumes that all nodes are nearly square, all nodes are in subgraphs, but the subgraph nesting is only 1. Nodes that are inside subgraphs of subgraphs are not anymore handles.

    Note that in this mode each subgraph keeps its initial position. The subgraphs can be placed either by a different layout algorithm, or interactively.

The following figure illustrates the dimensional parameters of the layout algorithm (clustering by cluster identifiers).

Sample drawing produced with the Circular Layout

See the corresponding chapter of the User's Manual for details on the algorithm, the types of graphs for which this algorithm can be used, the features and limitations, code samples, parameters, and so on.

ParameterTypeDescription
source