ilog.views.graphlayout.link.longlink
Class IlvLongLinkLayout

java.lang.Object
  extended by ilog.views.graphlayout.IlvGraphLayout
      extended by ilog.views.graphlayout.link.longlink.IlvLongLinkLayout
All Implemented Interfaces:
GraphModelListener, Serializable, EventListener

public class IlvLongLinkLayout
extends IlvGraphLayout

The main class for the Long Link Layout algorithm.

The Long Link Layout algorithm reshapes the links of a graph without moving the nodes. It is specialized to route long orthogonal links on a grid without overlapping nodes. It uses a classical path search mechanism and an additional crossing reduction phase. It can be used to find an orthogonal route without overlaps in a labyrinth of node obstacles.

Optionally, direct links can be computed, which, however, may overlap nodes. See the method setGlobalLinkStyle(int).

This layout algorithm is recommended if any of the following conditions apply:

Otherwise, the IlvShortLinkLayout may be more suitable.

Here are sample drawings produced by the Long Link Layout:

Click on the image to see it in normal size.

The long link mode can be used to find a route through a labyrinth:

Click on the image to see it in normal size.

Note the following points:

Since:
JViews 3.5
See Also:
Serialized Form

Field Summary
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 MIXED_MODE
          Mixed connection point mode.
static int MIXED_STYLE
          Mixed link shape option.
static int NO_RESHAPE_STYLE
          No reshape link style option.
static int ORTHOGONAL_STYLE
          Orthogonal link shape option.
 
Fields inherited from class ilog.views.graphlayout.IlvGraphLayout
INVERSE_VIEW_COORDINATES, MANAGER_COORDINATES, VIEW_COORDINATES
 
Constructor Summary
IlvLongLinkLayout()
          Creates a new instance of the Long Link Layout algorithm.
IlvLongLinkLayout(IlvLongLinkLayout source)
          Creates a new layout instance by copying an existing one.
 
Method Summary
 void addLineObstacle(IlvPoint p1, IlvPoint p2)
          Adds a line segment obstacle for the routing.
 void addLineObstacle(IlvRect obstacleBoundingBox)
          Adds a line segment obstacle for the routing.
 void addRectObstacle(IlvRect obstacleBoundingBox)
          Adds a rectangular obstacle for the routing.
 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.
 void cleanLink(IlvGraphModel graphModel, Object link)
          Cleans a link.
 void cleanNode(IlvGraphModel graphModel, Object node)
          Cleans a node.
 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 IlvLongLinkLayoutGrapherProperty that stores the parameter settings of this layout class.
protected  IlvGraphLayoutLinkProperty createLayoutLinkProperty(String name, IlvGraphic link, boolean withDefaults)
          Returns a new instance of IlvLongLinkLayoutLinkProperty that stores the parameter settings of this layout class for links.
 IlvGraphLayoutReport createLayoutReport()
          Creates the graph layout report instance.
 void detach()
          Detaches the graph model from the layout instance.
 long getAllowedTimePerLink()
          Returns the upper limit for the time allowed to find a route for a long link in milliseconds.
 Enumeration getCalcFallbackLinks()
          Returns the links that could not be routed on the grid without obstacle overlaps by the previous layout call.
 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.
 float getHorizontalGridBase()
          Returns the horizontal base coordinate of the grid.
 float getHorizontalGridOffset()
          Returns the horizontal offset between the grid lines.
 float getHorizontalMinOffset()
          Returns the minimal horizontal offset between the node border and a link segment that is (vertically) parallel to the node border.
 int getLinkStyle(Object link)
          Returns the style of the shape of an individual link.
 int getMaxBacktrack()
          Returns the maximal number of backtrack steps to find a route for a long link.
 float getMinEndSegmentLength()
          Returns the minimum length of the last segment of each link.
 float getMinNodeCornerOffset()
          Returns the minimum offset between a node corner and a link starting at this node.
 float getMinStartSegmentLength()
          Returns the minimum length of the first segment of each link.
 IlvNodeBoxInterface getNodeBoxInterface()
          Returns the node box interface used for the obstacle area during the layout.
 IlvNodeSideFilter getNodeSideFilter()
          Returns the node-side filter used during layout.
 int getNumberCrossingReductionIterations()
          Returns the maximal number of iterations performed during crossing reduction.
 int getOriginPointMode(Object link)
          Returns the origin point mode of an individual link.
 IlvTerminationPointFilter getTerminationPointFilter()
          Returns the termination point filter used during layout.
 float getVerticalGridBase()
          Returns the vertical base coordinate of the grid.
 float getVerticalGridOffset()
          Returns the vertical offset between the grid lines.
 float 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 isCrossingReductionEnabled()
          Returns true if crossing reduction is enabled.
 boolean isExhaustiveSearching()
          Returns true if routing uses exhaustive searching.
 boolean isFallbackRouteEnabled()
          Returns true if the fallback routing algorithm is enabled.
 boolean isFromPointFixed()
          Deprecated. Beginning with ILOG JViews 5.5, use the method getGlobalOriginPointMode() instead.
 boolean isIncrementalConnectionPreserving()
          Returns true if the incremental mode preserves the side and relative order of the link connection points.
 boolean isIncrementalMode()
          Returns true if the incremental mode is enabled.
 boolean isInterGraphLinksMode()
          Returns true if the routing of intergraph links is enabled.
 boolean isLinkObstacleEnabled()
          Returns true if links should be line obstacles for the link routes.
 boolean isNodeObstacleEnabled()
          Returns true if nodes should be obstacles for the link routes.
 boolean isStraightRouteEnabled()
          Returns true if straight routing is enabled.
 boolean isToPointFixed()
          Deprecated. Beginning with ILOG JViews 5.5, use the method getGlobalDestinationPointMode() instead.
protected  void layout(boolean redraw)
          Computes the layout using the Long Link Layout algorithm.
 void layoutStepPerformed()
          Can be called by the layout classes when a step of the layout algorithm has been performed.
 void markForIncremental(Object link)
          Marks the input link to be rerouted with the next call of IlvGraphLayout.performLayout(), if incremental mode is enabled.
 void removeAllLineObstacles()
          Removes all additional line obstacles.
 void removeAllRectObstacles()
          Removes all additional rectangular obstacles.
 void setAllowedTimePerLink(long time)
          Sets the upper limit for the time allowed to find a route for a long link.
 void setCombinedInterGraphLinksMode(boolean enable)
          Sets the routing of normal links in addition to intergraph links.
 void setCrossingReductionEnabled(boolean flag)
          Sets the crossing reduction.
 void setDestinationPointMode(Object link, int mode)
          Sets the mode for the connection point on an individual link on the destination node.
 void setExhaustiveSearching(boolean flag)
          Sets the exhaustive searching of routes for links.
 void setFallbackRouteEnabled(boolean flag)
          Sets whether the fallback routing algorithm is enabled.
 void setFromPointFixed(boolean flag)
          Deprecated. Beginning with ILOG JViews 5.5, use the method setGlobalOriginPointMode(int) instead.
 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 setHorizontalGridBase(float coordinate)
          Sets the horizontal base coordinate of the grid.
 void setHorizontalGridOffset(float offset)
          Sets the horizontal offset between the grid lines.
 void setHorizontalMinOffset(float minOffset)
          Sets the minimal horizontal offset between the node border and a link segment that is (vertically) parallel to the node border.
 void setIncrementalConnectionPreserving(boolean flag)
          Sets whether the incremental layout mode preserves the side and relative order of the link connection points.
 void setIncrementalMode(boolean enable)
          Sets the incremental layout mode.
 void setInterGraphLinksMode(boolean enable)
          Sets the routing of intergraph links.
 void setLinkConnectionBoxInterface(IlvLinkConnectionBoxInterface connectionBoxInterface)
          Sets the link connection box interface for the connection points of links.
 void setLinkObstacleEnabled(boolean flag)
          Sets whether links should be line obstacles for the link routes.
 void setLinkStyle(Object link, int style)
          Sets the style of the shape of an individual link.
 void setMaxBacktrack(int numberOfSteps)
          Sets the maximal number of backtrack steps to find a route for a long link.
 void setMinEndSegmentLength(float length)
          Sets the minimum length of the last segment of each link, that is, the segment incident to the "to" node.
 void setMinNodeCornerOffset(float offset)
          Sets the minimum offset between a node corner and a link starting at this node.
 void setMinStartSegmentLength(float length)
          Sets the minimum length of the first segment of each link, that is, the segment incident to the "from" node.
 void setNodeBoxInterface(IlvNodeBoxInterface nodeBoxInterface)
          Sets the node box interface for the obstacle area.
 void setNodeObstacleEnabled(boolean flag)
          Sets whether nodes should be obstacles for the link routes.
 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 setNumberCrossingReductionIterations(int iterations)
          Sets the maximal number of iterations performed during crossing reduction.
 void setOriginPointMode(Object link, int mode)
          Sets the mode for the connection point on an individual link on the origin node.
 void setStraightRouteEnabled(boolean flag)
          Sets the straight routing.
 void setTerminationPointFilter(IlvTerminationPointFilter filter)
          Sets the termination point filter, that is, an object that allows filtering the termination points that are proposed by the layout algorithm.
 void setToPointFixed(boolean flag)
          Deprecated. Beginning with ILOG JViews 5.5, use the method setGlobalDestinationPointMode(int) instead.
 void setVerticalGridBase(float coordinate)
          Sets the vertical base coordinate of the grid.
 void setVerticalGridOffset(float offset)
          Sets the vertical offset between the grid lines.
 void setVerticalMinOffset(float minOffset)
          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 of the 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 process of layout 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 supportsPercentageComplete()
          Indicates that this layout class can estimate the percentage of completion during the run of layout.
 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 ilog.views.graphlayout.IlvGraphLayout
addGraphLayoutEventListener, addGraphLayoutParameterEventListener, afterLayoutOfSubgraph, attach, attach, beforeLayout, beforeLayoutOfSubgraph, callLayoutStepPerformedIfNeeded, cleanGraphModel, clipAllLinks, clipLink, contentsChanged, createLayoutNodeProperty, 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, isGeometryUpToDate, isInputCheckEnabled, isLayoutNeeded, isLayoutOfConnectedComponentsEnabled, isLayoutOfConnectedComponentsEnabledByDefault, isLayoutRunning, isLayoutTimeElapsed, isMemorySavings, isParametersUpToDate, isPreserveFixedLinks, isPreserveFixedNodes, isSplineRoutingEnabled, isStoppedImmediately, isStructureUpToDate, isUseDefaultParameters, isUseSeedValueForRandomGenerator, onParameterChanged, onParameterChanged, performAutoLayout, performLayout, performLayout, performLayout, PerformLayout, performSublayout, removeGraphLayoutEventListener, removeGraphLayoutParameterEventListener, setAllowedTime, setAnimate, setAutoLayout, setAutoLayoutHandler, setBalanceSplineCurveThreshold, setCoordinatesMode, setFixed, setGeometryUpToDate, setGrapher, setGraphModel, setInputCheckEnabled, setLayoutOfConnectedComponents, setLayoutOfConnectedComponentsEnabled, setLayoutRegion, setLayoutRegion, setLayoutRegion, setLayoutReport, setLinkClipInterface, setMaxSplineCurveSize, setMemorySavings, setMinBusyTime, setMinSplineCurveSize, setParametersUpToDate, setParentLayout, setPreserveFixedLinks, setPreserveFixedNodes, setProperty, setProperty, setSeedValueForRandomGenerator, setSplineLinkFilter, setSplineRoutingEnabled, setStructureUpToDate, setUseDefaultParameters, setUseSeedValueForRandomGenerator, supportsLayoutOfConnectedComponents, supportsLayoutRegion, supportsLinkClipping, supportsMemorySavings, supportsPreserveFixedNodes, supportsRandomGenerator, unfixAllLinks, unfixAllNodes, useAnimateRedraw
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ORTHOGONAL_STYLE

public static final int ORTHOGONAL_STYLE
Orthogonal link shape option. When used as the argument of the method setGlobalLinkStyle(int), all links get an orthogonal shape (alternating horizontal and vertical segments). To specify the shape of an individual link, use this option as the argument of the method setLinkStyle(Object, int).

See Also:
Constant Field Values

DIRECT_STYLE

public static final int DIRECT_STYLE
Direct link style option. When used as the argument of the method setGlobalLinkStyle(int), all links get a (semi)direct shape. This link shape may cause overlaps between links and nodes. To specify the style of an individual link, use this option as the argument of the method setLinkStyle(Object, int).

See Also:
Constant Field Values

MIXED_STYLE

public static final int MIXED_STYLE
Mixed link shape option. When used as the argument of the method 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).

See Also:
Constant Field Values

NO_RESHAPE_STYLE

public static final int NO_RESHAPE_STYLE
No reshape link style option. This can be used for individual links if the global link style is MIXED_STYLE. To specify the style of an individual link, use this option as the argument of the method setLinkStyle(Object, int).

See Also:
Constant Field Values

FREE_MODE

public static final int FREE_MODE
Free connection point mode. When used as the argument of the method 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).

Since:
JViews 5.5
See Also:
Constant Field Values

FIXED_MODE

public static final int FIXED_MODE
Fixed connection point mode. When used as the argument of the method 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).

Since:
JViews 5.5
See Also:
Constant Field Values

MIXED_MODE

public static final int MIXED_MODE
Mixed connection point mode. When used as the argument of the method 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).

Since:
JViews 5.5
See Also:
Constant Field Values
Constructor Detail

IlvLongLinkLayout

public IlvLongLinkLayout()
Creates a new instance of the Long Link Layout algorithm.
To indicate the grapher you want to lay out, use the method IlvGraphLayout.attach(ilog.views.IlvGrapher).
To indicate the graph model you want to lay out, use the method IlvGraphLayout.attach(ilog.views.graphlayout.IlvGraphModel).
To perform the layout, use the method IlvGraphLayout.performLayout().
To modify the layout parameters, use the different methods provided in this class and its superclass.

See Also:
IlvGraphLayout.attach(ilog.views.IlvGrapher), IlvGraphLayout.attach(ilog.views.graphlayout.IlvGraphModel), IlvGraphLayout.performLayout(), IlvGrapherAdapter.addLayer(ilog.views.IlvManagerLayer), IlvGrapherAdapter.setFilter(ilog.views.graphlayout.IlvLayoutGraphicFilter)

IlvLongLinkLayout

public IlvLongLinkLayout(IlvLongLinkLayout source)
Creates a new layout instance by copying an existing one. This constructor is used by the 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).

Parameters:
source - The layout instance that is copied.
Since:
JViews 5.0
See Also:
copy(), copyParameters(ilog.views.graphlayout.IlvGraphLayout)
Method Detail

init

protected void init()
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.

Overrides:
init in class IlvGraphLayout
Since:
JViews 5.0

copy

public IlvGraphLayout copy()
Copies the layout instance.

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, termination point filter) are also copied.

Specified by:
copy in class IlvGraphLayout
Returns:
A copy of the layout instance.
Since:
JViews 5.0
See Also:
copyParameters(ilog.views.graphlayout.IlvGraphLayout), setNodeBoxInterface(ilog.views.graphlayout.IlvNodeBoxInterface), setNodeSideFilter(ilog.views.graphlayout.IlvNodeSideFilter), setTerminationPointFilter(ilog.views.graphlayout.link.longlink.IlvTerminationPointFilter)

copyParameters

public void copyParameters(IlvGraphLayout source)
Copies the parameters from a given layout instance.

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, termination point filter) are also copied.

Overrides:
copyParameters in class IlvGraphLayout
Parameters:
source - The layout instance from which the parameters are copied.
Since:
JViews 5.0
See Also:
copy(), setNodeBoxInterface(ilog.views.graphlayout.IlvNodeBoxInterface), setNodeSideFilter(ilog.views.graphlayout.IlvNodeSideFilter), setTerminationPointFilter(ilog.views.graphlayout.link.longlink.IlvTerminationPointFilter)

detach

public void detach()
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 IlvGraphLayout.attach(ilog.views.graphlayout.IlvGraphModel).

The method performs cleaning operations on the graph model. In addition to the cleaning operations in the base class, the Long 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.

Overrides:
detach in class IlvGraphLayout
See Also:
IlvGraphLayout.attach(ilog.views.graphlayout.IlvGraphModel), setLinkStyle(java.lang.Object, int)

cleanNode

public void cleanNode(IlvGraphModel graphModel,
                      Object node)
Cleans a node. This method removes any data that has been stored by the layout algorithm on a node.

The method is automatically called by IlvGraphLayout.contentsChanged(ilog.views.graphlayout.GraphModelEvent) whenever a GraphModelEvent of type GraphModelEvent.NODE_REMOVED is received.

Subclasses can override this method to remove additional information stored in the nodes.

Notice that the method may be called multiple times for the same node. At the time this method is called, the node may already be removed; therefore, overridden versions of this method should be implemented so that they work even if the object is no longer a node of graphModel.

Overrides:
cleanNode in class IlvGraphLayout
Parameters:
graphModel - The graph model to which the node belongs.
node - The node to be cleaned.
Since:
JViews 5.0
See Also:
detach(), IlvGraphModel.dispose()

cleanLink

public void cleanLink(IlvGraphModel graphModel,
                      Object link)
Cleans a link. This method removes any data that has been stored by the layout algorithm on a link.

The method is automatically called by IlvGraphLayout.contentsChanged(ilog.views.graphlayout.GraphModelEvent) whenever a GraphModelEvent of type GraphModelEvent.LINK_REMOVED is received.

Subclasses can override this method to remove additional information stored in the links.

Notice that the method may be called multiple times for the same link. At the time this method is called, the link may already be removed; therefore, overridden versions of this method should be implemented so that they work even if the object is no longer a link of graphModel.

Overrides:
cleanLink in class IlvGraphLayout
Parameters:
graphModel - The graph model to which the link belongs.
link - The link to be cleaned.
Since:
JViews 5.0
See Also:
detach(), IlvGraphModel.dispose()

layout

protected void layout(boolean redraw)
               throws IlvGraphLayoutException,
                      IlvInappropriateLinkException
Computes the layout using the Long Link Layout algorithm. To start the layout, call the method IlvGraphLayout.performLayout().

Specified by:
layout in class IlvGraphLayout
Parameters:
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, float, float, boolean) and IlvGraphModel.reshapeLink(java.lang.Object, ilog.views.IlvPoint, ilog.views.IlvPoint[], int, int, ilog.views.IlvPoint, boolean).
Throws:
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.
See Also:
IlvGraphLayout.performLayout()

createLayoutReport

public IlvGraphLayoutReport createLayoutReport()
Creates the graph layout report instance. The current implementation creates an instance of IlvLongLinkLayoutReport.

Overrides:
createLayoutReport in class IlvGraphLayout
See Also:
IlvGraphLayout.createLayoutReport(), IlvLongLinkLayoutReport

supportsPreserveFixedLinks

public final boolean supportsPreserveFixedLinks()
Indicates that this layout class allows the user to specify fixed links. Fixed links are not reshaped during the layout if the method IlvGraphLayout.setPreserveFixedLinks(boolean) is called with a true argument. The effect is very similar to the effect when the links are filtered during layout.

Overrides:
supportsPreserveFixedLinks in class IlvGraphLayout
Returns:
Always true.
See Also:
IlvGrapherAdapter.setFilter(ilog.views.graphlayout.IlvLayoutGraphicFilter), IlvGraphLayout.setPreserveFixedLinks(boolean), IlvGraphLayout.isPreserveFixedLinks(), setGlobalLinkStyle(int), setLinkStyle(java.lang.Object, int)

supportsAnimation

public final boolean supportsAnimation()
Indicates that this layout class supports the animation mechanism; that is, it can perform redraws to animate the process of layout in some way.

Overrides:
supportsAnimation in class IlvGraphLayout
Returns:
Always true.
See Also:
IlvGraphLayout.setAnimate(boolean), IlvGraphLayout.isAnimate()

supportsAllowedTime

public final boolean supportsAllowedTime()
Indicates that this layout class can stop the layout computation in a proper manner when the user-defined allowed time is exceeded. If the allowed time elapses before termination of the Long Link Layout algorithm, the links are not reshaped and remain at the same position as before the start of the algorithm. The result code in the layout report is IlvGraphLayoutReport.STOPPED_AND_INVALID in this case.

Overrides:
supportsAllowedTime in class IlvGraphLayout
Returns:
Always true.
See Also:
IlvGraphLayout.setAllowedTime(long), IlvGraphLayout.getAllowedTime(), IlvGraphLayoutReport.getCode()

supportsStopImmediately

public final boolean supportsStopImmediately()
Indicates that this layout class can interrupt the current run of the layout immediately in a controlled way. If interrupted, the links are not reshaped and remain at the same position as before the start of the algorithm. The result code in the layout report is IlvGraphLayoutReport.STOPPED_AND_INVALID in this case.

Overrides:
supportsStopImmediately in class IlvGraphLayout
Returns:
Always true.
See Also:
IlvGraphLayout.stopImmediately(), IlvGraphLayout.isStoppedImmediately(), IlvGraphLayoutReport.getCode()

stopImmediately

public boolean stopImmediately()
Stops the running of the layout algorithm as soon as possible. The Long Link Layout algorithm has several steps. In the first steps, the layout algorithm can be stopped and the method returns true. In the very last step, the layout algorithm cannot be stopped and the method returns false.

Overrides:
stopImmediately in class IlvGraphLayout
See Also:
IlvGraphLayoutReport.getCode(), IlvGraphLayout.supportsStopImmediately(), IlvGraphLayout.isStoppedImmediately()

supportsPercentageComplete

public final boolean supportsPercentageComplete()
Indicates that this layout class can estimate the percentage of completion during the run of layout.

Overrides:
supportsPercentageComplete in class IlvGraphLayout
Returns:
Always true.
See Also:
IlvGraphLayout.increasePercentageComplete(int), IlvGraphLayoutReport.getPercentageComplete(), IlvJGraphLayoutProgressBar

supportsLinkConnectionBox

public final boolean supportsLinkConnectionBox()
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.

The link connection box is used instead of the bounding box of each node (see IlvGraphic.boundingBox(ilog.views.IlvTransformer) and IlvGraphModel.boundingBox(Object)) during the routing of links. The tangential offsets provided by the link connection box interface are currently ignored.

Overrides:
supportsLinkConnectionBox in class IlvGraphLayout
Returns:
Always true.
Since:
JViews 5.0
See Also:
IlvGraphLayout.setLinkConnectionBoxInterface(IlvLinkConnectionBoxInterface)

supportsSaveParametersToNamedProperties

public boolean supportsSaveParametersToNamedProperties()
Indicates that this layout class can transfer the layout parameters to named properties. This mechanism can be used if layout parameters must be stored persistently in an .ivl file.

Overrides:
supportsSaveParametersToNamedProperties in class IlvGraphLayout
Returns:
Always true.
See Also:
IlvGrapherAdapter.saveParametersToNamedProperties(IlvGraphLayout, boolean), IlvGrapherAdapter.loadParametersFromNamedProperties(IlvGraphLayout), IlvGrapherAdapter.removeParametersFromNamedProperties()

supportsSplineRouting

public boolean supportsSplineRouting()
Tests if this class supports the generic optimization of spline control points. If spline links such as IlvSplineLinkImage and IlvGeneralLink are used, the bend points calculated by the layout algorithm are often suboptimal. A generic optimization mechanism can be enabled by calling IlvGraphLayout.setSplineRoutingEnabled(boolean).

Overrides:
supportsSplineRouting in class IlvGraphLayout
Returns:
This implementation always returns true.
Since:
JViews 8.1
See Also:
IlvGraphLayout.setSplineRoutingEnabled(boolean), IlvGraphLayout.setMinSplineCurveSize(float), IlvGraphLayout.setMaxSplineCurveSize(float), IlvGraphLayout.setBalanceSplineCurveThreshold(float), IlvGraphLayout.setSplineLinkFilter(ilog.views.graphlayout.IlvSplineLinkFilter)

setHorizontalGridOffset

public final void setHorizontalGridOffset(float offset)
Sets the horizontal offset between the grid lines. Links are routed on an orthogonal grid.

The default value is 5.

See Also:
getHorizontalGridOffset(), setHorizontalMinOffset(float), setHorizontalGridBase(float)

getHorizontalGridOffset

public final float getHorizontalGridOffset()
Returns the horizontal offset between the grid lines.

See Also:
setHorizontalGridOffset(float)

setVerticalGridOffset

public final void setVerticalGridOffset(float offset)
Sets the vertical offset between the grid lines. Links are routed on an orthogonal grid.

The default value is 5.

See Also:
getVerticalGridOffset(), setVerticalMinOffset(float), setVerticalGridBase(float)

getVerticalGridOffset

public final float getVerticalGridOffset()
Returns the vertical offset between the grid lines.

See Also:
setVerticalGridOffset(float)

setHorizontalGridBase

public final void setHorizontalGridBase(float coordinate)
Sets the horizontal base coordinate of the grid. This is the x-coordinate of the first vertical grid line. Links are routed on an orthogonal grid.

The default value is 0.

See Also:
getHorizontalGridBase(), setHorizontalGridOffset(float)

getHorizontalGridBase

public final float getHorizontalGridBase()
Returns the horizontal base coordinate of the grid.

See Also:
setHorizontalGridBase(float)

setVerticalGridBase

public final void setVerticalGridBase(float coordinate)
Sets the vertical base coordinate of the grid. This is the y-coordinate of the first horizontal grid line. Links are routed on an orthogonal grid.

The default value is 0.

See Also:
getVerticalGridBase(), setVerticalGridOffset(float)

getVerticalGridBase

public final float getVerticalGridBase()
Returns the vertical base coordinate of the grid.

See Also:
setVerticalGridBase(float)

setHorizontalMinOffset

public final void setHorizontalMinOffset(float minOffset)
Sets the minimal horizontal offset between the node border and a link segment that is (vertically) parallel to the node border.

The default value is 3.

See Also:
getHorizontalMinOffset(), setHorizontalGridOffset(float)

getHorizontalMinOffset

public final float getHorizontalMinOffset()
Returns the minimal horizontal offset between the node border and a link segment that is (vertically) parallel to the node border.

See Also:
setHorizontalMinOffset(float)