public class IlvLinkLayout extends IlvGraphLayout
The Link Layout algorithm reshapes the links of a graph without moving
the nodes. By default, the algorithm computes orthogonal links (that
is, links composed of alternating horizontal and vertical segments).
Optionally, direct links can be computed. See the method setGlobalLinkStyle(int)
.
The layout algorithm has two modes: short link mode and long link mode. The short link mode places the links freely in the plane by choosing the best shape from a fixed number of link shapes. A link has a maximum of 4 bends. The long link mode searches for routes on a grid by avoiding obstacles. By doing this, any link shape can occur (that is, the number of link shapes is unlimited) but a long link route can have many bends.
The long link mode is slower and uses more memory on very large graphs than the short link mode. The short link mode should be used if any of the following conditions apply:
The short link mode works very well with thick links produced by Java 2D:
Here are sample drawings produced by the Link Layout algorithm in long link mode:
The long link mode can be used to find a route through a labyrinth:
The Link Layout algorithm is a wrapper that allows simplified access to two sublayouts: the Short Link Layout algorithm and the Long Link Layout algorithm. It calls these sublayouts internally to perform the layout. This is useful for applications that need to use both layout modes at the same time. Applications that use the short link mode exclusively can use the Short Link Layout algorithm (
IlvShortLinkLayout
) directly. Applications that use the long link
mode exclusively can use the Long Link Layout algorithm (IlvLongLinkLayout
) directly.
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, and so on.
Note the following points:
setPreserveFixedLinks(boolean)
is
enabled, or links that have the link style NO_RESHAPE_STYLE
,
are not reshaped. The incremental mode cannot be used for intergraph
links.Modifier and Type | Field and Description |
---|---|
static int |
DIRECT_STYLE
Direct link style option.
|
static int |
FIXED_MODE
Fixed connection point mode.
|
static int |
FREE_MODE
Free connection point mode.
|
static int |
LONG_LINKS
Long links layout mode.
|
static int |
MIXED_MODE
Mixed connection point mode.
|
static int |
MIXED_STYLE
Mixed link style option.
|
static int |
NO_RESHAPE_STYLE
No reshape link style option.
|
static int |
ORTHOGONAL_STYLE
Orthogonal link style option.
|
static int |
SHORT_LINKS
Short links layout mode.
|
INVERSE_VIEW_COORDINATES, MANAGER_COORDINATES, VIEW_COORDINATES
Constructor and Description |
---|
IlvLinkLayout()
Creates a new instance of the Link Layout algorithm.
|
IlvLinkLayout(IlvLinkLayout source)
Creates a new layout instance by copying an existing one.
|
Modifier and Type | Method and Description |
---|---|
void |
attach(IlvGraphModel graphModel)
Allows you to specify the graph model you want to lay out.
|
int |
checkAppropriateLink(Object link)
Checks whether the input link is appropriate for this layout.
|
void |
checkAppropriateLinks()
Throws an exception if the links are not appropriate for the layout.
|
IlvGraphLayout |
copy()
Copies the layout instance.
|
void |
copyParameters(IlvGraphLayout source)
Copies the parameters from a given layout instance.
|
protected IlvGraphLayoutGrapherProperty |
createLayoutGrapherProperty(String name,
boolean withDefaults)
Returns a new instance of
IlvLinkLayoutGrapherProperty that
stores the parameter settings of this layout class. |
protected IlvGraphLayoutLinkProperty |
createLayoutLinkProperty(String name,
IlvGraphic link,
boolean withDefaults)
Returns a new instance of
IlvLinkLayoutLinkProperty that
stores the parameter settings of this layout class for links. |
void |
detach()
Detaches the graph model from the layout instance.
|
int |
getDestinationPointMode(Object link)
Returns the destination point mode of an individual link.
|
int |
getGlobalDestinationPointMode()
Returns the global mode for the connection points of the links on the
destination nodes.
|
int |
getGlobalLinkStyle()
Returns the global style of the shapes of links.
|
int |
getGlobalOriginPointMode()
Returns the global mode for the connection points of the links on the
origin nodes.
|
double |
getHorizontalGridBase()
Returns the horizontal base coordinate of the grid.
|
double |
getHorizontalGridOffset()
Returns the horizontal offset between the grid lines.
|
double |
getHorizontalMinOffset()
Returns the minimal horizontal offset between the node border and a
link segment that is (vertically) parallel to the node border.
|
int |
getLayoutMode()
Returns the current layout mode.
|
double |
getLinkOffset()
Returns the offset between links connected on the same side of the
node.
|
int |
getLinkStyle(Object link)
Returns the shape style of an individual link.
|
IlvLongLinkLayout |
getLongLinkLayout()
Returns the Long Link Layout instance that is used internally by this
Link Layout instance in layout mode
LONG_LINKS . |
double |
getMinFinalSegmentLength()
Returns the minimum length of the first and last segments of each
link.
|
double |
getMinNodeCornerOffset()
Returns the minimum offset between a node corner and a link starting
at this node.
|
IlvNodeBoxInterface |
getNodeBoxInterface()
Returns the node box interface used during the layout, or
null if none is specified. |
IlvNodeSideFilter |
getNodeSideFilter()
Returns the node-side filter used during layout, or
null
if none is specified. |
int |
getOriginPointMode(Object link)
Returns the origin point mode of an individual link.
|
IlvShortLinkLayout |
getShortLinkLayout()
Returns the Short Link Layout instance that is used internally by this
Link Layout instance in layout mode
SHORT_LINKS . |
double |
getVerticalGridBase()
Returns the vertical base coordinate of the grid.
|
double |
getVerticalGridOffset()
Returns the vertical offset between the grid lines.
|
double |
getVerticalMinOffset()
Returns the minimal vertical offset between the node border and a link
segment that is (horizontally) parallel to the node border.
|
protected void |
init()
Initializes instance variables.
|
boolean |
isCombinedInterGraphLinksMode()
Returns
true if the routing of normal links in addition
to intergraph links is enabled. |
boolean |
isGeometryUpToDate()
Returns
false if at least one node, link, label or
obstacle was moved or reshaped since the last time the layout was
successfully performed on the same graph or if the layout has never
been performed successfully on the same graph. |
boolean |
isIncrementalMode()
Returns
true if the incremental mode is enabled. |
boolean |
isInterGraphLinksMode()
Returns
true if the routing of intergraph links is
enabled. |
boolean |
isParametersUpToDate()
Returns
false if at least one parameter was modified
since the last time the layout was successfully performed on the same
graph or if the layout has never been performed successfully on the
same graph. |
boolean |
isStructureUpToDate()
Returns
false if at least one modification occurred in
the structure of the graph since the last time the layout was
successfully performed on the same graph or if the layout has never
been performed successfully on the same graph. |
protected void |
layout(boolean redraw)
Computes the layout using the Link Layout algorithm.
|
void |
markForIncremental(Object link)
Marks the input link to be rerouted with the next call of
performLayout if incremental mode is enabled. |
void |
setAllowedTime(long time)
Sets an upper limit for the duration of the layout algorithm.
|
void |
setAnimate(boolean option)
Enables the animation mechanism.
|
boolean |
setAutoCheckAppropriateLinksEnabled(boolean enable)
Sets whether the layout checks whether links are appropriate.
|
void |
setAutoLayout(boolean enable)
Enables the auto layout mode.
|
void |
setBalanceSplineCurveThreshold(double threshold)
Sets the threshold for spline curves on arcs until the optimized
spline control point routing tries to balance the curve.
|
void |
setCombinedInterGraphLinksMode(boolean enable)
Enables the routing of normal links in addition to intergraph links.
|
void |
setCoordinatesMode(int mode)
Sets the coordinates mode.
|
void |
setDestinationPointMode(Object link,
int mode)
Sets the mode for the connection point on an individual link on the
destination node.
|
void |
setFixed(Object nodeOrLink,
boolean fixed)
Allows you to specify whether a link is fixed.
|
void |
setGeometryUpToDate(boolean uptodate)
This method is normally called with a
false argument if
the geometry of the graph changed. |
void |
setGlobalDestinationPointMode(int mode)
Sets the global mode for the connection point of the links on the
destination nodes.
|
void |
setGlobalLinkStyle(int style)
Sets the global style of the shapes of links.
|
void |
setGlobalOriginPointMode(int mode)
Sets the global mode for the connection point of the links on the
origin nodes.
|
void |
setGraphModel(IlvGraphModel graphModel)
Sets the graph model to be laid out.
|
void |
setHorizontalGridBase(double coordinate)
Sets the horizontal base coordinate of the grid.
|
void |
setHorizontalGridOffset(double offset)
Sets the horizontal offset between the grid lines.
|
void |
setHorizontalMinOffset(double offset)
Sets the minimal horizontal offset between the node border and a link
segment that is (vertically) parallel to the node border.
|
void |
setIncrementalMode(boolean enable)
Enables the incremental layout mode.
|
void |
setInputCheckEnabled(boolean enable)
Enables the checks for the nodes and/or links provided as arguments
for the different methods of this layout algorithm.
|
void |
setInterGraphLinksMode(boolean enable)
Enables the routing of intergraph links.
|
void |
setLayoutMode(int mode)
Sets the layout mode.
|
void |
setLayoutRunning(boolean running,
boolean fromParents)
Sets whether layout is running.
|
void |
setLinkConnectionBoxInterface(IlvLinkConnectionBoxInterface connectionBoxInterface)
Allows you to specify a link connection box interface for the
connection points of links.
|
void |
setLinkOffset(double offset)
Sets the offset between links connected on the same side of the node.
|
void |
setLinkStyle(Object link,
int style)
Sets the shape style of an individual link.
|
void |
setMaxSplineCurveSize(double size)
Sets the maximum curve size used when optimized spline control point
routing is enabled.
|
void |
setMinBusyTime(long time)
Sets the minimal time that the layout algorithm can be busy between
two calls of
layoutStepPerformed when the method
callLayoutStepPerformedIfNeeded is used. |
void |
setMinFinalSegmentLength(double length)
Sets the minimum length of the first and last segments of each link.
|
void |
setMinNodeCornerOffset(double offset)
Sets the minimum offset between a node corner and a link starting at
this node.
|
void |
setMinSplineCurveSize(double size)
Sets the minimum curve size used when optimized spline control point
routing is enabled.
|
void |
setNodeBoxInterface(IlvNodeBoxInterface nodeBoxInterface)
Allows you to specify a node box interface for the obstacle area.
|
void |
setNodeSideFilter(IlvNodeSideFilter filter)
Allows you to install a node-side filter, that is, an object that
allows or prohibits the connection of the links on a given side of
the nodes.
|
void |
setOriginPointMode(Object link,
int mode)
Sets the mode for the connection point on an individual link on the
origin node.
|
void |
setParametersUpToDate(boolean uptodate)
This method is automatically called with a
false argument
each time the value of a parameter is changed. |
void |
setPreserveFixedLinks(boolean option)
If the argument is
true , specifies that the layout is not
allowed to reshape the links indicated as fixed by the user. |
void |
setSplineLinkFilter(IlvSplineLinkFilter filter)
Sets the filter that detects which links are suitable for optimized
spline routing.
|
void |
setSplineRoutingEnabled(boolean flag)
Sets whether the calculation of optimized spline control points is
enabled.
|
void |
setStructureUpToDate(boolean uptodate)
This method is normally called with a
false argument if
the structure of the graph changed. |
void |
setUseDefaultParameters(boolean option)
If the argument is
true , specifies that the layout use
the default values of all the parameters; that is, the "get..." and
"is..." methods return the default values. |
void |
setVerticalGridBase(double coordinate)
Sets the vertical base coordinate of the grid.
|
void |
setVerticalGridOffset(double offset)
Sets the vertical offset between the grid lines.
|
void |
setVerticalMinOffset(double offset)
Sets the minimal vertical offset between the node border and a link
segment that is (horizontally) parallel to the node border.
|
boolean |
stopImmediately()
Stops the running layout algorithm as soon as possible.
|
boolean |
supportsAllowedTime()
Indicates that this layout class can stop the layout computation in a
proper manner when the user-defined allowed time is exceeded.
|
boolean |
supportsAnimation()
Indicates that this layout class supports the animation mechanism;
that is, it can perform redraws to animate the layout process in some
way.
|
boolean |
supportsLinkConnectionBox()
Indicates that this layout class can use a link connection box
interface to calculate the end points of a link.
|
boolean |
supportsPreserveFixedLinks()
Indicates that this layout class allows the user to specify fixed
links.
|
boolean |
supportsSaveParametersToNamedProperties()
Indicates that this layout class can transfer the layout parameters to
named properties.
|
boolean |
supportsSplineRouting()
Indicates that this class supports the generic optimization of spline
control points.
|
boolean |
supportsStopImmediately()
Indicates that this layout class can interrupt the current run of the
layout immediately in a controlled way.
|
addGraphLayoutEventListener, addGraphLayoutParameterEventListener, afterLayoutOfSubgraph, attach, beforeLayout, beforeLayoutOfSubgraph, callLayoutStepPerformedIfNeeded, cleanGraphModel, cleanLink, cleanNode, clipAllLinks, clipLink, connectAllLinksToCenter, connectLinkToCenter, contentsChanged, createLayoutNodeProperty, createLayoutReport, getAllowedTime, getAutoLayoutHandler, getBalanceSplineCurveThreshold, getCalcLayoutRegion, getCoordinatesMode, getGrapher, getGraphModel, getInstanceId, getLayout, getLayoutOfConnectedComponents, getLayoutOfConnectedComponentsReport, getLayoutRegion, getLayoutReport, getLayouts, getLinkClipInterface, getLinkConnectionBoxInterface, getMaxSplineCurveSize, getMinBusyTime, getMinSplineCurveSize, getMovingNodes, getParentLayout, getProperty, getProperty, getRecursiveLayout, getRemainingAllowedTime, getSeedValueForRandomGenerator, getSpecLayoutRegion, getSplineLinkFilter, increasePercentageComplete, isAnimate, isAutoLayout, isFitToView, isFixed, isInputCheckEnabled, isLayoutNeeded, isLayoutOfConnectedComponentsEnabled, isLayoutOfConnectedComponentsEnabledByDefault, isLayoutRunning, isLayoutRunning, isLayoutTimeElapsed, isLocalRecursiveLayoutNeeded, isMemorySavings, isPreserveFixedLinks, isPreserveFixedNodes, isSplineRoutingEnabled, isStoppedImmediately, isUseDefaultParameters, isUseSeedValueForRandomGenerator, layoutStepPerformed, onParameterChanged, onParameterChanged, performAutoLayout, performLayout, performLayout, performLayout, PerformLayout, performSublayout, removeGraphLayoutEventListener, removeGraphLayoutParameterEventListener, setAutoLayoutHandler, setGrapher, setLayoutOfConnectedComponents, setLayoutOfConnectedComponentsEnabled, setLayoutRegion, setLayoutRegion, setLayoutRegion, setLayoutReport, setLinkClipInterface, setMemorySavings, setParentLayout, setPreserveFixedNodes, setProperty, setProperty, setSeedValueForRandomGenerator, setUseSeedValueForRandomGenerator, supportsLayoutOfConnectedComponents, supportsLayoutRegion, supportsLinkClipping, supportsMemorySavings, supportsPercentageComplete, supportsPreserveFixedNodes, supportsRandomGenerator, unfixAllLinks, unfixAllNodes, useAnimateRedraw
public static final int ORTHOGONAL_STYLE
setGlobalLinkStyle(int)
, all links have an orthogonal shape
(alternating horizontal and vertical segments). To specify the style
of an individual link, use this option as the argument of the method
setLinkStyle(Object, int)
.public static final int DIRECT_STYLE
setGlobalLinkStyle(int)
, all links have a (semi)direct
shape. To specify the style of an individual link, use this option as
the argument of the method setLinkStyle(Object, int)
.public static final int MIXED_STYLE
setGlobalLinkStyle(int)
, each link can have a different
shape. The shape of an individual link can be set by the method
setLinkStyle(java.lang.Object, int)
.public static final int NO_RESHAPE_STYLE
MIXED_STYLE
. To specify the style
of an individual link, use this option as the argument of the method
setLinkStyle(Object, int)
.public static final int SHORT_LINKS
setLayoutMode(int)
, links are placed freely in the plane by
choosing the best shape from a fixed number of link shapes. A link
can have a maximum of 4 bends.public static final int LONG_LINKS
When used as the argument of the method setLayoutMode(int)
,
links of link style ORTHOGONAL_STYLE
are routed on a grid
and avoid obstacles. By so doing, any orthogonal link shape can occur
(that is, the number of link shapes is unlimited) and a long link
route can have many bends.
Links of link style DIRECT_STYLE
are routed with the end
segments on the grid, but the middle segment may overlap obstacles.
public static final int FREE_MODE
setGlobalOriginPointMode(int)
or setGlobalDestinationPointMode(int)
, the layout is free to choose the
appropriate position of the connection points, except for "pinned"
connection points (see IlvGraphModel.hasPinnedConnectionPoint(java.lang.Object, boolean)
). To specify the mode for the
connection points of an individual link, use this mode as the
argument of the method setOriginPointMode(java.lang.Object, int)
or setDestinationPointMode(java.lang.Object, int)
.public static final int FIXED_MODE
setGlobalOriginPointMode(int)
or setGlobalDestinationPointMode(int)
, the layout must keep the current
position of the connection point. To specify the mode for the
connection points of an individual link, use this mode as the
argument of the method setOriginPointMode(java.lang.Object, int)
or setDestinationPointMode(java.lang.Object, int)
.public static final int MIXED_MODE
setGlobalOriginPointMode(int)
or setGlobalDestinationPointMode(int)
, the connection point of each link
can have a different mode. The mode for the connection points of an
individual link can be set by the method setOriginPointMode(java.lang.Object, int)
or setDestinationPointMode(java.lang.Object, int)
.public IlvLinkLayout()
IlvGraphLayout.attach(ilog.views.IlvGrapher)
. attach(ilog.views.graphlayout.IlvGraphModel)
. IlvGraphLayout.performLayout()
. public IlvLinkLayout(IlvLinkLayout source)
copy()
method. Any subclass should
provide a copy constructor.
The parameters of the source
layout are copied using the
method copyParameters(ilog.views.graphlayout.IlvGraphLayout)
.
source
- The layout instance that is copied.copy()
,
copyParameters(ilog.views.graphlayout.IlvGraphLayout)
protected void init()
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.
init
in class IlvGraphLayout
public IlvGraphLayout copy()
This method copies the layout instance by calling the copy constructor.
When performing a recursive layout on a nested graph, IlvLayoutProvider
uses this method to "clone" the layout instance of
a parent graph. Note that the parameters which are specific to a node
or a link are not copied. Only the global parameters are copied. The
customization interfaces (node side filter, node box interface) are
also copied.
copy
in class IlvGraphLayout
copyParameters(ilog.views.graphlayout.IlvGraphLayout)
,
setNodeBoxInterface(ilog.views.graphlayout.IlvNodeBoxInterface)
,
setNodeSideFilter(ilog.views.graphlayout.IlvNodeSideFilter)
public void copyParameters(IlvGraphLayout source)
Note that the parameters which are specific to a node or a link are not copied. Only the global parameters are copied. The customization interfaces (node side filter, node box interface) are also copied.
copyParameters
in class IlvGraphLayout
source
- The layout instance from which the parameters are copied.copy()
,
setNodeBoxInterface(ilog.views.graphlayout.IlvNodeBoxInterface)
,
setNodeSideFilter(ilog.views.graphlayout.IlvNodeSideFilter)
public void attach(IlvGraphModel graphModel)
attach
in class IlvGraphLayout
graphModel
- The graph model to lay out.detach()
,
getLongLinkLayout()
,
getShortLinkLayout()
public void detach()
attach(IlvGraphModel)
. The detach
method performs cleaning operations on the graph model. In addition
to the cleaning operations in the base class, the Link Layout removes
the link style specifications of individual links.
Note that you must call this method when you no longer need the layout instance. Otherwise, some objects may not be garbage collected.
detach
in class IlvGraphLayout
attach(IlvGraphModel)
,
setLinkStyle(java.lang.Object, int)
,
getLongLinkLayout()
,
getShortLinkLayout()
public void setGraphModel(IlvGraphModel graphModel)
IlvGraphLayout.attach(IlvGrapher)
or
attach(IlvGraphModel)
.setGraphModel
in class IlvGraphLayout
IlvGraphLayout.attach(IlvGrapher)
,
IlvGraphLayout.attach(IlvGraphModel)
protected void layout(boolean redraw) throws IlvGraphLayoutException
IlvGraphLayout.performLayout()
.layout
in class IlvGraphLayout
redraw
- If true
, the attached graph model will be
asked to redraw the graph after layout. When the layout algorithm
moves the nodes and reshapes the links, it is required to pass the
value of the redraw
argument to the methods IlvGraphModel.moveNode(java.lang.Object, double, double, boolean)
and IlvGraphModel.reshapeLink(java.lang.Object, ilog.views.IlvPoint, ilog.views.IlvPoint[], int, int, ilog.views.IlvPoint, boolean)
.IlvInappropriateLinkException
- if the grapher contains links
that cannot be reshaped to a polyline and whose connection points
cannot be moved. (For details, see IlvInappropriateLinkException
).IlvGraphLayoutException
- If an unusual situation occurs.
WARNING: this method can throw one of the subclasses of IlvGraphLayoutException
. Specifically, it can throw an IlvInappropriateGraphException
. It can also throw an IlvInappropriateLinkException
when inappropriate types of links
and/or link connectors are used in an IlvGrapher
. For
details, refer to the documentation of these exception classes.IlvGraphLayout.performLayout()
public final void setLayoutMode(int mode)
SHORT_LINKS
- Links are placed freely in the plane by
choosing the best shape from a fixed number of link shapes. A link
can have a maximum of 4 bends. LONG_LINKS
- Orthogonal links are routed on a grid by
avoiding obstacles. Any orthogonal link shape can occur (that is, the
number of link shapes is not limited) but a long link route can have
many bends. Direct links are routed with the end segments on the
grid, but the middle segment may overlap obstacles.
The default value is SHORT_LINKS
.
public final int getLayoutMode()
setLayoutMode(int)
public IlvShortLinkLayout getShortLinkLayout()
SHORT_LINKS
. This allows
you to access the internal parameter settings of the Short Link
Layout.setLayoutMode(int)
,
getLongLinkLayout()
,
IlvShortLinkLayout
public IlvLongLinkLayout getLongLinkLayout()
LONG_LINKS
. This allows
you to access the internal parameter settings of the Long Link
Layout.setLayoutMode(int)
,
getShortLinkLayout()
,
IlvLongLinkLayout
public final void setAutoLayout(boolean enable)
true
,
the layout is automatically performed again each time the layout
instance is notified that the geometry or the structure of the graph
has changed.
It is disabled by default.
public void setLayoutRunning(boolean running, boolean fromParents)
setLayoutRunning
in class IlvGraphLayout
running
- Whether layout is running or not.fromParents
- Whether this is a notification from a parent layout
or from this layout instance.public final void setIncrementalMode(boolean enable)
true
, only those links that were affected by changes
since the last layout are rerouted. A link is rerouted under the
following conditions:
In short link mode, links already laid out in the last layout keep their general shape (that is keep their number of bends and do not change the side where they connect to the end nodes), except if one or both of their end nodes have been moved or resized.
In long link mode, the rerouted links can change shape completely. The rerouted links can change the side where they are connected to the end nodes if this is necessary to obtain a better route.
The incremental mode works only if the intergraph links mode is disabled or if there are no intergraph links. The incremental mode is disabled by default.
enable
- Set to true
to enable incremental layout
mode, or false
to disable it.isIncrementalMode()
,
markForIncremental(java.lang.Object)
,
setLayoutMode(int)
,
IlvGraphLayout.contentsChanged(ilog.views.graphlayout.GraphModelEvent)
,
setInterGraphLinksMode(boolean)
public final boolean isIncrementalMode()
true
if the incremental mode is enabled.setIncrementalMode(boolean)
public final void markForIncremental(Object link)
performLayout
if incremental mode is enabled. Normally,
the incremental layout reroutes only those links that have changed
since the last layout. By setting a mark on the link, this link will
be rerouted even if it has not changed.public final void setInterGraphLinksMode(boolean enable)
true
, the intergraph links are routed; otherwise, only
the normal links are routed. An intergraph link is a link stored in a
given graph that has an origin or destination not stored in this
graph. If additionally the combined intergraph link routing is
enabled, this means that normal links and intergraph links are routed
together; otherwise, only the intergraph links are routed.
The default value is true
.
If the intergraph link mode is enabled and the graph actually contains some intergraph links, there are some restrictions:
IlvGrapher
(or
IlvGrapherAdapter
), the top-level grapher must have a
manager view attached because of the coordinate transformations of
the subgraphers. If you create your own subclass of
IlvGraphModel
instead of IlvGrapherAdapter
to route intergraph links, you must ensure that all graph models of
all subgraphers use the same coordinate system through appropriate
coordinate transformations.public final boolean isInterGraphLinksMode()
true
if the routing of intergraph links is
enabled. Returns false
otherwise.setInterGraphLinksMode(boolean)
public final void setCombinedInterGraphLinksMode(boolean enable)
true
, both normal links and intergraph links are routed
in the same pass. Otherwise, only the intergraph links are routed.
The default value is true
.
isCombinedInterGraphLinksMode()
,
setInterGraphLinksMode(boolean)
,
IlvGraphModel.isInterGraphLink(java.lang.Object)
public final boolean isCombinedInterGraphLinksMode()
true
if the routing of normal links in addition
to intergraph links is enabled. It returns false
otherwise.setInterGraphLinksMode(boolean)
,
setCombinedInterGraphLinksMode(boolean)
public final void setLinkOffset(double offset)
SHORT_LINKS
where the links
are placed freely. In the layout mode LONG_LINKS
, the link
offset parameter is ignored, because the offset between links is
implicitly determined by the grid width.
The default value is 2
.
public final double getLinkOffset()
SHORT_LINKS
.setLinkOffset(double)
public final void setHorizontalGridOffset(double offset)
LONG_LINKS
where the links are routed on an
orthogonal grid. In the layout mode SHORT_LINKS
, links are
placed freely and the grid parameters are ignored.
The default value is 5
.
public final double getHorizontalGridOffset()
LONG_LINKS
.
setHorizontalGridOffset(double)
public final void setVerticalGridOffset(double offset)
LONG_LINKS
where the links are routed on an
orthogonal grid. In the layout mode SHORT_LINKS
, links are
placed freely and the grid parameters are ignored.
The default value is 5
.
public final double getVerticalGridOffset()
LONG_LINKS
.
setVerticalGridOffset(double)
public final void setHorizontalGridBase(double coordinate)
x
coordinate of the first vertical grid line. It affects
only the layout mode LONG_LINKS
where the links are routed
on an orthogonal grid. In the layout mode SHORT_LINKS
, links
are placed freely and the grid parameters are ignored.
The default value is 0
.
public final double getHorizontalGridBase()
LONG_LINKS
.
setHorizontalGridBase(double)
public final void setVerticalGridBase(double coordinate)
y
coordinate of the first horizontal grid line. It
affects only the layout mode LONG_LINKS
where the links are
routed on an orthogonal grid. In the layout mode SHORT_LINKS
, links are placed freely and the grid parameters are
ignored.
The default value is 0
.
public final double getVerticalGridBase()
LONG_LINKS
.
setVerticalGridBase(double)
public final void setHorizontalMinOffset(double offset)
LONG_LINKS
where the links are routed
on an orthogonal grid. In the layout mode SHORT_LINKS
, links
are placed freely and the grid parameters are ignored.
The default value is 3
.
public final double getHorizontalMinOffset()
LONG_LINKS
.
setHorizontalMinOffset(double)
public final void setVerticalMinOffset(double offset)
LONG_LINKS
where the links are
routed on an orthogonal grid. In the layout mode SHORT_LINKS
, links are placed freely and the grid parameters are
ignored.
The default value is 3
.
public final double getVerticalMinOffset()
LONG_LINKS
.
setVerticalMinOffset(double)
public final void setMinNodeCornerOffset(double offset)
0
enables the layout to start
a link exactly at a node corner. It affects only the layout mode
LONG_LINKS
where the links are routed on an orthogonal grid
and always connect to the node border. In the layout mode SHORT_LINKS
, links are placed freely in the plane, potentially
connecting outside the node border.
The default value is 3
.
getMinNodeCornerOffset()
,
setLayoutMode(int)
public final double getMinNodeCornerOffset()
LONG_LINKS
.
setMinNodeCornerOffset(double)
public final void setMinFinalSegmentLength(double length)
The default value is 10
.
getMinFinalSegmentLength()
public final double getMinFinalSegmentLength()
setMinFinalSegmentLength(double)
public final void setGlobalLinkStyle(int style)
ORTHOGONAL_STYLE
- all links have an orthogonal shape,
that is, a shape consisting of a sequence of alternating horizontal
and vertical line segments.DIRECT_STYLE
- all links get a nearly straight-line
shape. The shape of the links is a polyline composed of a
straight-line segment between the end nodes with two short horizontal
or vertical segments at its ends (their length is controlled by the
method setMinFinalSegmentLength
and may be
0
).MIXED_STYLE
- each link can have a different link
style. The style of each individual link can be set by the method
setLinkStyle(Object, int)
so that different link shapes can
occur in the same graph.
Unless the global link style is MIXED_STYLE
, all links have
the same shape style.
The default value is ORTHOGONAL_STYLE
.
Note that when the graph attached to the layout is of type IlvGrapher
, the effect of the link reshaping depends on the type of
the links and the connectors installed at the node. For all link
styles, we recommend using links of type IlvPolylineLinkImage
and link connectors of type
IlvFreeLinkConnector
. Other link or
connector types may cause an IlvInappropriateLinkException
during layout. You can use the method IlvGraphLayoutUtil.EnsureAppropriateLinkTypes(ilog.views.graphlayout.IlvGraphLayout, boolean)
and method IlvGraphLayoutUtil.EnsureAppropriateLinkConnectors(ilog.views.graphlayout.IlvGraphLayout, boolean)
before layout, or
the method IlvGraphLayoutUtil.EnsureAppropriateLinks(ilog.views.graphlayout.IlvGraphModel, ilog.views.graphlayout.IlvLayoutProvider)
when the
exception is caught, to convert all links and link connectors to an
appropriate type.
public final int getGlobalLinkStyle()
setGlobalLinkStyle(int)
public final void setLinkStyle(Object link, int style)
MIXED_STYLE
.
Otherwise, all links have the style that is specified as the global
link style.
Valid values are:
ORTHOGONAL_STYLE
- the link has an orthogonal shape,
that is, a shape consisting of a sequence of alternating horizontal
and vertical line segments.DIRECT_STYLE
- the link gets a nearly straight-line
shape. The shape of the link is a polyline composed of a
straight-line segment between the end nodes with two short horizontal
or vertical segments at its ends (their length is controlled by the
method setMinFinalSegmentLength
and may be
0
).NO_RESHAPE_STYLE
- the link is not reshaped.
The default value is ORTHOGONAL_STYLE
.
Note that when the graph attached to the layout is of type IlvGrapher
, the effect of the link reshaping depends on the type of
the links and the connectors installed at the node. For all link
styles, we recommend using links of type IlvPolylineLinkImage
and link connectors of type
IlvFreeLinkConnector
. Other link or
connector types may cause an IlvInappropriateLinkException
during layout. You can use the method IlvGraphLayoutUtil.EnsureAppropriateLinkTypes(ilog.views.graphlayout.IlvGraphLayout, boolean)
and method IlvGraphLayoutUtil.EnsureAppropriateLinkConnectors(ilog.views.graphlayout.IlvGraphLayout, boolean)
before layout, or
the method IlvGraphLayoutUtil.EnsureAppropriateLinks(ilog.views.graphlayout.IlvGraphModel, ilog.views.graphlayout.IlvLayoutProvider)
when the
exception is caught, to convert all links and connectors to an
appropriate type.
Note also that the Link Layout dispatches the call to its sublayouts, the Short Link Layout and the Long Link Layout. Specifying a link style on the Link Layout means that the same style is specified for both Short and Long Link Layouts.
link
- The link.style
- The shape style.getLinkStyle(java.lang.Object)
,
setGlobalLinkStyle(int)
,
setLayoutMode(int)
public int getLinkStyle(Object link)
public void setSplineRoutingEnabled(boolean flag)
IlvSplineLinkImage
and IlvGeneralLink
are used, the bend points
calculated by the layout algorithm are often suboptimal. This option
enables the optimization of spline control points. It improves the
result only if the splines use a smoothness between 0.1 and 0.9. See
IlvSplineLinkImage.setSmoothness(double)
and
IlvGeneralLink.setCurved(double)
for more
information.
Setting flag
to true
does not affect those
links that are not reshaped by the layout algorithm or are routed as
a straight line.
This is an expert option. It is disabled by default.
setSplineRoutingEnabled
in class IlvGraphLayout
flag
- true
to enable the optimization of spline
control points, or false
to disable it.IlvGraphLayout.isSplineRoutingEnabled()
public void setMinSplineCurveSize(double size)
The parameter works only if generic spline optimization routing is enabled.
Bends in splines have a size that is described roughly by the triangle that surrounds the curve part of a bend. Spline routing tries to set the side length of this triangle at each bend between the minimum curve size and the maximum curve size.
The default value is 5
.
setMinSplineCurveSize
in class IlvGraphLayout
size
- The minimum spline curve size.IlvGraphLayout.getMinSplineCurveSize()
,
setMaxSplineCurveSize(double)
,
setSplineRoutingEnabled(boolean)
public void setMaxSplineCurveSize(double size)
The parameter only works if generic spline optimization routing is enabled. Bends in splines have a size that is described roughly by the triangle that surrounds the curve part of a bend. Spline routing tries to set the side length of this triangle at each bend between the minimum curve size and the maximum curve size.
The default value is 30
.
setMaxSplineCurveSize
in class IlvGraphLayout
size
- The maximum spline curve size.IlvGraphLayout.getMaxSplineCurveSize()
,
setMinSplineCurveSize(double)
,
setSplineRoutingEnabled(boolean)
public void setBalanceSplineCurveThreshold(double threshold)
Bends in splines have a size that is described roughly by the triangle that surrounds the curve part of a bend. If the side length of the triangle is larger than the threshold, the algorithm tries to create an isosceles triangle. This results in more balanced bend curves. If the side length of the triangle is smaller than the threshold, the algorithm uses non-isosceles triangles. Isoscele triangles make the bend curve look too sharp.
The default value is 10
.
Note: the parameter works only if the generic spline optimization routing is enabled.
setBalanceSplineCurveThreshold
in class IlvGraphLayout
threshold
- The balance spline curve threshold.IlvGraphLayout.getBalanceSplineCurveThreshold()
,
setSplineRoutingEnabled(boolean)
public void setSplineLinkFilter(IlvSplineLinkFilter filter)
The filter detects which objects are splines, so that the optimized spline routing is only applied to splines, not to normal polyline links.
The default spline link filter detects all links where the method
IlvLinkImage.isSpline()
returns true
.
It detects IlvSplineLinkImage
, IlvCompositeLink
and IlvGeneralLink
objects with appropriate
parameter settings as splines.
Note: the parameter works only if the generic spline optimization routing is enabled.
setSplineLinkFilter
in class IlvGraphLayout
IlvGraphLayout.getSplineLinkFilter()
,
setSplineRoutingEnabled(boolean)
public void setFixed(Object nodeOrLink, boolean fixed)
setFixed
in class IlvGraphLayout
nodeOrLink
- Node or link instance which is part of the graph
model.fixed
- Indicates whether the object should remain fixed or not.IlvGraphLayout.isFixed(java.lang.Object)
,
setPreserveFixedLinks(boolean)
,
IlvGraphLayout.isPreserveFixedLinks()
,
IlvGraphLayout.unfixAllLinks()
public final void setGlobalOriginPointMode(int mode)
FREE_MODE
- For all links, the layout is free to choose
the appropriate position of the connection point on the origin node,
except for "pinned" connection points (see IlvGraphModel.hasPinnedConnectionPoint(java.lang.Object, boolean)
).FIXED_MODE
- For all links, the layout must keep the
current position of the connection point on the origin node. This can
be useful,in particular, if the node has fixed pins where the link is
attached (as, for instance, with IlvPinLinkConnector
) and the
pins should not be moved by the layout algorithm.
The fixed mode works only if the link connector delivers consistently
the same connection point when called multiple times. If a link is
not connected to a link connector, or if the IlvClippingLinkConnector
is used, the real connection point is
calculated on the fly and may change when called multiple times with
changing link bends. In this case, the fixed mode cannot ensure a
correct routing of the links.
MIXED_MODE
- Each link can have a different mode for
the connection point on the origin node. The mode of each individual
link can be set by the method setOriginPointMode(Object,
int)
.
Unless the global mode is MIXED_MODE
, the connection points
on the origin node have the same mode for all the links.
The default value is FREE_MODE
.
Note that the Link Layout dispatches the call to its sublayouts, the Short Link Layout and the Long Link Layout. Specifying a mode on the Link Layout means that the same mode is specified for both Short and Long Link Layouts.
mode
- The global mode to set.getGlobalOriginPointMode()
,
IlvPinLinkConnector
public final int getGlobalOriginPointMode()
setGlobalOriginPointMode(int)
public final void setGlobalDestinationPointMode(int mode)
FREE_MODE
- For all links, the layout is free to choose
the appropriate position of the connection point on the destination
node, except for "pinned" connection points (see IlvGraphModel.hasPinnedConnectionPoint(java.lang.Object, boolean)
).FIXED_MODE
- For all links, the layout must keep the
current position of the connection point on the destination node.
This can be useful, in particular, if the node has fixed pins where
the link is attached (as, for instance, with IlvPinLinkConnector
) and the pins should not be moved by the layout
algorithm.
The fixed mode works only if the link connector delivers consistently
the same connection point when called multiple times. If a link is
not connected to a link connector, or if the IlvClippingLinkConnector
is used, the real connection point is
calculated on the fly and may change when called multiple times with
changing link bends. In this case, the fixed mode cannot ensure a
correct routing of the links.
MIXED_MODE
- Each link can have a different mode for
the connection point on the destination node. The mode of each
individual link can be set by the method setDestinationPointMode(Object, int)
.
Unless the global mode is MIXED_MODE
, the connection points
on the destination node have the same mode for all the links.
The default value is FREE_MODE
.
Note that the Link Layout dispatches the call to its sublayouts, the Short Link Layout and the Long Link Layout. Specifying a mode on the Link Layout means that the same mode is specified for both Short and Long Link Layouts.
mode
- The global mode to set.getGlobalDestinationPointMode()
,
IlvPinLinkConnector
public final int getGlobalDestinationPointMode()
setGlobalDestinationPointMode(int)
public final void setOriginPointMode(Object link, int mode)
MIXED_MODE
. Otherwise, the connection points on the
origin nodes have, for all the links, the mode that is specified as
the global origin point mode.
Valid values are:
FREE_MODE
- The layout is free to choose, for this
link, the appropriate position of the connection point on the origin
node, except for "pinned" connection points (see IlvGraphModel.hasPinnedConnectionPoint(java.lang.Object, boolean)
).FIXED_MODE
- The layout must keep, for this link, the
current position of the connection point on the origin node. This can
be useful, in particular, if the node has fixed pins where the link
is attached (as, for instance, with IlvPinLinkConnector
) and
the pins should not be moved by the layout algorithm.
The fixed mode works only if the link connector delivers consistently
the same connection point when called multiple times. If a link is
not connected to a link connector, or if the IlvClippingLinkConnector
is used, the real connection point is
calculated on the fly and may change when called multiple times with
changing link bends. In this case, the fixed mode cannot ensure a
correct routing of the links.
The default value is FREE_MODE
.
Note that the Link Layout dispatches the call to its sublayouts, the Short Link Layout and the Long Link Layout. Specifying a mode on the Link Layout means that the same mode is specified for both Short and Long Link Layouts.
link
- The link.mode
- The mode to set.getOriginPointMode(java.lang.Object)
,
setGlobalOriginPointMode(int)
public int getOriginPointMode(Object link)
link
- The link.setGlobalOriginPointMode(int)
,
setOriginPointMode(java.lang.Object, int)
public final void setDestinationPointMode(Object link, int mode)
MIXED_MODE
. Otherwise, the connection points
on the destination nodes have, for all the links, the mode that is
specified as the global destination point mode.
Valid values are:
FREE_MODE
- The layout is free to choose, for this
link, the appropriate position of the connection point on the
destination node, except for "pinned" connection points (see IlvGraphModel.hasPinnedConnectionPoint(java.lang.Object, boolean)
).FIXED_MODE
- The layout must keep, for this link, the
current position of the connection point on the destination node.
This can be useful, in particular, if the node has fixed pins where
the link is attached (as, for instance, with IlvPinLinkConnector
) and the pins should not be moved by the layout
algorithm.
The fixed mode works only if the link connector delivers consistently
the same connection point when called multiple times. If a link is
not connected to a link connector, or if the IlvClippingLinkConnector
is used, the real connection point is
calculated on the fly and may change when called multiple times with
changing link bends. In this case, the fixed mode cannot ensure a
correct routing of the links.
The default value is FREE_MODE
.
Note that the Link Layout dispatches the call to its sublayouts, the Short Link Layout and the Long Link Layout. Specifying a mode on the Link Layout means that the same mode is specified for both Short and Long Link Layouts.
link
- The link.mode
- The mode to set.getDestinationPointMode(java.lang.Object)
,
setGlobalDestinationPointMode(int)
public int getDestinationPointMode(Object link)
link
- The link.setGlobalDestinationPointMode(int)
,
setDestinationPointMode(java.lang.Object, int)
public final void setNodeBoxInterface(IlvNodeBoxInterface nodeBoxInterface)
IlvGraphic.boundingBox(IlvTransformer)
and IlvGraphModel.boundingBox(Object)
) by default. This node box
specifies the obstacle area of the node, that is, the area that links
should avoid so they do not overlap the node. This can be different
from the node box used to find the connection points of the links.
You can call this method with a null
argument to restore
the default behavior.
public final IlvNodeBoxInterface getNodeBoxInterface()
null
if none is specified.
public void setLinkConnectionBoxInterface(IlvLinkConnectionBoxInterface connectionBoxInterface)
By default, the layout algorithm places the connection points of the
links relative to the bounding box of the nodes (see IlvGraphic.boundingBox(IlvTransformer)
and IlvGraphModel.boundingBox(Object)
).
By setting a link connection box interface, the links can be
connected relative to a different box (see getBox
). In short link mode,
the links are connected by default symmetrically to the middle of the
box, and it is possible to "shift" the links tangentially by using
the method getTangentialOffset
from the interface
IlvLinkConnectionBoxInterface
:
If you do not call this method, the layout algorithm places the
connection points on the node box that has been customized using the
method setNodeBoxInterface(ilog.views.graphlayout.IlvNodeBoxInterface)
. If this method has not been
used, the bounding box of the node in the graph model is used (see
IlvGraphModel.boundingBox(Object)
).
You can call this method with a null
argument to restore
the default behavior.
public final void setNodeSideFilter(IlvNodeSideFilter filter)
When a filter is specified, the layout algorithm asks the filter at which side of its end node each link is allowed to attach. Note that a filter should always allow a link to connect to at least one side of a node; otherwise the link cannot be routed. If no node-side filter is installed, the layout algorithm is free to choose any side of the nodes.
Note that the layout algorithm cannot always respect the
specifications of the filter, especially for the DIRECT_STYLE
link style.
You can call this method with a null
argument to restore
the default behavior.
public final IlvNodeSideFilter getNodeSideFilter()
null
if none is specified.
public void setCoordinatesMode(int mode)
The default is IlvGraphLayout.INVERSE_VIEW_COORDINATES
.
public void setUseDefaultParameters(boolean option)
true
, specifies that the layout use
the default values of all the parameters; that is, the "get..." and
"is..." methods return the default values.
The default value of this parameter is false
.
setUseDefaultParameters
in class IlvGraphLayout
IlvGraphLayout.isUseDefaultParameters()
public void setMinBusyTime(long time)
layoutStepPerformed
when the method
callLayoutStepPerformedIfNeeded
is used.
The default value is 50
(milliseconds).
setMinBusyTime
in class IlvGraphLayout
IlvGraphLayout.layoutStepPerformed()
,
IlvGraphLayout.callLayoutStepPerformedIfNeeded()
,
IlvGraphLayout.getMinBusyTime()
public void setAllowedTime(long time)
The default value is 32000
(milliseconds).
setAllowedTime
in class IlvGraphLayout
time
- The allowed time in milliseconds.IlvGraphLayout.supportsAllowedTime()
,
IlvGraphLayout.getAllowedTime()
,
IlvGraphLayout.isLayoutTimeElapsed()
,
IlvGraphLayoutReport.getCode()
public void setInputCheckEnabled(boolean enable)
It is enabled by default.
setInputCheckEnabled
in class IlvGraphLayout
IlvGraphLayout.isInputCheckEnabled()
public void setPreserveFixedLinks(boolean option)
true
, specifies that the layout is not
allowed to reshape the links indicated as fixed by the user. If the
argument is false
, the layout is free to reshape all the
links of the grapher. (This does not change the setting for the fixed
links, which can still be used at any time in the future.)
The default value is false
.
public void setAnimate(boolean option)
If the argument is true
, the layout tries to redraw the
graph during layout to show the progress of the layout. Note that to
obtain a redraw of an IlvGrapher
during animation, the method
IlvGraphLayout.performLayout(boolean, boolean)
must be called with the
value true
for the redraw
argument.
It is disabled by default.
setAnimate
in class IlvGraphLayout
IlvGraphLayout.isAnimate()
,
IlvGraphLayout.supportsAnimation()
public boolean stopImmediately()
This method can be used if multiple threads are used for layout and GUI control. The GUI control thread calls this method to notify the layout thread that the layout run must be stopped. The layout algorithm will perform some final cleanup operations before terminating. Therefore, the layout thread will continue until the cleanup operations are finished. The GUI thread, however, returns immediately from this method.
If the layout algorithm is stopped before completion, the result code
of the layout report is IlvGraphLayoutReport.STOPPED_AND_INVALID
.
stopImmediately
in class IlvGraphLayout
true
if the algorithm can be stopped at this point
in time.IlvGraphLayoutReport.getCode()
public void checkAppropriateLinks() throws IlvInappropriateLinkException
checkAppropriateLinks
in class IlvGraphLayout
IlvInappropriateLinkException
IlvGraphLayout.performLayout(boolean, boolean, boolean)
,
IlvGraphLayout.performLayout(boolean, boolean)
,
IlvGraphLayout.checkAppropriateLink(java.lang.Object)
,
IlvGraphModel.setLinkCheckEnabled(boolean)
,
IlvGraphModel.setConnectionPointCheckEnabled(boolean)
,
IlvGraphLayoutUtil.EnsureAppropriateLinks(ilog.views.graphlayout.IlvGraphModel, ilog.views.graphlayout.IlvLayoutProvider)
,
IlvInappropriateLinkException
public boolean setAutoCheckAppropriateLinksEnabled(boolean enable)
setAutoCheckAppropriateLinksEnabled
in class IlvGraphLayout
public int checkAppropriateLink(Object link)
checkAppropriateLinks()
.
checkAppropriateLink
in class IlvGraphLayout
link
- The link to be checked.checkAppropriateLinks()
public void setParametersUpToDate(boolean uptodate)
false
argument
each time the value of a parameter is changed. It is automatically
called with a true
argument each time the layout is
successfully performed.
setParametersUpToDate
in class IlvGraphLayout
isParametersUpToDate()
public boolean isParametersUpToDate()
false
if at least one parameter was modified
since the last time the layout was successfully performed on the same
graph or if the layout has never been performed successfully on the
same graph. Returns true
if no changes occurred.
isParametersUpToDate
in class IlvGraphLayout
setParametersUpToDate(boolean)
public void setStructureUpToDate(boolean uptodate)
false
argument if
the structure of the graph changed. It is automatically called with a
true
argument each time the layout is successfully
performed.
setStructureUpToDate
in class IlvGraphLayout
isStructureUpToDate()
public boolean isStructureUpToDate()
false
if at least one modification occurred in
the structure of the graph since the last time the layout was
successfully performed on the same graph or if the layout has never
been performed successfully on the same graph. Returns
true
if no changes occurred.
isStructureUpToDate
in class IlvGraphLayout
setParametersUpToDate(boolean)
public void setGeometryUpToDate(boolean uptodate)
false
argument if
the geometry of the graph changed. It is automatically called with a
true
argument each time the layout is successfully
performed.
setGeometryUpToDate
in class IlvGraphLayout
isGeometryUpToDate()
public boolean isGeometryUpToDate()
false
if at least one node, link, label or
obstacle was moved or reshaped since the last time the layout was
successfully performed on the same graph or if the layout has never
been performed successfully on the same graph. Returns
true
if no changes occurred.
isGeometryUpToDate
in class IlvGraphLayout
setGeometryUpToDate(boolean)
public final boolean supportsPreserveFixedLinks()
setPreserveFixedLinks(boolean)
is called with a
true
argument. The effect is very similar to the effect
when the link is filtered during the layout.
supportsPreserveFixedLinks
in class IlvGraphLayout
true
.IlvGrapherAdapter.setFilter(ilog.views.graphlayout.IlvLayoutGraphicFilter)
,
IlvGraphLayout.setPreserveFixedLinks(boolean)
,
IlvGraphLayout.isPreserveFixedLinks()
,
setGlobalLinkStyle(int)
,
setLinkStyle(java.lang.Object, int)
public final boolean supportsAnimation()
supportsAnimation
in class IlvGraphLayout
true
.IlvGraphLayout.setAnimate(boolean)
,
IlvGraphLayout.isAnimate()
public final boolean supportsAllowedTime()
IlvGraphLayoutReport.STOPPED_AND_INVALID
in
this case.
supportsAllowedTime
in class IlvGraphLayout
true
.IlvGraphLayout.setAllowedTime(long)
,
IlvGraphLayout.getAllowedTime()
,
IlvGraphLayoutReport.getCode()
public final boolean supportsStopImmediately()
IlvGraphLayoutReport.STOPPED_AND_INVALID
in
this case.
supportsStopImmediately
in class IlvGraphLayout
true
.IlvGraphLayout.stopImmediately()
,
IlvGraphLayout.isStoppedImmediately()
,
IlvGraphLayoutReport.getCode()
public final boolean supportsLinkConnectionBox()
The link connection box is used instead of the bounding box of each
node (see IlvGraphic.boundingBox(IlvTransformer)
and IlvGraphModel.boundingBox(Object)
) during the routing of links. In
short link mode, the connection rectangle and the tangential offsets
are respected. In long link mode, only the connection rectangle is
respected, and the tangential offsets provided by the link connection
box interface are ignored.
supportsLinkConnectionBox
in class IlvGraphLayout
true
.setLinkConnectionBoxInterface(ilog.views.graphlayout.IlvLinkConnectionBoxInterface)
,
setLayoutMode(int)
public final boolean supportsSaveParametersToNamedProperties()
.ivl
file.
supportsSaveParametersToNamedProperties
in class IlvGraphLayout
true
.IlvGrapherAdapter.saveParametersToNamedProperties(IlvGraphLayout, boolean)
,
IlvGrapherAdapter.loadParametersFromNamedProperties(IlvGraphLayout)
,
IlvGrapherAdapter.removeParametersFromNamedProperties()
public boolean supportsSplineRouting()
IlvSplineLinkImage
and IlvGeneralLink
, the bend points calculated by
the layout algorithm are often suboptimal. A generic optimization
mechanism is available that can be enabled by setSplineRoutingEnabled(boolean)
.
This implementation returns true
.
supportsSplineRouting
in class IlvGraphLayout
false
.setSplineRoutingEnabled(boolean)
,
setMinSplineCurveSize(double)
,
setMaxSplineCurveSize(double)
,
setBalanceSplineCurveThreshold(double)
,
setSplineLinkFilter(ilog.views.graphlayout.IlvSplineLinkFilter)
protected IlvGraphLayoutGrapherProperty createLayoutGrapherProperty(String name, boolean withDefaults)
IlvLinkLayoutGrapherProperty
that
stores the parameter settings of this layout class.
The method is used by IlvGrapherAdapter.saveParametersToNamedProperties(IlvGraphLayout,
boolean)
to create a named property that contains parameter settings
of this layout instance.
createLayoutGrapherProperty
in class IlvGraphLayout
IlvGraphLayoutGrapherProperty
,
IlvGrapherAdapter.saveParametersToNamedProperties(IlvGraphLayout, boolean)
,
IlvGrapherAdapter.loadParametersFromNamedProperties(IlvGraphLayout)
,
IlvGrapherAdapter.removeParametersFromNamedProperties()
protected IlvGraphLayoutLinkProperty createLayoutLinkProperty(String name, IlvGraphic link, boolean withDefaults)
IlvLinkLayoutLinkProperty
that
stores the parameter settings of this layout class for links.
The method is used by IlvGrapherAdapter.saveParametersToNamedProperties(IlvGraphLayout,
boolean)
to create a named property for a link that contains
parameter settings of this layout instance for the input link.
© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.