ibm_ilog.graphlayout.circular.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:
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()
andCircularLayout.addClusterId()
. The classCircularClusterId
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
andCircularClusterNumber
) 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()
andCircularLayout.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 atrue
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).
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.
Property Summary
- ALL_CORNERS Defines that all the corners are allowed for placing self-links (that is, links that start and end at the same node). This value is the combination of all the values described below: BasicLinkStyleLayout.TOP_LEFT: top left corner; BasicLinkStyleLayout.TOP_RIGHT: top right corner; BasicLinkStyleLayout.BOTTOM_RIGHT: bottom right corner; BasicLinkStyleLayout.BOTTOM_LEFT: bottom left corner.
- AUTOMATIC Automatic clustering. When used as the argument of the method ' CircularLayout.setClusteringMode()', the graph is divided into clusters by analysing the topology. (For details, see ' CircularLayout.setClusteringMode()'.)
- BOTTOM_LEFT Defines the 'bottom left' corner as allowed corner to place self-links (that is, links that start and end at the same node).
- BOTTOM_RIGHT Defines the 'bottom right' corner as allowed corner to place self-links (that is, links that start and end at the same node).
- BY_CLUSTER_IDS Clustering by cluster IDs mode. When used as the argument of the method ' CircularLayout.setClusteringMode()', the graph is divided into clusters on the basis of the ' CircularClusterId' objects provided for each node.
- BY_SUBGRAPHS Clustering by subgraphs mode. When used as the argument of the method ' CircularLayout.setClusteringMode()', the graph is divided into clusters on the basis of the structure of the nested graph. (For details, see ' CircularLayout.setClusteringMode()'.)
- CENTERED Multiple self-link distribution: centered. When used as an argument of ' BasicLinkStyleLayout.setMultiSelfLinkDistribution()', the middle of the bundles of multiple self-links (that is, multiple links that start and end at the same node) is attached at the reference points for self-links.
- CLOCK_WISE Self-link orientation: clockwise. When used as an argument of ' BasicLinkStyleLayout.setSelfLinkOrientation()', self-links (that is, links that start and end at the same node) are routed in clockwise orientation.
- CONNECTED_ONE_BEND_BUNDLE Multilink mode: one bend polyline bundling with connection. When used as an argument of ' BasicLinkStyleLayout.setMultiLinkMode()', multiple links between the same pair of nodes are routed with one bend to avoid overlaps. All links of the bundle are connected to the node and start at the same point and end at the same point.
- CONNECTED_RECTANGULAR Self-link mode: rectangular self-links with 3 bends and connection. When used as an argument of ' BasicLinkStyleLayout.setSelfLinkMode()', 3 bends are added to self-links (that is, links that start and end at the same node). The bends are placed in orthogonal style so that the link segments approximately resemble three quarters of a rectangle (the fourth quarter being the node where the self-link is attached). The connection points are placed on the border of the node.
- CONNECTED_SQUARE Self-link mode: square self-links with 3 bends and connection. When used as an argument of ' BasicLinkStyleLayout.setSelfLinkMode()', 3 bends are added to self-links (that is, links that start and end at the same node). The bends are placed in orthogonal style so that the link segments approximately resemble three quarters of a square (the fourth quarter being the node where the self-link is attached). If the self-link is a spline link, the square shape might be more appropriate than a rectangular shape since the spline then may approximately resemble three quarters of a circle. The connection points are placed on the border of the node.
- COUNTER_CLOCK_WISE Self-link orientation: counterclockwise. When used as an argument of ' BasicLinkStyleLayout.setSelfLinkOrientation()', self-links (that is, links that start and end at the same node) are routed in counterclockwise orientation.
- FREE_ONE_BEND_BUNDLE Multilink mode: one bend polyline bundling without enforced connection. When used as an argument of ' BasicLinkStyleLayout.setMultiLinkMode()', multiple links between the same pair of nodes are routed with one bend to avoid overlaps. The link connection points are not enforced, that is, the nodes and links are free to decide themselves where to place the connection points. There is no guarantee that all links of the bundle start or end at a common point.
- FREE_RECTANGULAR Self-link mode: rectangular self-links with 3 bends without enforced connection. When used as an argument of ' BasicLinkStyleLayout.setSelfLinkMode()', 3 bends are added to self-links (that is, links that start and end at the same node). The bends are placed at the same position like ' BasicLinkStyleLayout.CONNECTED_RECTANGULAR'. The link connection points are not enforced, that is, the nodes and links are free to decide themselves where to place the connection point.
- FREE_SQUARE Self-link mode: square self-links with 3 bends without enforced connection. When used as an argument of ' BasicLinkStyleLayout.setSelfLinkMode()', 3 bends are added to self-links (that is, links that start and end at the same node). The bends are placed at the same position like ' BasicLinkStyleLayout.CONNECTED_SQUARE'. If the self-link is a spline link, the square shape might be more appropriate than a rectangular shape since the spline then may approximately resemble three quarters of a circle. The link connection points are not enforced, that is, the nodes and links are free to decide themselves where to place the connection point.
- HORIZONTAL_TO_VERTICAL Self-link orientation: horizontal to vertical. When used as an argument of ' BasicLinkStyleLayout.setSelfLinkOrientation()', self-links (that is, links that start and end at the same node) start at the left or right side of the node with a horizontal segment and end at the top or bottom side of the node with a vertical segment.
- INNER Multiple self-link distribution: towards inner nestings. When used as an argument of ' BasicLinkStyleLayout.setMultiSelfLinkDistribution()', the outermost self-link loop of a bundle of multiple self-links (that is, multiple links that start and end at the same node) is attached at the reference points for self-links, and the remaining self-links loops are distributed towards the inner of the nestings.
- MAX_HALF_DELTA_ALPHA
- NARROW_CONNECTED_RECTANGULAR Self-link mode: narrow rectangular self-links with 3 bends and connection. When used as an argument of ' BasicLinkStyleLayout.setSelfLinkMode()', 3 bends are added to self-links (that is, links that start and end at the same node). The bends are placed in orthogonal style so that the link segments approximately resemble three quarters of a rectangle (the fourth quarter being the node where the self-link is attached). The connection points are placed on the border of the node. For single self-links, this mode has the same effect like ' BasicLinkStyleLayout.CONNECTED_RECTANGULAR'. If you have multiple self-links at the same node, the self-links are shifted by an offset to avoid overlaps. In this case, this mode differs from ' BasicLinkStyleLayout.CONNECTED_RECTANGULAR', as the self-link bundle may appear more narrow since the shift offset of the multiple self-links is limited by the size of the end node.
- NARROW_CONNECTED_SQUARE Self-link mode: narrow square self-links with 3 bends and connection. When used as an argument of ' BasicLinkStyleLayout.setSelfLinkMode()', 3 bends are added to self-links (that is, links that start and end at the same node). The bends are placed in orthogonal style so that the link segments approximately resemble three quarters of a square (the fourth quarter being the node where the self-link is attached). If the self-link is a spline link, the square shape might be more appropriate than a rectangular shape since the spline then may approximately resemble three quarters of a circle. The connection points are placed on the border of the node. For single self-links, this mode has the same effect like ' BasicLinkStyleLayout.CONNECTED_SQUARE'. If you have multiple self-links at the same node, the self-links are shifted by an offset to avoid overlaps. In this case, this mode differs from ' BasicLinkStyleLayout.CONNECTED_SQUARE', as the self-link bundle may appear more narrow since the shift offset of the multiple self-links is limited by the size of the end node.
- NARROW_FREE_RECTANGULAR Self-link mode: narrow rectangular self-links with 3 bends without enforced connection. When used as an argument of ' BasicLinkStyleLayout.setSelfLinkMode()', 3 bends are added to self-links (that is, links that start and end at the same node). The bends are placed at the same position like ' BasicLinkStyleLayout.NARROW_CONNECTED_RECTANGULAR'. For single self-links, this mode has the same effect like ' BasicLinkStyleLayout.FREE_RECTANGULAR'. If you have multiple self-links at the same node, the self-links are shifted by an offset to avoid overlaps. In this case, this mode differs from ' BasicLinkStyleLayout.FREE_RECTANGULAR', as the self-link bundle may appear more narrow since the shift offset of the multiple self-links * is limited by the size of the end node. The link connection points are not enforced, that is, the nodes and links are free to decide themselves where to place the connection point.
- NARROW_FREE_SQUARE Self-link mode: narrow square self-links with 3 bends without enforced connection. When used as an argument of ' BasicLinkStyleLayout.setSelfLinkMode()', 3 bends are added to self-links (that is, links that start and end at the same node). The bends are placed at the same position like ' BasicLinkStyleLayout.NARROW_CONNECTED_SQUARE'. If the self-link is a spline link, the square shape might be more appropriate than a rectangular shape since the spline then may approximately resemble three quarters of a circle. For single self-links, this mode has the same effect like ' BasicLinkStyleLayout.FREE_SQUARE'. If you have multiple self-links at the same node, the self-links are shifted by an offset to avoid overlaps. In this case, this mode differs from ' BasicLinkStyleLayout.FREE_SQUARE', as the self-link bundle may appear more narrow since the shift offset of the multiple self-links is limited by the size of the end node. The link connection points are not enforced, that is, the nodes and links are free to decide themselves where to place the connection point.
- NARROW_STRAIGHT_LINE_BUNDLE Multilink mode: narrow straight bundling. When used as an argument of ' BasicLinkStyleLayout.setMultiLinkMode()', multiple links between the same pair of nodes are routed straight but shifted to avoid overlaps. The bundle may appear more narrow since the shift offset is limited by the size of the end nodes.
- NO_BENDS Self-link mode: no reshape. When used as an argument of ' BasicLinkStyleLayout.setSelfLinkMode()', self-links (that is, links that start and end at the same node) are not reshaped with bends and may not be visible after layout.
- NO_BUNDLE Multilink mode: no bundling. When used as an argument of ' BasicLinkStyleLayout.setMultiLinkMode()', multiple links between the same pair of nodes are not spread out and will overlap.
- NO_INDEX This value is returned by the method 'getIndex' when a node has no index value with respect to a given cluster.
- NO_RESHAPE_STYLE No links reshape option. When used as an argument of ' ibm_ilog.graphlayout.basic.BasicLinkStyleLayout.setLinkStyle()', the links are not reshaped.
- NUMBER_OF_ITER_FOR_RADIUS_MINIMIZATION
- OUTER Multiple self-link distribution: towards outer nestings. When used as an argument of ' BasicLinkStyleLayout.setMultiSelfLinkDistribution()', the innermost self-link loop of a bundle of multiple self-links (that is, multiple links that start and end at the same node) is attached at the reference points for self-links, and the remaining self-link loops are distributed towards the outer of the nestings.
- STRAIGHT_LINE_BUNDLE Multilink mode: straight bundling. When used as an argument of ' BasicLinkStyleLayout.setMultiLinkMode()', multiple links between the same pair of nodes are routed straight but shifted to avoid overlaps.
- STRAIGHT_LINE_STYLE Straight-line links shape option. When used as an argument of ' ibm_ilog.graphlayout.basic.BasicLinkStyleLayout.setLinkStyle()', the links are given a straight-line shape.
- TOP_LEFT Defines the 'top left' corner as allowed corner to place self-links (that is, links that start and end at the same node).
- TOP_RIGHT Defines the 'top right' corner as allowed corner to place self-links (that is, links that start and end at the same node).
- VERTICAL_TO_HORIZONTAL Self-link orientation: vertical to horizontal. When used as an argument of ' BasicLinkStyleLayout.setSelfLinkOrientation()', self-links (that is, links that start and end at the same node) start at the top or bottom side of the node with a vertical segment and end at the left or right side of the node with a horizontal segment.
Method Summary
- addClusterId(node, id) Allows you to add a cluster identifier 'id' to the list of cluster identifiers to which 'node' belongs.
- addClusterIdAndIndex(node, id, index) Allows you to add a cluster identifier 'id' to the list of cluster identifiers to which 'node' belongs.
- addRootClusterIdImpl(clusterId)
- cleanClusterData()
- clusterize() returns Boolean Clusters the graph.
- clusterizeOrRuntimeException()
- computeSonsInOrder(cluster, sons)
- constructor(source) Returns a new instance of ' BasicLinkStyleLayoutNodeProperty' that stores the parameter settings of this layout class for nodes.
- copy() returns ibm_ilog.graphlayout.GraphLayout Copies the layout instance.
- copyParameters(source) Copies the parameters from a given layout instance.
- customizeLayoutOfClusterGraph(layout) Customize the layout of the cluster graph before it is applied.
- detach() Detaches the graph model from the layout instance.
- getAlphaCluster(cluster, x, y) returns Number
- getClusterCenter(clusterIndex) returns Point Returns the center of the cluster of index 'clusterIndex'.
- getClusterIds() returns Array Returns the identifiers of all clusters (rings and/or stars) that are detected in the graph.
- getClusterIdsCount(node) returns int Returns the number of cluster identifiers to which 'node' belongs.
- getClusterNodes(clusterIndex) returns Array Returns the nodes that are contained in the cluster of index 'clusterIndex'.
- getClusterRadius(clusterIndex) returns Number Returns the radius of the cluster of index 'clusterIndex'.
- getClusterTotalLengthOfSons(cluster, graph, radius, offsetValue) returns Number
- getClusteringMode() returns int Returns the current clustering mode.
- getCurviliniarLengthOfChord(chordLength, radius) returns Number
- getDisconnectedGraphOffset() returns Number Returns the offset between disconnected groups of clusters (rings and/or stars).
- getHighDegreeStarClusterSize() returns int Returns the minimum size to create star clusters from nodes with high degree.
- getIndex(node, clusterId) returns int Returns the index of 'node' with respect to its order on the cluster that is identified by 'clusterId'.
- getInterClusterLinkCrossingPenalty() returns Number Returns the penalty for crossings of links between nodes of different cluster.
- getIntraClusterLinkCrossingPenalty() returns Number Returns the penalty for crossings of links between nodes of the same cluster.
- getLayoutCodeOnInterrupt() returns int Returns the layout code when the allowed time elapsed before completion of the layout.
- getLayoutOfClusterGraph() returns ibm_ilog.graphlayout.GraphLayout Returns the layout instance that lays out the graph of clusters.
- getLevelOffset() returns Number Returns the level offset value.
- getLinkStyle() returns int Returns the current option for the style of the shape of the links.
- getMaxBoundingRadius(cluster, graph) returns Number
- getMaxNumberOfPermutations() returns int Returns the maximum number of permutations tested for a cluster of more than 7 nodes.
- getMaximumClusterSize() returns int Returns the maximum number of nodes to form a cluster.
- getMaximumNumberOfIterationsToReachMaxClusterSize() returns int Returns the number of iterations to achive the maximum cluster size.
- getMinimumClusterSize() returns int Returns the minimum number of nodes to form a cluster.
- getMixedClusterLinkCrossingPenalty() returns Number Returns the penalty for crossings of intra cluster links with inter cluster links.
- getMultiLinkMaxSpread() returns Number Returns the maximum spread width between multiple links between the same pair of nodes.
- getMultiLinkMode() returns int Returns the current option for the mode how multiple links between the same pair of nodes are laid out.
- getMultiLinkOffset() returns Number Returns the offset between multiple links between the same pair of nodes.
- getMultiLinksCount() returns int Returns the number of multilinks.
- getMultiSelfLinkDistribution() returns int Returns the current option for the distribution of bundles of multiple self-links (that is, multiple links that start and end at the same node).
- getMultiSelfLinkMaxSpread() returns Number Returns the maximum spread width between multiple self-links (that is, multiple links that start and end at the same node).
- getMultiSelfLinkOffset() returns Number Returns the offset between multiple self-links (that is, multiple links that start and end at the same node).
- getNodeClusterIds(node) returns ibm_ilog.graphlayout.IIterator Returns an enumeration of the cluster identifiers for the clusters to which 'node' belongs.
- getNodeTotalLengthOfSons(node, radius, offsetValue) returns Number
- getOffset() returns Number Returns the offset value.
- getPercentagesOfCompletion() returns Array Returns an array of 4 integer numbers, denoting the percentage of completion for each of the 4 steps.
- getRootClusterIds() returns Array Returns the cluster identifiers (instances of 'ClusterId') of the root clusters, as specified using the method 'setRootClusterId'.
- getSelfLinkAbsoluteAttachPosition() returns Point Returns the absolute attach position at the node border for self-links (that is, links that start and end at the same node).
- getSelfLinkAllowedCorners() returns int Returns which corners are allowed to have self-links (that is, links that start and end at the same node).
- getSelfLinkMode() returns int Returns the current option for the mode how self-links (that is, links that start and end at the same node) are laid out.
- getSelfLinkOrientation() returns int Returns the current option for the orientation of self-links (that is, links that start and end at the same node).
- getSelfLinkRelativeAttachPosition() returns Point Returns the relative attach position at the node border for self-links (that is, links that start and end at the same node).
- getSelfLinkSpacing() returns Number Returns the minimal spacing between node border and the self-links (that is, links that start and end at the same node).
- getSelfLinksCount() returns int Returns the number of self-links.
- getSonsOutside(cluster, graph) returns Array
- getTotalLengthOfSons(sons, radius, offsetValue) returns Number
- increasePercentageComplete(newPercentage) Increases the percentage of completion that is stored in the layout report to the input value.
- init() Initializes instance variables.
- initializeLayoutRegion(rect)
- internalLayout() Computes the layout using the Circular Layout algorithm.
- isAreaMinimizationEnabled() returns Boolean Returns whether total area minimization is enabled.
- isClusterByBiconnectivity() returns Boolean Returns whether the clustering by biconnectivity is enabled.
- isConnectLinksToNodeCenters() returns Boolean Returns 'true' if the algorithm connects the links to the centers of the nodes.
- isInterClusterCrossingReduction() returns Boolean Returns whether the crossing reduction takes inter cluster links into account.
- isInterrupted() returns Boolean Returns 'true' if the layout is interrupted.
- isSelfLinkConnectToNodeCenter() returns Boolean Returns whether self-links (that is, links that start and end at the same node) connect towards the node center.
- isStarCenter(node) returns Boolean Returns 'true' if 'node' is the central node of a star cluster, and 'false' otherwise.
- layout() Computes the layout using the Basic Link Style Layout algorithm.
- outsideLayout_overload_2(graph, redraw)
- processOneSon(sonCluster, parentCluster, previousLevelRadius, currentLevelRadius, offsetValue) returns Number
- removeAllClusterIds(node) Removes 'node' from all clusters to which it belongs.
- removeAllRootClusterIds() Allows you to reset all the root cluster settings.
- removeClusterId(node, id) Removes 'node' from the cluster 'id'.
- removeRootClusterId(clusterId) Allows you to specify that a cluster is no longer the root of the connected component of the graph of clusters to which it belongs.
- setAreaMinimizationEnabled(option) Sets whether the total area minimization option is enabled.
- setClusterByBiconnectivity(enable) Sets whether the clustering by biconnectivity is enabled.
- setClusterId(node, id) Allows you to specify that 'node' belongs to a unique cluster of a given identifier 'id'.
- setClusterIdAndIndex(node, id, index) Allows you to specify that 'node' belongs to a unique cluster of a given identifier 'id' and is associated with the integer value 'index'.
- setClusteringMode(mode) Sets the clustering mode.
- setConnectLinksToNodeCenters(enable) Sets whether the algorithm connects the links to the centers of the nodes.
- setDisconnectedGraphOffset(offsetValue) Sets the offset between disconnected groups of clusters (rings and/or stars).
- setHighDegreeStarClusterSize(size) Sets the minimum size to create star clusters from nodes with high degree.
- setInterClusterCrossingReduction(enable) Sets whether the crossing reduction takes inter cluster links into account.
- setInterClusterLinkCrossingPenalty(penalty) Sets the penalty for crossings of links between nodes of different clusters.
- setIntraClusterLinkCrossingPenalty(penalty) Sets the penalty for crossings of links between nodes of the same cluster.
- setLayoutOfClusterGraph(layout) Returns the layout instance that lays out the graph of clusters.
- setLevelOffset(offsetValue) Sets the offset between two concentric levels.
- setLinkStyle(style) Sets the style of the shape of the links.
- setMaxNumberOfPermutations(n) Sets the maximum number of permutations tested for a cluster of more than 7 nodes.
- setMaximumClusterSize(size) Sets the maximum number of nodes to form a cluster.
- setMaximumNumberOfIterationsToReachMaxClusterSize(numIterations) Sets the number of iterations to achive the maximum cluster size.
- setMinimumClusterSize(size) Sets the minimum number of nodes to form a cluster.
- setMixedClusterLinkCrossingPenalty(penalty) Sets the penalty for crossings of intra cluster links with inter cluster links.
- setMultiLinkMaxSpread(maxSpread) Sets the maximum spread width between multiple links between the same pair of nodes.
- setMultiLinkMode(mode) Sets the mode how multiple links between the same pair of nodes are laid out.
- setMultiLinkOffset(offset) Sets the offset between multiple links between the same pair of nodes.
- setMultiSelfLinkDistribution(distribution) Sets the distribution of bundles of multiple self-links (that is, multiple links that start and end at the same node).
- setMultiSelfLinkMaxSpread(maxSpread) Sets the maximum spread width between multiple self-links (that is, multiple links that start and end at the same node).
- setMultiSelfLinkOffset(offset) Sets the offset between multiple self-links (that is, multiple links that start and end at the same node).
- setOffset(offsetValue) Sets the offset value.
- setRootClusterId(clusterId) Allows you to specify a root cluster for the connected component of the graph of clusters to which it belongs.
- setRootClusterIds(clusterIds) Allows you to specify the root cluster for each connected component of the graph of clusters.
- setSelfLinkAbsoluteAttachPosition(position) Sets the absolute attach position at the node border for self-links (that is, links that start and end at the same node).
- setSelfLinkAllowedCorners(corners) Sets which corners are allowed to have self-links (that is, links that start and end at the same node).
- setSelfLinkConnectToNodeCenter(enable) Sets whether self-links (that is, links that start and end at the same node) connect towards the node center.
- setSelfLinkMode(mode) Sets the mode how self-links (that is, links that start and end at the same node) are laid out.
- setSelfLinkOrientation(orientation) Sets the orientation of self-links (that is, links that start and end at the same node).
- setSelfLinkRelativeAttachPosition(position) Sets the relative attach position at the node border for self-links (that is, links that start and end at the same node).
- setSelfLinkSpacing(spacing) Sets the minimal spacing between node border and self-links (that is, links that start and end at the same node).
- setStarCenter(node, starCenter) Allows you to specify whether 'node' is the central node of a star cluster.
- setStructureUpToDate(uptodate) Sets whether the structure of the graph is up to date.
- supportsAllowedTime() returns Boolean Indicates that this layout class can not stop the layout computation when the user-defined allowed time is exceeded.
- supportsLayoutOfConnectedComponents() returns Boolean Indicates that this layout class can cut the attached graph into connected components, apply itself to each connected component separately, and then use the layout instance returned by the method ' ibm_ilog.graphlayout.GraphLayout.getLayoutOfConnectedComponents()' to position the connected components.
- supportsLayoutRegion() returns Boolean Indicates that this layout class takes into account a user-defined region (a rectangle) or a user-defined manager view to compute the dimensions of the drawing.
- supportsLinkConnectionBox() returns Boolean Indicates that this layout class can use a link connection box interface to calculate the end points of a link.
- supportsPercentageComplete() returns Boolean Indicates that this layout class can not estimate the percentage of completion during the layout run.
- supportsPreserveFixedLinks() returns Boolean Indicates that this layout class allows the user to specify fixed links.
- supportsPreserveFixedNodes() returns Boolean Indicates that this layout class allows the user to specify fixed nodes.
- supportsStopImmediately() returns Boolean Indicates that this layout class can interrupt the current run of the layout immediately in a controlled way.
Attached Objects
Properties
Methods
Allows you to add a cluster identifier id
to the list
of cluster identifiers to which node
belongs.
This parameter is only used if the clustering mode (see
CircularLayout.setClusteringMode()
) is
CircularLayout.BY_CLUSTER_IDS
or
CircularLayout.AUTOMATIC
.
Parameter | Type | Description |
---|---|---|
node | Object | The node. |
id | ibm_ilog.graphlayout.circular.CircularClusterId | The cluster ID. |
Allows you to add a cluster identifier id
to the list
of cluster identifiers to which node
belongs.
It also adds the associated integer value index
(to be
used by the layout algorithm to determine the order of the nodes on
the cluster).
Note that index
must not be negative. The values of the
indexes for consecutive nodes in a cluster are not necessarily
consecutive. Only the order of the values is important.
This parameter is only used if the clustering mode (see
CircularLayout.setClusteringMode()
) is
CircularLayout.BY_CLUSTER_IDS
or
CircularLayout.AUTOMATIC
.
Parameter | Type | Description |
---|---|---|
node | Object | The node. |
id | ibm_ilog.graphlayout.circular.CircularClusterId | The cluster ID. |
index | int | The index. |
Clusters the graph.
This method is called by the Circular Layout algorithm to create the
internal representation of the clustered graph. The method uses the
clustering information provided by the methods
setClusterId
and addClusterId
.
Returns a new instance of
BasicLinkStyleLayoutNodeProperty
that stores the parameter
settings of this layout class for nodes.
The method is used by
ibm_ilog.graphlayout.AbstractGraphLayoutModel.saveParametersToNamedProperties()
to create a named property for a node that contains parameter
settings of this layout instance for the input node.
Parameter | Type | Description |
---|---|---|
source |
Copies the layout instance.
This method copies the layout instance by calling the copy constructor.
When performing a recursive layout of a nested graph,
ibm_ilog.graphlayout.ILayoutProvider
uses this method to
"clone" the layout instance of a parent graph.
Note that the parameters specific to a node or link are not copied. The other parameters, including the layout region specification and he link clip and link connection box interfaces, are also copied.
If a method of the type supportsXXX
is associated with
a parameter, the parameter is copied only if the corresponding
method returns true
.
Copies the parameters from a given layout instance.
Note that the parameters which are specific to a node or a link are not copied. The other parameters, including the link clip and link connection box interfaces, are also copied. A copy of the layout instance used for laying out the connected components is set on this layout instance.
If a method of the type supportsXXX
is associated with
a parameter, the parameter is copied only if the corresponding
method returns true
.
Parameter | Type | Description |
---|---|---|
source | ibm_ilog.graphlayout.GraphLayout | The layout instance from which the parameters are copied. |
Customize the layout of the cluster graph before it is applied.
If CircularLayout.getLayoutOfClusterGraph()
returns a
tree layout instance, it sets the node comparator to enforce an
appropriate node ordering when laying out the graph of clusters. It
also sets the global link style to
ibm_ilog.graphlayout.tree.TreeLayout.NO_RESHAPE_STYLE
since
the links of the cluster graph are virtual links that
don't need to be reshaped.
Parameter | Type | Description |
---|---|---|
layout | ibm_ilog.graphlayout.GraphLayout | The layout instance. |
Detaches the graph model from the layout instance.
When you attach a new graph model to the layout instance, you do not
need to detach the old graph model because this is done
automatically when you call
ibm_ilog.graphlayout.GraphLayout.attach()
. The
detach
method performs cleaning operations on the graph
model. In addition to the cleaning operations in the base class, the
Circular Layout algorithm removes the cluster ID and the star center
attribute from the nodes.
Note that you must call this method when you no longer need the layout instance. Otherwise, some objects may not be garbage collected.
Returns the center of the cluster of index
clusterIndex
.
The index corresponds to the index of elements in the vector
returned by the method getClusterIds
. Therefore, valid
values of clusterIndex
range from zero to the number of
clusters minus one (that is, the size of the vector returned by the
method getClusterIds()
minus one).
Note that the returned value will not be correct if the nodes of the cluster have been moved since the layout was performed.
This method should be used only if the clustering mode (see
CircularLayout.setClusteringMode()
) is
CircularLayout.BY_CLUSTER_IDS
.
Parameter | Type | Description |
---|---|---|
clusterIndex | int | The cluster index. |
Returns the identifiers of all clusters (rings and/or stars) that
are detected in the graph.
The returned vector contains instances of ClusterId
or
subclasses. It returns null
if there are no cluster
identifiers.
This method should be used only if the clustering mode (see
CircularLayout.setClusteringMode()
) is
CircularLayout.BY_CLUSTER_IDS
or
CircularLayout.AUTOMATIC
.
Returns the number of cluster identifiers to which node
belongs.
This method should be used only if the clustering mode (see
CircularLayout.setClusteringMode()
) is
CircularLayout.BY_CLUSTER_IDS
or
CircularLayout.AUTOMATIC
.
Parameter | Type | Description |
---|---|---|
node | Object | The node. |
Returns the nodes that are contained in the cluster of index
clusterIndex
.
This index corresponds to the index of elements in the vector
returned by the method getClusterIds
. Therefore, valid
values of clusterIndex
range from zero to the number of
clusters minus one (that is, the size of the vector returned by the
method getClusterIds()
minus one).
This method should be used only if the clustering mode (see
CircularLayout.setClusteringMode()
) is
CircularLayout.BY_CLUSTER_IDS
or
CircularLayout.AUTOMATIC
.
Parameter | Type | Description |
---|---|---|
clusterIndex | int | The cluster index. |
Returns the radius of the cluster of index
clusterIndex
.
The index corresponds to the index of elements in the vector
returned by the method getClusterIds
. Therefore, valid
values of clusterIndex
range from zero to the number of
clusters minus one (that is, the size of the vector returned by the
method getClusterIds()
minus one).
Note that the returned value may not be correct if the nodes of the cluster have been moved since the layout was performed.
This method should be used only if the clustering mode (see
CircularLayout.setClusteringMode()
) is
CircularLayout.BY_CLUSTER_IDS
.
Parameter | Type | Description |
---|---|---|
clusterIndex | int | The cluster index. |
Returns the offset between disconnected groups of clusters (rings and/or stars).
Note that this parameter is only used if the clustering mode (see
CircularLayout.setClusteringMode()
) is
CircularLayout.BY_CLUSTER_IDS
.
Returns the minimum size to create star clusters from nodes with
high degree.
This parameter is used only if the clustering mode (see
CircularLayout.setClusteringMode()
) is
CircularLayout.AUTOMATIC
.
Returns the index of node
with respect to its order on
the cluster that is identified by clusterId
.
It returns CircularLayout.NO_INDEX
if
node
has no index on the cluster.
This method should be used only if the clustering mode (see
CircularLayout.setClusteringMode()
) is
CircularLayout.BY_CLUSTER_IDS
or
CircularLayout.AUTOMATIC
.
Parameter | Type | Description |
---|---|---|
node | Object | The node. |
clusterId | ibm_ilog.graphlayout.circular.CircularClusterId | The cluster ID. |
Returns the penalty for crossings of links between nodes of
different cluster.
This parameter is used only if the clustering mode (see
CircularLayout.setClusteringMode()
) is
CircularLayout.AUTOMATIC
.
Returns the penalty for crossings of links between nodes of the
same cluster.
This parameter is used only if the clustering mode (see
CircularLayout.setClusteringMode()
) is
CircularLayout.AUTOMATIC
.
Returns the layout instance that lays out the graph of clusters.
This parameter is used only if the clustering mode (see
CircularLayout.setClusteringMode()
) is
CircularLayout.AUTOMATIC
.
If a layout instance has been specified using the method
CircularLayout.setLayoutOfClusterGraph()
, this instance is
returned. If no layout instance has been specified using the method
CircularLayout.setLayoutOfClusterGraph()
, the method
returns an instance of
ibm_ilog.graphlayout.tree.TreeLayout
. The tree layout is set
to balloon layout mode. Note that the node comparator of the tree
layout should not be set on this layout instance because it is
modified at runtime (see
CircularLayout.customizeLayoutOfClusterGraph()
). Note that
the layout instance returned by this method cannot be used
independently as long as it is set as a layout of the cluster graph.
Returns the level offset value.
Note that this parameter is only used if the clustering mode (see
CircularLayout.setClusteringMode()
) is
CircularLayout.BY_CLUSTER_IDS
.
Returns the maximum number of permutations tested for a cluster of more than 7 nodes.
This parameter is used only if the clustering mode (see
CircularLayout.setClusteringMode()
) is
CircularLayout.BY_SUBGRAPHS
.
Returns the maximum number of nodes to form a cluster.
The value is obeyed for regular clusters, but not for star clusters.
This parameter is used only if the clustering mode (see
CircularLayout.setClusteringMode()
) is
CircularLayout.AUTOMATIC
.
Returns the number of iterations to achive the maximum cluster size.
This parameter is used only if the clustering mode (see
CircularLayout.setClusteringMode()
) is
CircularLayout.AUTOMATIC
.
Returns the minimum number of nodes to form a cluster.
The value is obeyed for regular clusters, but not for star clusters.
This parameter is used only if the clustering mode (see
CircularLayout.setClusteringMode()
) is
CircularLayout.AUTOMATIC
.
Returns the penalty for crossings of intra cluster links with inter
cluster links.
This parameter is used only if the clustering mode (see
CircularLayout.setClusteringMode()
) is
CircularLayout.AUTOMATIC
.
Returns the number of multilinks.
Can be used by subclasses inside
BasicLinkStyleLayout.internalLayout()
to test how many
multilinks have to be treated.
Returns an enumeration of the cluster identifiers for the clusters
to which node
belongs.
The elements of the enumeration are instances of
ClusterId
or subclasses.
This method should be used only if the clustering mode (see
CircularLayout.setClusteringMode()
) is
CircularLayout.BY_CLUSTER_IDS
or
CircularLayout.AUTOMATIC
.
Parameter | Type | Description |
---|---|---|
node | Object | The node. |
Returns an array of 4 integer numbers, denoting the percentage of completion for each of the 4 steps. The steps are the following:
- After collecting multilinks and self-links.
- After calling
BasicLinkStyleLayout.internalLayout()
. - After treating all multilinks.
- After treating all self-links.
Returns the cluster identifiers (instances of
ClusterId
) of the root clusters, as specified using the
method setRootClusterId
.
This parameter is only used if the clustering mode (see
CircularLayout.setClusteringMode()
) is
CircularLayout.BY_CLUSTER_IDS
.
This method returns null
if no root clusters have been
specified. In this case, arbitrary root clusters will be used for
each connected component of the graph of clusters.
Returns the absolute attach position at the node border for self-links (that is, links that start and end at the same node). The absolute attach position is expressed as absolute coordinate units.
- ' BasicLinkStyleLayout.TOP_LEFT': top left corner.
- ' BasicLinkStyleLayout.TOP_RIGHT': top right corner.
- ' BasicLinkStyleLayout.BOTTOM_RIGHT': bottom right corner.
- ' BasicLinkStyleLayout.BOTTOM_LEFT': bottom left corner.
Returns which corners are allowed to have self-links (that is, links that start and end at the same node). The default value is all the corners, that is, a combination of all the possible values.
Returns the relative attach position at the node border for self-links (that is, links that start and end at the same node). The relative attach position is expressed as a fraction of the width and height of the node bounding box. Self-links occur at a corner of the node, and the relative position is specified with respect to this corner.
Returns the number of self-links.
Can be used by subclasses inside
BasicLinkStyleLayout.internalLayout()
to test how many
self-links have to be treated.
Increases the percentage of completion that is stored in the layout report to the input value. Layout algorithms that support the percentage complete feature should call this method during the running of the layout. This method does not set the percentage to a lower value than the previous value. It also does not set the value to more than 100%. It silently ignores wrong input values.
Parameter | Type | Description |
---|---|---|
newPercentage | int | New percentage of completion |
Initializes instance variables.
You should not call this method directly. The method is called internally by the constructor without arguments and by the copy constructor. The method must be overridden by subclasses that need to initialize additional instance variables.
Computes the layout using the Circular Layout algorithm.
To start the layout, call the method
ibm_ilog.graphlayout.GraphLayout.performLayout()
.
Note that if the attached graph model is an
ibm_ilog.graphlayout.AbstractGraphLayoutModel
and clustering
information was not provided (using the method
CircularLayout.setClusterIdAndIndex()
or
CircularLayout.addClusterIdAndIndex()
, clustering information
eventually stored in ClusterInfoProperty
) is
automatically read.
Returns whether total area minimization is enabled.
Note that this parameter is only used if the clustering mode (see
CircularLayout.setClusteringMode()
) is
CircularLayout.BY_CLUSTER_IDS
.
Returns whether the clustering by biconnectivity is enabled.
This parameter is used only if the clustering mode (see
CircularLayout.setClusteringMode()
) is
CircularLayout.AUTOMATIC
.
Returns whether the crossing reduction takes inter cluster links into account.
This parameter is used only if the clustering mode (see
CircularLayout.setClusteringMode()
) is
CircularLayout.AUTOMATIC
.
Returns true
if node
is the central node
of a star cluster, and false
otherwise.
This parameter is only used if the clustering mode (see
CircularLayout.setClusteringMode()
) is
CircularLayout.BY_CLUSTER_IDS
or
CircularLayout.AUTOMATIC
.
Parameter | Type | Description |
---|---|---|
node | Object | The node. |
Computes the layout using the Basic Link Style Layout algorithm.
To start the layout, call the method
ibm_ilog.graphlayout.GraphLayout.performLayout()
. Subclasses
should not override this method but should override
BasicLinkStyleLayout.internalLayout()
instead.
Parameter | Type | Description |
---|---|---|
sonCluster | ||
parentCluster | ||
previousLevelRadius | ||
currentLevelRadius | ||
offsetValue |
Removes node
from all clusters to which it belongs.
This parameter is only used if the clustering mode (see
CircularLayout.setClusteringMode()
) is
CircularLayout.BY_CLUSTER_IDS
or
CircularLayout.AUTOMATIC
.
Parameter | Type | Description |
---|---|---|
node | Object | The node. |
Allows you to reset all the root cluster settings. Arbitrary clusters are used as root clusters for each connected component of the graph of clusters.
This parameter is only used if the clustering mode (see
CircularLayout.setClusteringMode()
) is
CircularLayout.BY_CLUSTER_IDS
.
Removes node
from the cluster id
.
Note that you do not need to use the same instance of
ClusterId
as you used when you called
setClusterId
or addClusterId
. You can use
another instance if the instances are equal with respect to the
method ClusterId.equals
.
This parameter is only used if the clustering mode (see
CircularLayout.setClusteringMode()
) is
CircularLayout.BY_CLUSTER_IDS
or
CircularLayout.AUTOMATIC
.
Parameter | Type | Description |
---|---|---|
node | Object | The node. |
id | ibm_ilog.graphlayout.circular.CircularClusterId | The cluster ID. |
Allows you to specify that a cluster is no longer the root of the connected component of the graph of clusters to which it belongs.
If a root cluster is not specified for a connected component of the graph of clusters, an arbitrary cluster is used.
This parameter is only used if the clustering mode (see
CircularLayout.setClusteringMode()
) is
CircularLayout.BY_CLUSTER_IDS
.
Parameter | Type | Description |
---|---|---|
clusterId | ibm_ilog.graphlayout.circular.CircularClusterId | The cluster identifier. |
Sets whether the total area minimization option is enabled.
If this option is enabled, priority is given to the readability of the layout. The child clusters are positioned closer to their parent clusters.
If this option is disabled, the algorithm gives a higher priority to the minimization of the total area of the layout.
The default value is false
.
Enabling the total area minimization is recommended for large graphs where the total area of the layout may become very large.
Note that this parameter is only used if the clustering mode (see
CircularLayout.setClusteringMode()
) is
CircularLayout.BY_CLUSTER_IDS
.
Parameter | Type | Description |
---|---|---|
option | Boolean | 'true' to set area minimization priority, or 'false' to set readability priority. |
Sets whether the clustering by biconnectivity is enabled.
It is enabled by default. This parameter is used only if the
clustering mode (see
CircularLayout.setClusteringMode()
) is
CircularLayout.AUTOMATIC
.
If the graph is automatically clustered, sets of nodes that have many connections though links are transformed into clusters. The mathematical term is the biconnected component, a set of nodes that has so many connections so that removing one node or link still keeps the component connected. If clustering by biconnectivity is enabled, the biconnected components are the initial clusters. These might get furthermore split or merged if a minimal or maximal size per cluster is desired.
Parameter | Type | Description |
---|---|---|
enable |
Allows you to specify that node
belongs to a unique
cluster of a given identifier id
.
Note that you must specify a different instance of
ClusterId
for each node.
This parameter is only used if the clustering mode (see
CircularLayout.setClusteringMode()
) is
CircularLayout.BY_CLUSTER_IDS
or
CircularLayout.AUTOMATIC
.
Parameter | Type | Description |
---|---|---|
node | ||
id |
Allows you to specify that node
belongs to a unique
cluster of a given identifier id
and is associated with
the integer value index
.
(The index is used by the layout algorithm to determine the ordering
of the nodes on the cluster.)
Note that index
must not be negative. The values of the
indexes for consecutive nodes in a cluster are not necessarily
consecutive. Only the order of the values is important.
This parameter is only used if the clustering mode (see
CircularLayout.setClusteringMode()
) is
CircularLayout.BY_CLUSTER_IDS
or
CircularLayout.AUTOMATIC
.
Parameter | Type | Description |
---|---|---|
node | Object | The node. |
id | ibm_ilog.graphlayout.circular.CircularClusterId | The cluster ID. |
index | int | The index. |
Sets the clustering mode. Valid value are:
-
CircularLayout.BY_CLUSTER_IDS
- The information needed for dividing the graph into clusters is provided usingCircularClusterId
objects for all nodes.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()
andCircularLayout.addClusterId()
. The classCircularClusterId
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
andCircularClusterNumber
) 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()
andCircularLayout.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.The position of the clusters is computed using a radial tree-like algorithm.
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 atrue
argument. -
CircularLayout.BY_SUBGRAPHS
- The information needed for dividing the graph into clusters is provided by placing the nodes and links into 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.
-
CircularLayout.AUTOMATIC
- This is similar to the modeCircularLayout.BY_CLUSTER_IDS
, but does not require any specification of clusters. The graph is divided into clusters by anaylizing the topology of the graph. Biconnected components form initial clusters. The remaining nodes that do not belong to any (nontrivial) biconnected component form star clusters if their degree is larger than the star cluster threshold. Then, the initial clusters are merged if they are smaller than the minimal size of a cluster, or split if they are larger than the maximal size of a cluster.You can specify clusters using
CircularClusterId
objects for some nodes, but it is not needed to specify it for all nodes. The classCircularClusterId
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
andCircularClusterNumber
) or write your own subclass.In addition, for specified cluster (ring or star), you can optionally 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()
andCircularLayout.addClusterIdAndIndex()
, where the last argument is an integer index value associated with the node and the cluster. You can specify indexe for all or some nodes of the cluster. Nodes with specified index are placed in this relative order on the cluster. Nodes without specified index are merged into this relative order by using a heuristic to reduce the number of link crossings.The position of the clusters is computed using an instance of
ibm_ilog.graphlayout.tree.TreeLayout
.
The default value is AUTOMATIC
.
Parameter | Type | Description |
---|---|---|
mode |
Sets whether the algorithm connects the links to the centers of the
nodes.
This option has only an effect if the link style is not
BasicLinkStyleLayout.NO_RESHAPE_STYLE
. If the argument is
true
, the links are connected to the center of the
nodes. If a link connection box is set, it uses the virtual center
of the connection box instead of the center of the bounding boxes of
the end nodes. The virtual center is defined as the center of the
connection box shifted by the average of the tangential "top" and
"bottom" offset in the horizontal direction and by the average of
the tangential "left" and "right" offset in the vertical direction.
For instance, if the tangential offset is 20 at the top side and 10
at all other sides, the average shift offset is (20 + 10)/2 =
15
in the horizontal direction and (10 + 10)/2 =
10
in the vertical direction; hence the virtual center is at
connectionBox.center() + (15, 10)
.
The default value is true
.
Parameter | Type | Description |
---|---|---|
enable |
Sets the offset between disconnected groups of clusters (rings and/or stars). Disconnected groups of clusters are laid out in rows. This offset value represents the offset between the rows and the offset between groups on the same row.
The default value is 10
.
Note that this parameter is only used if the clustering mode (see
CircularLayout.setClusteringMode()
) is
CircularLayout.BY_CLUSTER_IDS
.
Parameter | Type | Description |
---|---|---|
offsetValue | Number | The disconnected graph offset value. |
Sets the minimum size to create star clusters from nodes with high degree. The algorithm searches for nodes of high degree (high number of connected nodes) that are not yet clustered by biconnectivity. If the degree is at least the minimum size, it creates a star cluster with the high degree nodes as center of the cluster.
The default value is 5.
This parameter is used only if the clustering mode (see
CircularLayout.setClusteringMode()
) is
CircularLayout.AUTOMATIC
.
Parameter | Type | Description |
---|---|---|
size |
Sets whether the crossing reduction takes inter cluster links into account. This is enabled by default.
This parameter is used only if the clustering mode (see
CircularLayout.setClusteringMode()
) is
CircularLayout.AUTOMATIC
.
Parameter | Type | Description |
---|---|---|
enable |
Sets the penalty for crossings of links between nodes of different clusters. These links are called inter cluster links.
The default value is 1.
This parameter is used only if the clustering mode (see
CircularLayout.setClusteringMode()
) is
CircularLayout.AUTOMATIC
.
During the crossing reduction, intra cluster links compete with inter cluster links, since some node orderings of a cluster produce more crossings of links inside the cluster, while other node orderings produce more crossings of links connecting different clusters. The penalty allows to fine tune whether intra cluster links or inter cluster links are more important.
Parameter | Type | Description |
---|---|---|
penalty |
Sets the penalty for crossings of links between nodes of the same cluster. These links are called intra cluster links.
The default value is 1.
This parameter is used only if the clustering mode (see
CircularLayout.setClusteringMode()
) is
CircularLayout.AUTOMATIC
.
During the crossing reduction, intra cluster links compete with inter cluster links, since some node orderings of a cluster produce more crossings of links inside the cluster, while other node orderings produce more crossings of links connecting different clusters. The penalty allows to fine tune whether intra cluster links or inter cluster links are more important.
Parameter | Type | Description |
---|---|---|
penalty |
Returns the layout instance that lays out the graph of clusters.
This parameter is used only if the clustering mode (see
CircularLayout.setClusteringMode()
) is
CircularLayout.AUTOMATIC
.
If a layout instance has been specified, this instance is used. If
no layout instance has been specified, an instance of
ibm_ilog.graphlayout.tree.TreeLayout
is used. The tree layout
is set to balloon layout mode. Note that the node comparator of the
tree layout should not be set on this layout instance because it is
modified at runtime (see
CircularLayout.customizeLayoutOfClusterGraph()
). You can
call this method with a null
argument to return to the
default tree layout instance.
The layout instance cannot be used independently as long as it is set as a layout of the cluster graph.
Parameter | Type | Description |
---|---|---|
layout | ibm_ilog.graphlayout.GraphLayout | The layout instance to set, or 'null' to use the default layout instance. |
Sets the offset between two concentric levels. This is an additional offset that is added to the minimum value computed by the layout algorithm to avoid overlapping clusters on the same level.
The default value is zero.
Note that this parameter is only used if the clustering mode (see
CircularLayout.setClusteringMode()
) is
CircularLayout.BY_CLUSTER_IDS
.
Parameter | Type | Description |
---|---|---|
offsetValue | Number | The level offset value. |
Sets the style of the shape of the links.
Valid values are
BasicLinkStyleLayout.STRAIGHT_LINE_STYLE
(the links are given
a straight-line shape) and
BasicLinkStyleLayout.NO_RESHAPE_STYLE
(no reshape is
performed on the links).
This feature can be useful if the graph contains links that have
intermediate points and are not straight-line links, for instance,
ilog.diagrammer.model.DiagrammerLink
links with
intermediate points.
The default value is
BasicLinkStyleLayout.STRAIGHT_LINE_STYLE
.
Parameter | Type | Description |
---|---|---|
style | int | The link style value. |
Sets the maximum number of permutations tested for a cluster of more than 7 nodes. For smaller cluster, always all permutations are tested.
This parameter is only used if the clustering mode (see
CircularLayout.setClusteringMode()
) is
CircularLayout.BY_SUBGRAPHS
.
The algorithm generates permutations of node orderings along the cluster circle and chooses the one with the best crossing and rotation behavior according to some quality criteria. Since the number of permutations is exponential, it is feasible to test all permutations only if there are no more than 7 nodes. Otherwise, the algorithm randomly generates some permutations and chooses the best one. The more permutations are chosen, the better the layout result.
Parameter | Type | Description |
---|---|---|
n |
Sets the maximum number of nodes to form a cluster. The value is obeyed for regular clusters, but not for star clusters. The value is only a hint. If the minimum and maximum cluster size are close, then the maximunm cluster size is sometimes not obeyed, in order to satisfy the minimum cluster size.
The default value is 50.
This parameter is used only if the clustering mode (see
CircularLayout.setClusteringMode()
) is
CircularLayout.AUTOMATIC
.
Parameter | Type | Description |
---|---|---|
size |
Sets the number of iterations to achive the maximum cluster size.
The default value is 10.
This parameter is used only if the clustering mode (see
CircularLayout.setClusteringMode()
) is
CircularLayout.AUTOMATIC
.
Splitting a cluster is an iterative process that tries to find good subclusters with only few links that run between different clusters. Initial subclusters are improved iteratively. If the cluster algorithm takes too much time, reducting the number of iterations speeds up the algorithm.
Parameter | Type | Description |
---|---|---|
numIterations |
Sets the minimum number of nodes to form a cluster. The value is obeyed for regular clusters, but not for star clusters.
The default value is 4.
This parameter is used only if the clustering mode (see
CircularLayout.setClusteringMode()
) is
CircularLayout.AUTOMATIC
.
Parameter | Type | Description |
---|---|---|
size |
Sets the penalty for crossings of intra cluster links with inter cluster links. Links between nodes of the same cluster are called intra cluster links, while links connecting different clusters are called inter cluster links.
The default value is 1.
This parameter is used only if the clustering mode (see
CircularLayout.setClusteringMode()
) is
CircularLayout.AUTOMATIC
.
During the crossing reduction, intra cluster links compete with inter cluster links, since some node orderings of a cluster produce more crossings of links inside the cluster, while other node orderings produce more crossings of links connecting different clusters. The penalty allows to fine tune whether intra cluster links or inter cluster links are more important.
Parameter | Type | Description |
---|---|---|
penalty |
Sets the maximum spread width between multiple links between the same pair of nodes.
If the multilink mode is
BasicLinkStyleLayout.STRAIGHT_LINE_BUNDLE
or
BasicLinkStyleLayout.NARROW_STRAIGHT_LINE_BUNDLE
, the
multiple straight line links are shifted relative to each other to
avoid overlaps. If the multilink mode is
BasicLinkStyleLayout.CONNECTED_ONE_BEND_BUNDLE
or
BasicLinkStyleLayout.FREE_ONE_BEND_BUNDLE
, bends are added to
the multiple links to avoid that those links overlap. The straight
links, or the multilink bends, respectively, are shifted relative to
each other by the multilink offset unless the number of links times
the offset exceeds the max spread value. In that case, the offset is
limited by the max spread value. If the multilink mode is
BasicLinkStyleLayout.NARROW_STRAIGHT_LINE_BUNDLE
, the offset
is further limited by the node size. If the multilink mode is
BasicLinkStyleLayout.NO_BUNDLE
, the maximum spread width has
no effect.
This maximum spread width affects only links that are no self-links.
See BasicLinkStyleLayout.setMultiSelfLinkMaxSpread()
for the same parameter at self-links.
The default maximum spread value is 50
.
Parameter | Type | Description |
---|---|---|
maxSpread | Number | The maximum spread value. |
Sets the mode how multiple links between the same pair of nodes are laid out. Valid values are:
-
BasicLinkStyleLayout.NO_BUNDLE
- no bundling. Multiple links between the same pair of nodes are not spread out and will overlap. -
BasicLinkStyleLayout.STRAIGHT_LINE_BUNDLE
- straight line bundling. Multiple links between the same pair of nodes are routed as straight lines but shifted relative to each other to avoid overlaps. Different to the narrow mode, the shift offset is not limited by the node size. -
BasicLinkStyleLayout.NARROW_STRAIGHT_LINE_BUNDLE
- narrow straight line bundling (the default). Multiple links between the same pair of nodes are routed as straight lines but shifted relative to each other to avoid overlaps. The bundle may appear more narrow since the shift offset is limited by the size of the end nodes. -
BasicLinkStyleLayout.CONNECTED_ONE_BEND_BUNDLE
- one bend polyline bundling with connection. Multiple links between the same pair of nodes are routed with one bend to avoid overlaps. All links of the bundle are connected to the node and start at the same point and end at the same point. -
BasicLinkStyleLayout.FREE_ONE_BEND_BUNDLE
- one bend polyline bundling without enforced connection. Multiple links between the same pair of nodes are routed with one bend to avoid overlaps. The link connection point is not enforced, that is, the node and link are free to decide themselves where to place the connection point. There is no guarantee that all links of the bundle start or end at a common point.
BasicLinkStyleLayout.NO_RESHAPE_STYLE
.
Parameter | Type | Description |
---|---|---|
mode | int | The multilink mode value. |
Sets the offset between multiple links between the same pair of
nodes.
If the multilink mode is
BasicLinkStyleLayout.STRAIGHT_LINE_BUNDLE
or
BasicLinkStyleLayout.NARROW_STRAIGHT_LINE_BUNDLE
, it is the
offset between the the multiple straight line links. If the
multilink mode is
BasicLinkStyleLayout.CONNECTED_ONE_BEND_BUNDLE
or
BasicLinkStyleLayout.FREE_ONE_BEND_BUNDLE
, it is the offset
between the bends that are added to the multiple links to avoid that
those links overlap. If the multilink mode is
BasicLinkStyleLayout.NO_BUNDLE
, the offset has no effect.
The straight links, or the multilink bends, respectively, are
shifted relative to each other by the multilink offset unless the
number of links times the offset exceeds the max spread value. In
that case, the offset is limited by the max spread value. If the
multilink mode is
BasicLinkStyleLayout.NARROW_STRAIGHT_LINE_BUNDLE
, the offset
is further limited by the node size.
This offset affects only links that are no self-links. See
BasicLinkStyleLayout.setMultiSelfLinkOffset()
for the same
parameter at self-links.
The default value is 10
.
Parameter | Type | Description |
---|---|---|
offset | Number | The offset value. |
Sets the distribution of bundles of multiple self-links (that is, multiple links that start and end at the same node). Self-link bundles form essentially nested rectangles or circles. There is a reference point at the node border and this reference point is either in the middle of the bundle, or at the outermost circle or at the innermost cicle. Valid values are:
-
BasicLinkStyleLayout.CENTERED
- centered (default). The middle of a bundle of multiple self-links is attached at the reference points for self-links. The nested circles are equally spread out towards the inner nesting and towards the outer nesting. -
BasicLinkStyleLayout.OUTER
- towards outer nestings. The innermost self-link of a bundle of multiple self-links is attached at the reference points for self-links and the remaining self-links are distributed towards the outer of the nestings. -
BasicLinkStyleLayout.INNER
- towards inner nestings. The outermost self-link of a bundle of multiple self-links is attached at the reference points for self-links and the remaining self-links are distributed towards the inner of the nestings.
BasicLinkStyleLayout.NO_RESHAPE_STYLE
and the
self-link mode is not BasicLinkStyleLayout.NO_BENDS
.
Parameter | Type | Description |
---|---|---|
distribution | int | The distribution mode for multiple self-links. |
Sets the maximum spread width between multiple self-links (that is, multiple links that start and end at the same node).
If the self-link mode is not
BasicLinkStyleLayout.NO_BENDS
, bends are added to self-links.
If there are multiple self-links at the same node, the bends are
shifted relative to each other by the multiple self-link offset
unless the number of self-links times the offset exceeds the max
spread value. In that case, the offset is limited by the max spread
value. If the self-link mode is
BasicLinkStyleLayout.NARROW_CONNECTED_RECTANGULAR
,
BasicLinkStyleLayout.NARROW_CONNECTED_SQUARE
,
BasicLinkStyleLayout.NARROW_FREE_RECTANGULAR
, or
BasicLinkStyleLayout.NARROW_FREE_SQUARE
, the offset is
further limited by the node size. If the self-link mode is
BasicLinkStyleLayout.NO_BENDS
, the maximum spread width has
no effect.
This maximum spread width affects only self-links, no other
multilinks. See
BasicLinkStyleLayout.setMultiLinkMaxSpread()
for the same
parameter at other multilinks.
The default maximum spread value is 50
.
Parameter | Type | Description |
---|---|---|
maxSpread | Number | The maximum spread value. |
Sets the offset between multiple self-links (that is, multiple links that start and end at the same node).
If the self-link mode is not
BasicLinkStyleLayout.NO_BENDS
, bends are added to self-links.
If there are multiple self-links at the same node, the bends are
shifted relative to each other by the multiple self-link offset
unless the number of self-links times the offset exceeds the
multiple self-link max spread value. In that case, the offset is
limited by the max spread value. If the self-link mode is
BasicLinkStyleLayout.NARROW_CONNECTED_RECTANGULAR
,
BasicLinkStyleLayout.NARROW_CONNECTED_SQUARE
,
BasicLinkStyleLayout.NARROW_FREE_RECTANGULAR
, or
BasicLinkStyleLayout.NARROW_FREE_SQUARE
, the offset is
further limited by the node size. If the self-link mode is
BasicLinkStyleLayout.NO_BENDS
, the offset has no effect.
This offset affects only self-links, no other multilinks. See
BasicLinkStyleLayout.setMultiLinkOffset()
for the same
parameter at other multilinks.
The default value is 10
.
Parameter | Type | Description |
---|---|---|
offset | Number | The offset value. |
Sets the offset value. The Circular Layout algorithm tries to ensure that the minimum distance between two nodes is approximately equal to the offset value.
The default value is 10
.
Parameter | Type | Description |
---|---|---|
offsetValue | Number | The offset between two nodes. |
Allows you to specify a root cluster for the connected component of the graph of clusters to which it belongs.
If a root cluster is not specified for a connected component of the graph of clusters, an arbitrary cluster is used.
This parameter is only used if the clustering mode (see
CircularLayout.setClusteringMode()
) is
CircularLayout.BY_CLUSTER_IDS
.
Parameter | Type | Description |
---|---|---|
clusterId | ibm_ilog.graphlayout.circular.CircularClusterId | The cluster identifier of the root cluster. |
Allows you to specify the root cluster for each connected component of the graph of clusters.
If a root cluster is not specified for a connected component of the graph of clusters, an arbitrary cluster is used.
This parameter is only used if the clustering mode (see
CircularLayout.setClusteringMode()
) is
CircularLayout.BY_CLUSTER_IDS
.
Parameter | Type | Description |
---|---|---|
clusterIds | The | cluster identifiers of the root clusters. |
Sets the absolute attach position at the node border for self-links
(that is, links that start and end at the same node).
The x value of the position specifies a point at the top or bottom
border of the node, and the y value of the position specifies a
point at the left or right border of the node. The absolute attach
position is expressed as absolute coordinate units. Self-links occur
at a corner of the node, and the relative position is specified with
respect to this corner. For instance, if the self-link occurs at the
bottom right corner, the attach position (10, 20)
specifies that the self-link goes from 10 units away from the corner
at the bottom side (that is, x = node.x + node.width -
10
) to 20 units away from the corner at the right side (that
is, y = node.y + node.height - 20
).
If the self-link mode is
BasicLinkStyleLayout.CONNECTED_SQUARE
,
BasicLinkStyleLayout.NARROW_CONNECTED_SQUARE
,
BasicLinkStyleLayout.FREE_SQUARE
, or
BasicLinkStyleLayout.NARROW_FREE_SQUARE
, then the attach
position is only respected at one side and calculate on the other
side to form a square.
The real attach position is the sum of the relative attach position
The real attach position is the sum of the relative attach position and the absolute attach position.
The default value of the absolute attach position is (0,
0)
.
Parameter | Type | Description |
---|---|---|
position | Point | The absolute attach position for self-links. |
Sets which corners are allowed to have self-links (that is, links
that start and end at the same node).
The default value is BasicLinkStyleLayout.ALL_CORNERS
,
that is, a combination of all the possible values:
-
BasicLinkStyleLayout.TOP_LEFT
: top left corner. -
BasicLinkStyleLayout.TOP_RIGHT
: top right corner. -
BasicLinkStyleLayout.BOTTOM_RIGHT
: bottom right corner. -
BasicLinkStyleLayout.BOTTOM_LEFT
: bottom left corner.
Parameter | Type | Description |
---|---|---|
corners | int | A bitwise-Or combination of the following values: BasicLinkStyleLayout.TOP_LEFT: top left corner; BasicLinkStyleLayout.TOP_RIGHT: top right corner; BasicLinkStyleLayout.BOTTOM_RIGHT: bottom right corner; BasicLinkStyleLayout.BOTTOM_LEFT: bottom left corner; or the value BasicLinkStyleLayout.ALL_CORNERS. |
Sets whether self-links (that is, links that start and end at the
same node) connect towards the node center.
This is disabled by default. It has only an effect for the self-link
modes BasicLinkStyleLayout.CONNECTED_RECTANGULAR
,
BasicLinkStyleLayout.NARROW_CONNECTED_RECTANGULAR
,
BasicLinkStyleLayout.CONNECTED_SQUARE
, or
BasicLinkStyleLayout.NARROW_CONNECTED_SQUARE
. If disabled,
the self-link segments incident to the node border are orthogonal to
the node border. If enabled, the self-link segments are rotated to
point towards the node center.
Parameter | Type | Description |
---|---|---|
enable | Boolean | Whether the option is enabled. |
Sets the mode how self-links (that is, links that start and end at the same node) are laid out. Valid values are:
-
BasicLinkStyleLayout.NO_BENDS
- no reshape. Self-links are not reshaped with bends and may not be visible after layout. -
BasicLinkStyleLayout.CONNECTED_RECTANGULAR
- rectangular self-links with 3 bends and connection. Self-links are reshaped with 3 bends placed in orthogonal style so that the link segments approximately resemble three quarters of a rectangle (the fourth quarter being the node where the self-link is attached). The connection points are placed on the border of the node. -
BasicLinkStyleLayout.FREE_RECTANGULAR
- rectangular self-links with 3 bends without enforced connection. Self-links are reshaped with 3 bends placed at the same position likeBasicLinkStyleLayout.CONNECTED_RECTANGULAR
. However, the link connection points are not enforced, that is, the nodes and links are free to decide themselves where to place the connection point. Since the connection point is not enforced, the link segments in free rectangular mode may not be orthogonal. -
BasicLinkStyleLayout.CONNECTED_SQUARE
- square self-links with 3 bends and connection. Self-links are reshaped with 3 bends placed in orthogonal style so that the link segments approximately resemble three quarters of a square (the fourth quarter being the node where the self-link is attached). If the self-link is a spline link, the square shape might be more appropriate than a rectangular shape since the spline then may approximately resemble three quarters of a circle. The connection points are placed on the border of the node. -
BasicLinkStyleLayout.FREE_SQUARE
- square self-links with 3 bends without enforced connection. Self-links are reshaped with 3 bends placed at the same position likeBasicLinkStyleLayout.CONNECTED_SQUARE
. If the self-link is a spline link, the square shape might be more appropriate than a rectangular shape since the spline then may approximately resemble three quarters of a circle. However, the link connection points are not enforced, that is, the nodes and links are free to decide themselves where to place the connection point. Since the connection point is not enforced, the link segments in free rectangular mode may not be orthogonal. -
BasicLinkStyleLayout.NARROW_CONNECTED_RECTANGULAR
- narrow rectangular self-links with 3 bends and connection (default). Self-links are reshaped with 3 bends placed in orthogonal style so that the link segments approximately resemble three quarters of a rectangle (the fourth quarter being the node where the self-link is attached). The connection points are placed on the border of the node. For single self-links, this mode has the same effect likeBasicLinkStyleLayout.CONNECTED_RECTANGULAR
. If you have multiple self-links at the same node, the self-links are shifted by an offset to avoid overlaps. In this case, this mode differs fromBasicLinkStyleLayout.CONNECTED_RECTANGULAR
, as the self-link bundle may appear more narrow since the shift offset of the multiple self-links is limited by the size of the end node. -
BasicLinkStyleLayout.NARROW_FREE_RECTANGULAR
- narrow rectangular self-links with 3 bends without enforced connection. Self-links are reshaped with 3 bends placed at the same position likeBasicLinkStyleLayout.NARROW_CONNECTED_RECTANGULAR
. For single self-links, this mode has the same effect likeBasicLinkStyleLayout.FREE_RECTANGULAR
. If you have multiple self-links at the same node, the self-links are shifted by an offset to avoid overlaps. In this case, this mode differs fromBasicLinkStyleLayout.FREE_RECTANGULAR
, as the self-link bundle may appear more narrow since the shift offset of the multiple self-links is limited by the size of the end node. The link connection points are not enforced, that is, the nodes and links are free to decide themselves where to place the connection point. Since the connection point is not enforced, the link segments in free rectangular mode may not be orthogonal. -
BasicLinkStyleLayout.NARROW_CONNECTED_SQUARE
- narrow square self-links with 3 bends and connection. Self-links are reshaped with 3 bends placed in orthogonal style so that the link segments approximately resemble three quarters of a square (the fourth quarter being the node where the self-link is attached). If the self-link is a spline link, the square shape might be more appropriate than a rectangular shape since the spline then may approximately resemble three quarters of a circle. The connection points are placed on the border of the node. For single self-links, this mode has the same effect likeBasicLinkStyleLayout.CONNECTED_SQUARE
. If you have multiple self-links at the same node, the self-links are shifted by an offset to avoid overlaps. In this case, this mode differs fromBasicLinkStyleLayout.CONNECTED_SQUARE
, as the self-link bundle may appear more narrow since the shift offset of the multiple self-links is limited by the size of the end node. -
BasicLinkStyleLayout.NARROW_FREE_SQUARE
- narrow square self-links with 3 bends without enforced connection. Self-links are reshaped with 3 bends placed at the same position likeBasicLinkStyleLayout.NARROW_CONNECTED_SQUARE
. If the self-link is a spline link, the square shape might be more appropriate than a rectangular shape since the spline then may approximately resemble three quarters of a circle. For single self-links, this mode has the same effect likeBasicLinkStyleLayout.FREE_SQUARE
. If you have multiple self-links at the same node, the self-links are shifted by an offset to avoid overlaps. In this case, this mode differs fromBasicLinkStyleLayout.FREE_SQUARE
, as the self-link bundle may appear more narrow since the shift offset of the multiple self-links is limited by the size of the end node. The link connection points are not enforced, that is, the nodes and links are free to decide themselves where to place the connection point. Since the connection point is not enforced, the link segments in free square mode may not be orthogonal.
BasicLinkStyleLayout.NO_RESHAPE_STYLE
.
Parameter | Type | Description |
---|---|---|
mode | int | The mode for self-links. |
Sets the orientation of self-links (that is, links that start and end at the same node). Valid values are:
-
BasicLinkStyleLayout.CLOCK_WISE
- clockwise (default). -
BasicLinkStyleLayout.COUNTER_CLOCK_WISE
- counterclockwise. -
BasicLinkStyleLayout.HORIZONTAL_TO_VERTICAL
- horizontal to vertical. Self-links start at the left or right side of the node with a horizontal segment and end at the top or bottom side of the node with a vertical segment. -
BasicLinkStyleLayout.VERTICAL_TO_HORIZONTAL
- vertical to horizontal. Self-links start at the top or bottom side of the node with a vertical segment and end at the left or right side of the node with a horizontal segment.
BasicLinkStyleLayout.NO_RESHAPE_STYLE
and the self-link mode
is not BasicLinkStyleLayout.NO_BENDS
.
Parameter | Type | Description |
---|---|---|
orientation | int | The orientation mode for self-links. |
Sets the relative attach position at the node border for self-links
(that is, links that start and end at the same node).
The x value of the position specifies a point at the top or bottom
border of the node, and the y value of the position specifies a
point at the left or right border of the node. The relative attach
position is expressed as a fraction of the width and height of the
node bounding box. Self-links occur at a corner of the node, and the
relative position is specified with respect to this corner. For
instance, the attach position (0.5, 0.1)
specifies the
middle of the top or bottom side and a point that is one tenth of
the node height away from the corner of the self-link at the left or
right side. If the self-link occurs at the bottom right corner, it
goes from the middle of the bottom side, to a point at the right
side that is 10% away from that corner. The attach position
(0.0, 0.0)
specifies exactly the corresponding corner.
The attach position (1.0, 1.0)
specified the, in each
direction, opposite corners, that is, if the self-link occurs at the
bottom right corner, it goes from the bottom left corner to the top
right corner. Such extreme values are perhaps not useful; they are
mentioned only to illustrate the meaning of the relative position.
The coordinate range for useful values is approximately between 0.1
and 0.5 for the relative position.
If the self-link mode is
BasicLinkStyleLayout.CONNECTED_SQUARE
,
BasicLinkStyleLayout.NARROW_CONNECTED_SQUARE
,
BasicLinkStyleLayout.FREE_SQUARE
, or
BasicLinkStyleLayout.NARROW_FREE_SQUARE
, then the attach
position is only respected at one side and calculate on the other
side to form a square.
The real attach position is the sum of the relative attach position and the absolute attach position.
The default value of the relative attach position is (0.5,
0.5)
.
Parameter | Type | Description |
---|---|---|
position | Point | The relative attach position for self-links. |
Sets the minimal spacing between node border and self-links (that
is, links that start and end at the same node).
If the self-link mode is
BasicLinkStyleLayout.NO_BENDS
, the offset has no effect.
If the spacing is negative, the spacing is calculated automatically.
This is in particular useful for the self-link modes
BasicLinkStyleLayout.CONNECTED_SQUARE
and
BasicLinkStyleLayout.NARROW_CONNECTED_SQUARE
in combination
with spline links, to form approximate circle shapes for the
self-links.
The default value is 5
.
Parameter | Type | Description |
---|---|---|
spacing | Number | The spacing value. |
Allows you to specify whether node
is the central node
of a star cluster.
This parameter is only used if the clustering mode (see
CircularLayout.setClusteringMode()
) is
CircularLayout.BY_CLUSTER_IDS
or
CircularLayout.AUTOMATIC
.
Parameter | Type | Description |
---|---|---|
node | Object | The node. |
starCenter | Boolean | 'true' if the node is the central node of a star cluster. |
Sets whether the structure of the graph is up to date.
If the argument is false
, notifies the layout instance
that the structure of the graph was changed since the last time the
layout was successfully performed.
Usually you do not need to call this method. The method is
automatically called with a true
argument each time the
layout is successfully performed.
Parameter | Type | Description |
---|---|---|
uptodate |
Indicates that this layout class can stop the layout computation
when the user-defined allowed time is exceeded.
The result code in the layout report is
ibm_ilog.graphlayout.GraphLayoutReport.STOPPED_AND_INVALID
in
this case. Subclasses may return a different result code if the
method BasicLinkStyleLayout.getLayoutCodeOnInterrupt()
is overridden.
Indicates that this layout class can cut the attached graph into
connected components, apply itself to each connected component
separately, and then use the layout instance returned by the method
ibm_ilog.graphlayout.GraphLayout.getLayoutOfConnectedComponents()
to position the connected components.
By default, this layout is an instance of
ibm_ilog.graphlayout.grid.GridLayout
which can be customized
as needed.
Indicates that this layout class takes into account a user-defined region (a rectangle) or a user-defined manager view to compute the dimensions of the drawing.
However, it is not possible to allow the user to control the size of the layout by specifying a bounding box for the drawing. The layout algorithm determines the size so that it has enough space to avoid overlapping nodes and clusters.
The layout region setting (which is either your own or the default setting) is used only to determine the position of the center of the drawing. That means that only the center of the layout region is taken into consideration when performing the layout.
Note that this parameter is only used if the clustering mode (see
CircularLayout.setClusteringMode()
) is
CircularLayout.BY_CLUSTER_IDS
or
CircularLayout.AUTOMATIC
.
Indicates that this layout class can use a link connection box interface to calculate the end points of a link. The link connection box interface is an object that provides the rectangle to which the links are connected for each node and the tangential shift offset at each side for the connection points.
The connection box interface is only used if the link style is
straight line. It is used when the option
"connect links to node centers" (see
BasicLinkStyleLayout.isConnectLinksToNodeCenters()
) is
enabled. It is used for multilink bundles unless the multilink mode
is BasicLinkStyleLayout.NO_BUNDLE
or
BasicLinkStyleLayout.FREE_ONE_BEND_BUNDLE
. It is used for
self-links if the self-link mode is
BasicLinkStyleLayout.CONNECTED_RECTANGULAR
,
BasicLinkStyleLayout.NARROW_CONNECTED_RECTANGULAR
,
BasicLinkStyleLayout.CONNECTED_SQUARE
, or
BasicLinkStyleLayout.NARROW_CONNECTED_SQUARE
. In all other
cases, the layout algorithms does not actively place the end points
of links, hence it is not used.
When the connection box interface is used, the layout algorithm
calculates the virtual center of the end nodes of each link by the
link connection box interface and routes the links relative to those
centers. The virtual center is defined as the center of the
connection box shifted by the average of the tangential "top" and
"bottom" offsets in the horizontal direction, and by the average of
the tangential "left" and "right" offsets in the vertical direction.
For instance, if the tangential offset is 20 at the top side and 10
at all other sides, the average shift offset is (20 + 10)/2 =
15
in the horizontal direction and (10 + 10)/2 =
10
in the vertical direction; hence, the virtual center is at
connectionBox.center() + (15, 10)
.
Indicates that this layout class allows the user to specify fixed
links.
Fixed links are not reshaped during the layout if the method
ibm_ilog.graphlayout.GraphLayout.setPreserveFixedLinks()
is
called with a true
argument.
Indicates that this layout class allows the user to specify fixed
nodes.
Fixed nodes are not positioned during the layout if the method
ibm_ilog.graphlayout.GraphLayout.setPreserveFixedLinks()
is
called with a true
argument. The base class
BasicLinkStyleLayout
does not move any nodes anyway, hence
specifying nodes as fixed is not necessary. All subclasses of this
class however move nodes, and specifying nodes as fixed for a
subclass can be useful.
Indicates that this layout class can interrupt the current run of
the layout immediately in a controlled way.
The result code in the layout report is
ibm_ilog.graphlayout.GraphLayoutReport.STOPPED_AND_INVALID
in
this case. Subclasses may return a different result code if the
method BasicLinkStyleLayout.getLayoutCodeOnInterrupt()
is overridden.