|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectilog.views.graphlayout.IlvGraphLayout
ilog.views.graphlayout.link.shortlink.IlvShortLinkLayout
public class IlvShortLinkLayout
This class is the main class for the Short Link Layout algorithm.
This 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 setGlobalLinkStyle(int) and
setLinkStyle(java.lang.Object, int).)
The links are placed freely in the plane by choosing the best shape from
a fixed number of link shapes. Orthogonal links can a maximum of 4 bends.
Direct links have 3 bends.
This layout algorithm is recommended when any of the following apply:
IlvLongLinkLayout
may be more suitable.
Here are sample drawings produced by the Short Link Layout algorithm:



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:
IlvGraphLayout.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.
ilog.views.graphlayout.orthogonallink.IlvOrthogonalLinkLayout
provided by ILOG JViews 3.0| Field Summary | |
|---|---|
static int |
AUTOMATIC_PINS
Automatic pin style. |
static int |
DIRECT_STYLE
Direct link style. |
static int |
EVENLY_SPACED_PINS
Evenly spaced connector pin style. |
static int |
FIRST_LAST_SEGMENT
Simple link bundles. |
static int |
FIXED_CONNECTION_POINTS_MODE
Fixed connection points mode. |
static int |
FIXED_MODE
Fixed mode. |
static int |
FIXED_NODE_SIDES_MODE
Fixed node side mode. |
static int |
FIXED_OFFSET_PINS
Fixed offset pin style. |
static int |
FIXED_SHAPE_TYPE_MODE
Fixed shape type mode. |
static int |
FREE_MODE
Free mode. |
static int |
IMPROVED_FIRST_LAST_SEGMENT
Improved link bundles. |
static int |
MIXED_MODE
Mixed mode. |
static int |
MIXED_STYLE
Mixed link shape. |
static int |
NO_BUNDLE
No link bundles. |
static int |
NO_RESHAPE_STYLE
No reshape link style. |
static int |
ORTHOGONAL_STYLE
Orthogonal link style. |
static int |
THREE_BENDS_ORTHOGONAL_STYLE
Three-bends orthogonal self-link. |
static int |
TWO_BENDS_ORTHOGONAL_STYLE
Two-bends orthogonal self-link. |
| Fields inherited from class ilog.views.graphlayout.IlvGraphLayout |
|---|
INVERSE_VIEW_COORDINATES, MANAGER_COORDINATES, VIEW_COORDINATES |
| Constructor Summary | |
|---|---|
IlvShortLinkLayout()
Creates a new instance of the Short Link Layout algorithm. |
|
IlvShortLinkLayout(IlvShortLinkLayout source)
Creates a new layout instance by copying an existing one. |
|
| Method Summary | |
|---|---|
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 IlvShortLinkLayoutGrapherProperty
that stores the parameter settings of this layout class. |
protected IlvGraphLayoutLinkProperty |
createLayoutLinkProperty(String name,
IlvGraphic link,
boolean withDefaults)
Returns a new instance of IlvShortLinkLayoutLinkProperty
that stores the parameter settings of this layout class for links. |
protected IlvGraphLayoutNodeProperty |
createLayoutNodeProperty(String name,
IlvGraphic node,
boolean withDefaults)
Returns a new instance of IlvShortLinkLayoutNodeProperty
that stores the parameter settings of this layout class for nodes. |
void |
detach()
Detaches the graph model from the layout instance. |
int |
getAllowedNumberOfIterations()
Returns the maximum number of allowed optimization iterations. |
IlvLongLinkLayout |
getAuxiliaryLongLinkLayout()
Returns the instance of IlvLongLinkLayout that is used
for avoiding overlaps between links and nodes when
isLinkOverlapNodesForbidden() returns true. |
float |
getBypassDistance()
Returns the minimum distance between the origin and destination node for which a link shape going directly from one node to another is allowed. |
int |
getConnectorStyle(Object node)
Returns the connector style of an individual node. |
int |
getDestinationPointMode(Object link)
Returns the destination point mode of an individual link. |
float |
getEvenlySpacedPinsMarginRatio()
Returns the margin ratio for the evenly spaced pins connector style. |
int |
getGlobalConnectorStyle()
Returns the global style of the connectors. |
int |
getGlobalDestinationPointMode()
Returns the global mode for the connection points of the links on the destination nodes. |
int |
getGlobalIncrementalModifiedLinkReshapeMode()
Returns the link reshape mode used during incremental layout for modified links. |
int |
getGlobalIncrementalUnmodifiedLinkReshapeMode()
Returns the link reshape mode used during incremental layout for unmodified links. |
int |
getGlobalLinkStyle()
Returns the current choice for the style of the shape of the links. |
int |
getGlobalOriginPointMode()
Returns the global mode for the connection points of the links on the origin nodes. |
int |
getGlobalSelfLinkStyle()
Returns the current choice for the style of the shape of the self-links. |
int |
getIncrementalModifiedLinkReshapeMode(Object link)
Returns the link reshape mode of an individual link used during incremental layout for modified links. |
int |
getIncrementalUnmodifiedLinkReshapeMode(Object link)
Returns the link reshape mode of an individual link used during incremental layout for unmodified links. |
int |
getLinkBundlesMode()
Returns the current choice for the link bundles mode. |
float |
getLinkOffset()
Returns the offset between links connected on the same side of the node. |
int |
getLinkStyle(Object link)
Returns the style of the shape of an individual link. |
float |
getLinkToLinkCrossingPenalty()
Returns the link-to-link crossing penalty factor. |
float |
getLinkToNodeCrossingPenalty()
Returns the link-to-node crossing penalty factor. |
float |
getMinFinalSegmentLength()
Returns the minimum length of the final segment of the links. |
IlvNodeBoxInterface |
getNodeBoxInterface()
Returns the node box interface used during the layout. |
IlvNodeSideFilter |
getNodeSideFilter()
Returns the node-side filter used during layout. |
int |
getOriginPointMode(Object link)
Returns the origin point mode of an individual link. |
protected void |
init()
Initializes instance variables. |
boolean |
isCombinedInterGraphLinksMode()
Returns true if the routing of normal links in addition to
intergraph links is enabled. |
boolean |
isIncrementalMode()
Returns true if the incremental mode is enabled. |
boolean |
isInterGraphLinksMode()
Returns true if the routing of intergraph links is enabled. |
boolean |
isLinkOverlapNodesForbidden()
Returns true if the overlap of links with
nodes is forbidden, and returns false otherwise. |
boolean |
isSameShapeForMultipleLinks()
Returns true if the algorithm that ensures that multiple
links are reshaped in the same manner is enabled, and false
otherwise. |
protected void |
layout(boolean redraw)
Computes the layout using the Short Link Layout algorithm. |
void |
setAllowedNumberOfIterations(int iterations)
Sets the maximum number of iterations of the layout algorithm. |
void |
setBypassDistance(float dist)
Sets the minimum distance between the origin and destination node for which a link shape going directly from one node to another is allowed. |
void |
setCombinedInterGraphLinksMode(boolean enable)
Sets the routing of normal links in addition to intergraph links. |
void |
setConnectorStyle(Object node,
int style)
Sets the connector style of an individual node. |
void |
setDestinationPointMode(Object link,
int mode)
Sets the mode for the connection point on an individual link on the destination node. |
void |
setEvenlySpacedPinsMarginRatio(float ratio)
Sets the margin ratio for the evenly spaced pins connector style. |
void |
setGlobalConnectorStyle(int style)
Sets the global style of connectors. |
void |
setGlobalDestinationPointMode(int mode)
Sets the global mode for the connection point of the links on the destination nodes. |
void |
setGlobalIncrementalModifiedLinkReshapeMode(int mode)
Sets the link reshape mode used during incremental layout for modified links, that is links that have been already laid out in the previous layout execution and for which the bounding box (see getNodeBoxInterface() or the
"link connection box" (see @link #getLinkConnectionBoxInterface})
of their origin and destination nodes have been modified. |
void |
setGlobalIncrementalUnmodifiedLinkReshapeMode(int mode)
Sets the link reshape mode used during incremental layout for unmodified links, that is links that have been already laid out in the previous layout execution and for which the bounding box (see getNodeBoxInterface() nor the
"link connection box" (see @link #getLinkConnectionBoxInterface})
of their origin and destination nodes have not been modified. |
void |
setGlobalLinkStyle(int style)
Sets the global style of the shape of the links. |
void |
setGlobalOriginPointMode(int mode)
Sets the global mode for the connection point of the links on the origin nodes. |
void |
setGlobalSelfLinkStyle(int style)
Sets the global style of the shape of the self-links. |
void |
setIncrementalMode(boolean enable)
Sets the incremental layout mode. |
void |
setIncrementalModifiedLinkReshapeMode(Object link,
int mode)
Sets the link reshape mode of an individual link used during incremental layout for modified links, that is links that have been already laid out in the previous layout execution and for which the bounding box (see getNodeBoxInterface() or the
"link connection box" (see @link #getLinkConnectionBoxInterface})
of their origin and destination nodes have been modified. |
void |
setIncrementalUnmodifiedLinkReshapeMode(Object link,
int mode)
Sets the link reshape mode of an individual link used during incremental layout for unmodified links, that is links that have been already laid out in the previous layout execution and for which the bounding box (see getNodeBoxInterface() nor the
"link connection box" (see @link #getLinkConnectionBoxInterface})
of their origin and destination nodes have not been modified. |
void |
setInterGraphLinksMode(boolean enable)
Sets the routing of intergraph links. |
void |
setLinkBundlesMode(int mode)
Sets the link bundles mode. |
void |
setLinkConnectionBoxInterface(IlvLinkConnectionBoxInterface connectionBoxInterface)
Sets the link connection box interface for the connection points of links. |
void |
setLinkOffset(float offset)
Sets the offset between links connected on the same side of the node. |
void |
setLinkOverlapNodesForbidden(boolean set)
Sets whether it is forbidden for the layout to reshape links such that they overlap nodes. |
void |
setLinkStyle(Object link,
int style)
Sets the style of the shape of an individual link. |
void |
setLinkToLinkCrossingPenalty(float penalty)
Sets the link-to-link crossing penalty factor. |
void |
setLinkToNodeCrossingPenalty(float penalty)
Sets the link-to-node crossing penalty factor. |
void |
setMinFinalSegmentLength(float length)
Sets the minimum length of the final (first and last) segment of the links. |
void |
setNodeBoxInterface(IlvNodeBoxInterface nodeBoxInterface)
Sets an object that provides the rectangle defining the position and size of each node. |
void |
setNodeSideFilter(IlvNodeSideFilter filter)
Sets the 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 |
setSameShapeForMultipleLinks(boolean option)
Sets whether the layout algorithm must ensure that all multiple links have the same type of shape, that is a shape with the same number of bends and with parallel segments. |
boolean |
stopImmediately()
Overridden version of the base class method. |
boolean |
supportsAllowedTime()
Indicates that this layout class can stop the layout computation in the proper manner when the user-defined allowed time is exceeded. |
boolean |
supportsAnimation()
Indicates that this layout class supports the animation mechanism; that is, it performs a redraw of the grapher after each iteration if the method {#@link #setAnimate(boolean)} is called with a true argument. |
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()
Tests if 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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int ORTHOGONAL_STYLE
setGlobalLinkStyle(int), all links get an orthogonal shape
(alternating horizontal and vertical segments).
To specify the style of an individual link, use this style as the
argument of the method setLinkStyle(Object, int).
public static final int DIRECT_STYLE
setGlobalLinkStyle(int), all links get a (semi)direct shape.
To specify the style of an individual link, use this style 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).
setGlobalConnectorStyle(int),
each node can have a different connector style.
The connector style of an individual node can be set
by the method setConnectorStyle(java.lang.Object, int).
public static final int NO_RESHAPE_STYLE
MIXED_STYLE.
To specify the style of an individual link, use this style as the
argument of the method setLinkStyle(Object, int).
public static final int NO_BUNDLE
setLinkBundlesMode(int), no link bundles are computed.
public static final int FIRST_LAST_SEGMENT
setLinkBundlesMode(int), only first and last segments of the
links are bundled.
public static final int IMPROVED_FIRST_LAST_SEGMENT
setLinkBundlesMode(int), the first and the last
segments of the links are bundled.
public static final int TWO_BENDS_ORTHOGONAL_STYLE
setGlobalSelfLinkStyle(int), a two-bend shape is given
to the self-links, that is, links with the same origin and destination
node.
public static final int THREE_BENDS_ORTHOGONAL_STYLE
setGlobalSelfLinkStyle(int), a three-bend shape is given
to the self-links, that is, links with the same origin and destination
node.
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).setGlobalIncrementalUnmodifiedLinkReshapeMode(int) or
setGlobalIncrementalModifiedLinkReshapeMode(int),
in incremental mode the layout is allowed to freely reshape the links.
(Of course, settings that may have been done using IlvGraphLayout.isFixed(java.lang.Object),
getGlobalOriginPointMode() and getGlobalDestinationPointMode()
are still obeyed.)
To specify the mode for the incremental reshape of an individual link,
use this mode as the argument of the methods
setIncrementalUnmodifiedLinkReshapeMode(java.lang.Object, int) or
setIncrementalModifiedLinkReshapeMode(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).setGlobalIncrementalUnmodifiedLinkReshapeMode(int) or
setIncrementalModifiedLinkReshapeMode(java.lang.Object, int),
in incremental mode the layout is not allowed to reshape the links in any way.
To specify the mode for the incremental reshape of an individual link,
use this mode as the argument of the methods
setIncrementalUnmodifiedLinkReshapeMode(java.lang.Object, int) or
setIncrementalModifiedLinkReshapeMode(java.lang.Object, int).
public static final int FIXED_SHAPE_TYPE_MODE
setGlobalIncrementalUnmodifiedLinkReshapeMode(int) or
setIncrementalModifiedLinkReshapeMode(java.lang.Object, int),
in incremental mode the layout preserves the shape type of the link.
This means that both the number of bends and the node sides to which
the links are connected are preserved.
To specify the mode for the incremental reshape of an individual link,
use this mode as the argument of the methods
setIncrementalUnmodifiedLinkReshapeMode(java.lang.Object, int) or
setIncrementalModifiedLinkReshapeMode(java.lang.Object, int).
public static final int FIXED_NODE_SIDES_MODE
setGlobalIncrementalUnmodifiedLinkReshapeMode(int) or
setIncrementalModifiedLinkReshapeMode(java.lang.Object, int),
in incremental mode the layout preserves the node sides to which
the links are connected.
To specify the mode for the incremental reshape of an individual link,
use this mode as the argument of the methods
setIncrementalUnmodifiedLinkReshapeMode(java.lang.Object, int) or
setIncrementalModifiedLinkReshapeMode(java.lang.Object, int).
public static final int FIXED_CONNECTION_POINTS_MODE
setGlobalIncrementalUnmodifiedLinkReshapeMode(int) or
setIncrementalModifiedLinkReshapeMode(java.lang.Object, int),
in incremental mode the layout preserves the connection points of the links.
To specify the mode for the incremental reshape of an individual link,
use this mode as the argument of the methods
setIncrementalUnmodifiedLinkReshapeMode(java.lang.Object, int) or
setIncrementalModifiedLinkReshapeMode(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).setGlobalIncrementalUnmodifiedLinkReshapeMode(int) or
setIncrementalModifiedLinkReshapeMode(java.lang.Object, int),
each link can have a different incremental reshape mode.
The mode for the incremental reshape of an individual link can be set
by the methods setIncrementalUnmodifiedLinkReshapeMode(java.lang.Object, int) or
setIncrementalModifiedLinkReshapeMode(java.lang.Object, int).
public static final int AUTOMATIC_PINS
setGlobalConnectorStyle(int), the connector style of all nodes
is automatically selected as follows:
The connection points are dispatched in the style FIXED_OFFSET_PINS
if doing so no connection point goes outside the border the link is
attached to. Otherwise, the connection points are dispatched using
the style EVENLY_SPACED_PINS.
To specify the automatic pins connector style for an individual node, use
this style as the argument of the method
setConnectorStyle(Object, int).
public static final int FIXED_OFFSET_PINS
setGlobalConnectorStyle(int), the connector pins of all the
links are placed at a fixed distance, given by the method
getLinkOffset().
To specify the fixed offset pin style for an individual node, use
this style as the argument of the method
setConnectorStyle(Object, int).
public static final int EVENLY_SPACED_PINS
setGlobalConnectorStyle(int), the connector pins of
all the links are evenly spaced along the node border the link is attached to.
To specify the evenly spaced pin style for an individual node, use
this style as the argument of the method
setConnectorStyle(Object, int).
| Constructor Detail |
|---|
public IlvShortLinkLayout()
IlvGraphLayout.attach(IlvGrapher).
IlvGraphLayout.attach(IlvGraphModel).
IlvGraphLayout.performLayout().
IlvGraphLayout.attach(ilog.views.IlvGrapher),
IlvGraphLayout.attach(ilog.views.graphlayout.IlvGraphModel),
IlvGraphLayout.performLayout(),
IlvGrapherAdapter.addLayer(ilog.views.IlvManagerLayer),
IlvGrapherAdapter.setFilter(ilog.views.graphlayout.IlvLayoutGraphicFilter)public IlvShortLinkLayout(IlvShortLinkLayout 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)| Method Detail |
|---|
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 IlvGraphLayoutpublic IlvGraphLayout copy()
This method copies the layout instance by calling the copy constructor.
When performing a recursive layout on a nested graph,
this method is used by IlvLayoutProvider 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. The other parameters, including the customization interfaces, are also copied.
copy in class IlvGraphLayoutcopyParameters(ilog.views.graphlayout.IlvGraphLayout)public void copyParameters(IlvGraphLayout source)
Note that the parameters which are specific to a node or a link are not copied. The other parameters, including the customization 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.
copyParameters in class IlvGraphLayoutsource - The layout instance from which the parameters are copied.copy()public void detach()
IlvGraphLayout.attach(IlvGraphModel).
The method performs cleaning operations on the graph model. In addition to the cleaning operations in the base class, the Short 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 IlvGraphLayoutIlvGraphLayout.attach(IlvGraphModel),
setLinkStyle(java.lang.Object, int)
protected void layout(boolean redraw)
throws IlvGraphLayoutException
IlvGraphLayout.performLayout().
layout in class IlvGraphLayoutredraw - 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, float, float, 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 void setLinkOverlapNodesForbidden(boolean set)
The default value of this parameter is false.
If overlaps are not forbidden, the algorithm tries to avoid overlaps anyway, but may create overlaps, for instance in order to avoid crossings of the link with other links.
If overlaps are forbidden, the algorithm uses the auxiliary link
layout (see getAuxiliaryLongLinkLayout() for laying
out, in an orthogonal shape, those links that overlap nodes.
Notice that the auxiliary long link works on a grid and the
default grid size may need to be reduced to allow this algorithm
to avoid the overlaps (see
IlvLongLinkLayout.setHorizontalGridOffset(float) and
IlvLongLinkLayout.setVerticalGridOffset(float)).
Notice also that forbidding the overlaps can slow down the layout and can produce additional link bends and link crossings.
isLinkOverlapNodesForbidden(),
getAuxiliaryLongLinkLayout()public boolean isLinkOverlapNodesForbidden()
true if the overlap of links with
nodes is forbidden, and returns false otherwise.
setLinkOverlapNodesForbidden(boolean)public final IlvLongLinkLayout getAuxiliaryLongLinkLayout()
IlvLongLinkLayout that is used
for avoiding overlaps between links and nodes when
isLinkOverlapNodesForbidden() returns true.
This method allows you to get this auxiliary layout instance and to
customize its parameters if needed. In particular, you can reduce or
increase the grid size (see
IlvLongLinkLayout.setHorizontalGridOffset(float) and
IlvLongLinkLayout.setVerticalGridOffset(float)).
Notice that you should not modify the origin and destination point mode,
nor to disable the preservation of fixed links.
Notice also that an IlvGraphModel is attached
to the IlvLongLinkLayout only if needed, therefore
getAuxiliaryLongLinkLayout().getGraphModel()can return
null.
setLinkOverlapNodesForbidden(boolean)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() and
IlvGraphModel.boundingBox(Object)).
By setting a link connection box interface, the links can be connected
relative to a different box (see
getBox).
By default, the links are connected symmetrically to the middle of the box,
and it is possible to "shift" the links tangentially by using the method
from the interface getTangentialOffsetIlvLinkConnectionBoxInterface:
0 if no offset is necessary on
a certain node and/or side.
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 (see
IlvGraphModel.boundingBox(Object)) is used.
You can call this method with a null argument
to go back to the default behavior.
setLinkConnectionBoxInterface in class IlvGraphLayoutsetLinkConnectionRectangleIlvGraphLayout.getLinkConnectionBoxInterface(),
supportsLinkConnectionBox(),
IlvGraphLayout.getLinkConnectionBoxInterface(),
setNodeBoxInterface(ilog.views.graphlayout.IlvNodeBoxInterface)public void setNodeBoxInterface(IlvNodeBoxInterface nodeBoxInterface)
If you do not call this method, the layout algorithm uses the
bounding box of the node (see IlvGraphModel.boundingBox(Object)).
You can call this method with a null argument
to go back to the default behavior.
getNodeBoxInterface()public IlvNodeBoxInterface getNodeBoxInterface()
null if none is specified.
setNodeBoxInterface(ilog.views.graphlayout.IlvNodeBoxInterface)public void setNodeSideFilter(IlvNodeSideFilter filter)
If a node-side filter is not installed, and the connection points
of the links are not fixed (see setOriginPointMode(java.lang.Object, int),
setDestinationPointMode(java.lang.Object, int)), the layout algorithm is free to choose
any side of the nodes, except for "pinned"
connection points (see IlvGraphModel.hasPinnedConnectionPoint(java.lang.Object, boolean)).
When a filter is installed, the layout algorithm asks the filter at which side of its end node each link is allowed to attach to.
Note the following points: