|
||||||||||
| 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.multiple.IlvMultipleLayout
public class IlvMultipleLayout
The main class for the Multiple Layout algorithm.
This is not a layout algorithm but rather a facility to compose
multiple layout algorithms and treat them as one algorithm object.
This is more convenient if a sequence of layout algorithms must be applied
to subgraphs. For instance, assume that you want to apply a Tree layout,
then a Link layout for the nontree links, and finally a Label layout
for the link labels to each subgraph. It would be unfortunate to
call IlvGraphLayout.performLayout(boolean, boolean, boolean)
multiple times to achieve this, because the tree layout of the parent graph
would be finished before the link layout of its subgraph has started;
hence the link layout of the subgraph invalidates the tree layout of the
parent graph again.
To avoid this effect, the Tree layout, Link layout, and Label
layout of the subgraph should be finished before any layout of the
parent graph has started.
The following sample shows how to achieve this by using the Multiple
Layout class:
IlvGraphLayout layout = new IlvMultipleLayout(
new IlvTreeLayout(),
new IlvLinkLayout(),
new IlvAnnealingLabelLayout());
layout.attach(grapher);
layout.performLayout(true, true, true);
If more than two graph layouts and one label layout are necessary, you
can construct an IlvMultipleLayout from another
IlvMultipleLayout, as follows:
IlvGraphLayout layout = new IlvMultipleLayout(
new IlvMultipleLayout(layout1, layout2, null),
new IlvMultipleLayout(layout3, layout4, null),
labelLayout);
The multiple layout offers only a few layout parameters that are global
to all three sublayouts (such as the allowed time), but you can specify
the other layout parameters individually for each sublayout by accessing
getFirstGraphLayout(), getSecondGraphLayout(), and
getLabelLayout() directly.
If complex combinations of graph layouts and label layouts are needed in
a nested graph, you should use the Recursive Multiple Layout (see
IlvRecursiveMultipleLayout)
that utilizes the Multiple Layout inside a Recursive Layout.
| Field Summary |
|---|
| Fields inherited from class ilog.views.graphlayout.IlvGraphLayout |
|---|
INVERSE_VIEW_COORDINATES, MANAGER_COORDINATES, VIEW_COORDINATES |
| Constructor Summary | |
|---|---|
IlvMultipleLayout()
Creates a new instance of the Multiple Layout algorithm. |
|
IlvMultipleLayout(IlvGraphLayout layout1,
IlvGraphLayout layout2)
Creates a new instance of the Multiple Layout algorithm that composes the input layouts. |
|
IlvMultipleLayout(IlvGraphLayout layout1,
IlvGraphLayout layout2,
IlvLabelLayout layout3)
Creates a new instance of the Multiple Layout algorithm that composes the input layouts. |
|
IlvMultipleLayout(IlvMultipleLayout source)
Creates a new layout instance by copying an existing one. |
|
| Method Summary | |
|---|---|
void |
attach(IlvGraphModel graphModel)
Allows you to specify the graph model you want to lay out. |
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 IlvMultipleLayoutGrapherProperty
that stores the parameter settings of this layout class. |
IlvGraphLayoutReport |
createLayoutReport()
Returns a new instance of the layout report. |
void |
detach()
Detaches the graph model from the layout instance. |
IlvGraphLayout |
getFirstGraphLayout()
Returns the layout that is applied first. |
IlvLabelingModel |
getLabelingModel()
Returns the labeling model used for the label layout. |
IlvLabelLayout |
getLabelLayout()
Returns the label layout that is applied inside performLayout. |
IlvGraphicVector |
getMovingNodes()
Returns the vector of nodes being moved by the graph layout algorithm. |
IlvGraphLayout |
getSecondGraphLayout()
Returns the layout that is applied second. |
protected void |
init()
Initializes instance variables. |
boolean |
isFirstGraphLayoutActive()
Returns whether the first graph layout is active. |
boolean |
isFirstGraphLayoutPersistent()
Returns whether the first graph layout is persistent. |
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 |
isLabelLayoutActive()
Returns whether the label layout is active. |
boolean |
isLabelLayoutPersistent()
Returns whether the label layout is persistent. |
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 |
isSecondGraphLayoutActive()
Returns whether the second graph layout is active. |
boolean |
isSecondGraphLayoutPersistent()
Returns whether the second graph layout is persistent. |
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 Multiple Layout algorithm. |
void |
layoutStepPerformed(GraphLayoutEvent event)
This method is called by the first graph layout and the second graph layout. |
void |
layoutStepPerformed(LabelLayoutEvent event)
This method is called by the label layout. |
void |
setAutoLayout(boolean enable)
Enables the auto layout mode. |
void |
setCoordinatesMode(int mode)
Sets the coordinates mode. |
void |
setFirstGraphLayout(IlvGraphLayout layout)
Sets the first layout to be applied. |
void |
setFirstGraphLayoutActive(boolean active)
Sets whether the first graph layout is active. |
void |
setFirstGraphLayoutPersistent(boolean persistent)
Sets whether the first graph layout is persistent. |
void |
setGeometryUpToDate(boolean uptodate)
Normally called with a false argument
if the geometry of the graph changed. |
void |
setGraphModel(IlvGraphModel graphModel)
Sets the graph model to be laid out. |
void |
setInputCheckEnabled(boolean enable)
Enables the checks for the nodes, links, and/or labels provided as arguments for the different methods of this layout algorithm and its sublayout algorithms. |
void |
setLabelingModel(IlvLabelingModel model)
Sets the labeling model to be used for the label layout. |
void |
setLabelLayout(IlvLabelLayout layout)
Sets the label layout to be applied inside performLayout. |
void |
setLabelLayoutActive(boolean active)
Sets whether the label layout is active. |
void |
setLabelLayoutPersistent(boolean persistent)
Sets whether the label layout is persistent. |
void |
setMinBusyTime(long time)
Sets the minimal time the layout algorithm can be busy between two calls of layoutStepPerformed when the method
IlvGraphLayout.callLayoutStepPerformedIfNeeded() is used. |
void |
setParametersUpToDate(boolean uptodate)
Automatically called with a false argument
each time the value of a parameter is changed. |
void |
setSecondGraphLayout(IlvGraphLayout layout)
Sets the second layout to be applied. |
void |
setSecondGraphLayoutActive(boolean active)
Sets whether the second graph layout is active. |
void |
setSecondGraphLayoutPersistent(boolean persistent)
Sets whether the second graph layout is persistent. |
void |
setSilentAttach(boolean flag)
This method is used internally. |
void |
setStructureUpToDate(boolean uptodate)
Normally called with a false argument
if the structure of the graph changed. |
void |
setUseDefaultParameters(boolean option)
Specifies whether default parameters are to be used in the layout. |
boolean |
stopImmediately()
Stops the running layout algorithm as soon as possible. |
boolean |
supportsAllowedTime()
Indicates whether the layout class can stop the layout computation when a user-defined allowed time is exceeded. |
boolean |
supportsLayoutOfConnectedComponents()
Indicates whether the layout class can cut the attached graph into connected components, apply itself on each connected component separately, and then use the layout instance returned by the method IlvGraphLayout.getLayoutOfConnectedComponents() to position the connected
components. |
boolean |
supportsPercentageComplete()
Indicates whether the layout class can estimate the percentage of completion during the run of the layout. |
boolean |
supportsSaveParametersToNamedProperties()
Indicates whether the layout class can transfer the layout parameters to named properties. |
boolean |
supportsStopImmediately()
Indicates whether the layout class can immediately interrupt the current run of the layout in a controlled way. |
boolean |
useAnimateRedraw()
Returns true if animation is supported and enabled for
any sublayout of the Multiple Layout. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public IlvMultipleLayout()
attach(IlvGrapher).
attach(IlvGraphModel).
performLayout.
IlvGraphLayout.attach(ilog.views.IlvGrapher),
attach(ilog.views.graphlayout.IlvGraphModel),
setLabelingModel(ilog.views.graphlayout.labellayout.IlvLabelingModel),
IlvGraphLayout.performLayout(boolean, boolean, boolean)
public IlvMultipleLayout(IlvGraphLayout layout1,
IlvGraphLayout layout2)
performLayout is called on this
instance layout1 is performed first and
layout2 is performed second.
If a Recursive Layout is called for a nested graph on this instance,
all two layouts are applied to each subgraph.
Note: layout1 and layout2
are finished for a subgraph before the layout1 of the parent
graph is started.
layout1 - The first layout to be performed.layout2 - The second layout to be performed.IlvGraphLayout.attach(ilog.views.IlvGrapher),
attach(ilog.views.graphlayout.IlvGraphModel),
IlvGraphLayout.performLayout(boolean, boolean, boolean)
public IlvMultipleLayout(IlvGraphLayout layout1,
IlvGraphLayout layout2,
IlvLabelLayout layout3)
performLayout is called on this
instance, then layout1 is performed first,
layout2 is performed second, and layout3
is performed last.
If a recursive layout is called for a nested graph on this instance,
all three layouts are applied to each subgraph. However, notice that
layout1, layout2, and layout3
are finished for a subgraph before the layout1 of the parent
graph is started.
layout1 - The first layout to be performed.layout2 - The second layout to be performed.layout3 - The last layout to be performed.IlvGraphLayout.attach(ilog.views.IlvGrapher),
attach(ilog.views.graphlayout.IlvGraphModel),
setLabelingModel(ilog.views.graphlayout.labellayout.IlvLabelingModel),
IlvGraphLayout.performLayout(boolean, boolean, boolean)public IlvMultipleLayout(IlvMultipleLayout 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 persistence flags are copied. The sublayout instances
and their global layout parameters are copied.
The labeling model is not copied.
copy in class IlvGraphLayoutIlvMultipleLayout(IlvMultipleLayout),
setFirstGraphLayout(ilog.views.graphlayout.IlvGraphLayout),
setSecondGraphLayout(ilog.views.graphlayout.IlvGraphLayout),
setLabelLayout(ilog.views.graphlayout.labellayout.IlvLabelLayout),
setLabelingModel(ilog.views.graphlayout.labellayout.IlvLabelingModel),
setFirstGraphLayoutPersistent(boolean),
setSecondGraphLayoutPersistent(boolean),
setLabelLayoutPersistent(boolean),
copyParameters(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 activation and persistence flags are copied. The sublayout instances and their global layout parameters are copied. The labeling model is not copied.
copyParameters in class IlvGraphLayoutsource - The layout instance from which the parameters are copied.copy(),
setFirstGraphLayout(ilog.views.graphlayout.IlvGraphLayout),
setSecondGraphLayout(ilog.views.graphlayout.IlvGraphLayout),
setLabelLayout(ilog.views.graphlayout.labellayout.IlvLabelLayout),
setLabelingModel(ilog.views.graphlayout.labellayout.IlvLabelingModel),
setFirstGraphLayoutPersistent(boolean),
setSecondGraphLayoutPersistent(boolean),
setLabelLayoutPersistent(boolean)public void setFirstGraphLayout(IlvGraphLayout layout)
layout - The first layout.IlvGraphLayout.attach(ilog.views.IlvGrapher),
attach(ilog.views.graphlayout.IlvGraphModel),
getFirstGraphLayout()public IlvGraphLayout getFirstGraphLayout()
setFirstGraphLayout(ilog.views.graphlayout.IlvGraphLayout)public void setFirstGraphLayoutActive(boolean active)
IlvGraphLayout.performLayout() on the
Multiple layout instance.
active - true if the first graph layout is
active, or false otherwise.getFirstGraphLayout(),
isFirstGraphLayoutActive(),
IlvGraphLayout.performLayout()public boolean isFirstGraphLayoutActive()
setFirstGraphLayoutActive(boolean)public void setFirstGraphLayoutPersistent(boolean persistent)
If the first graph layout is persistent, it is automatically saved to named properties whenever the parameters of this Multiple Layout are saved to named properties. A new instance is allocated and automatically loaded from named properties whenever the parameters of this Multiple Layout are loaded from named properties. This is the default.
If the first graph layout is not persistent, it is not automatically saved or loaded through the named properties. However, you can save or load it by explicitly calling the corresponding methods.
persistent - true if the first graph layout is
persistent, or false otherwise.getFirstGraphLayout(),
isFirstGraphLayoutPersistent(),
IlvGrapherAdapter.saveParametersToNamedProperties(IlvGraphLayout,
boolean),
IlvGrapherAdapter.loadParametersFromNamedProperties(IlvGraphLayout)public boolean isFirstGraphLayoutPersistent()
setFirstGraphLayoutPersistent(boolean)public void setSecondGraphLayout(IlvGraphLayout layout)
layout - The second graph layout.
IlvGraphLayout.attach(ilog.views.IlvGrapher),
attach(ilog.views.graphlayout.IlvGraphModel),
getSecondGraphLayout()public IlvGraphLayout getSecondGraphLayout()
null if no second layout is necessary.
setSecondGraphLayout(ilog.views.graphlayout.IlvGraphLayout)public void setSecondGraphLayoutActive(boolean active)
IlvGraphLayout.performLayout() on the
Multiple layout instance.
active - true if the second graph layout is
active, or false otherwise.getSecondGraphLayout(),
isSecondGraphLayoutActive(),
IlvGraphLayout.performLayout()public boolean isSecondGraphLayoutActive()
setSecondGraphLayoutActive(boolean)public void setSecondGraphLayoutPersistent(boolean persistent)
If the second graph layout is persistent, it is automatically saved to named properties whenever the parameters of this Multiple Layout are saved to named properties. A new instance is allocated and automatically loaded from named properties whenever the parameters of this Multiple Layout are loaded from named properties. This is the default.
If the second graph layout is not persistent, it is not automatically saved or loaded through the named properties. However, you can save or load it by explicitly calling the corresponding methods.
persistent - true if the second graph layout is
persistent, or false otherwise.getSecondGraphLayout(),
isSecondGraphLayoutPersistent(),
IlvGrapherAdapter.saveParametersToNamedProperties(IlvGraphLayout,
boolean),
IlvGrapherAdapter.loadParametersFromNamedProperties(IlvGraphLayout)public boolean isSecondGraphLayoutPersistent()
setSecondGraphLayoutPersistent(boolean)public void setLabelLayout(IlvLabelLayout layout)
performLayout.
The label layout is always applied last.
You should set the label layout before attaching the graph model.
layout - The label layout.IlvGraphLayout.attach(ilog.views.IlvGrapher),
attach(ilog.views.graphlayout.IlvGraphModel)public IlvLabelLayout getLabelLayout()
performLayout.
It returns null if no label layout is necessary.
public void setLabelLayoutActive(boolean active)
IlvGraphLayout.performLayout() on the
Multiple layout instance.
active - true if the label layout is
active, or false otherwise.getLabelLayout(),
isLabelLayoutActive(),
IlvGraphLayout.performLayout()public boolean isLabelLayoutActive()
setLabelLayoutActive(boolean)public void setLabelLayoutPersistent(boolean persistent)
If the label layout is persistent, it is automatically saved to named properties whenever the parameters of this Multiple Layout are saved to named properties. A new instance is allocated and automatically loaded from named properties whenever the parameters of this Multiple Layout are loaded from named properties. This is the default.
If the label layout is not persistent, it is not automatically saved or loaded through the named properties. However, you can save or load it by explicitly calling the corresponding methods.
persistent - true if the label layout is
persistent, or false otherwise.getLabelLayout(),
isLabelLayoutPersistent(),
IlvDefaultLabelingModel.saveParametersToNamedProperties(IlvLabelLayout, boolean),
IlvDefaultLabelingModel.loadParametersFromNamedProperties(IlvLabelLayout)public boolean isLabelLayoutPersistent()
setLabelLayoutPersistent(boolean)public void setLabelingModel(IlvLabelingModel model)
If this layout instance is attached to a grapher or grapher adapter, an
IlvDefaultLabelingModel is created internally and attached to the
label layout by default.
You can use this method to specify a different labeling model.
If you want to attach this layout instance to a graph model that is not based on a grapher, you must set the labeling model before attaching the graph model.
Note that this labeling model is disposed of when the layout is detached
and cannot be used afterwards. Therefore you have to call
setLabelingModel each time immediately before attaching.
If you use the Multiple Layout in a nested graph, note the following:
The IlvDefaultLayoutProvider always uses the
IlvDefaultLabelingModel. If a specific labeling model
should be used in the multiple layout during the layout of
a nested graph, the most convenient way is to use the Recursive Multiple
Layout (see
IlvRecursiveMultipleLayout)
with a reference labeling model.
If you want to use your own layout provider, you should implement
IlvLayoutProvider.getGraphLayout(ilog.views.graphlayout.IlvGraphModel) in the following way:
IlvMultipleLayout if necessary.
model - The labeling model.IlvGraphLayout.attach(ilog.views.IlvGrapher),
attach(ilog.views.graphlayout.IlvGraphModel)public IlvLabelingModel getLabelingModel()
null, an
IlvDefaultLabelingModel is used when possible.
public void attach(IlvGraphModel graphModel)
IlvDefaultLabelingModel.
attach in class IlvGraphLayoutgraphModel - The graph model.detach(),
getFirstGraphLayout(),
getSecondGraphLayout(),
getLabelLayout(),
setLabelingModel(ilog.views.graphlayout.labellayout.IlvLabelingModel)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
Multiple Layout detaches its sublayouts.
Note that you must call this method when you no longer need the layout instance. Otherwise, some objects may not be garbage collected. If you explicitly set a labeling model, this labeling model will be disposed inside detach.
detach in class IlvGraphLayoutIlvGraphLayout.attach(ilog.views.IlvGrapher),
attach(ilog.views.graphlayout.IlvGraphModel),
getFirstGraphLayout(),
getSecondGraphLayout(),
getLabelLayout(),
setLabelingModel(ilog.views.graphlayout.labellayout.IlvLabelingModel)public void setGraphModel(IlvGraphModel graphModel)
IlvGraphLayout.attach(IlvGrapher) or
attach(IlvGraphModel).
setGraphModel in class IlvGraphLayoutpublic IlvGraphLayoutReport createLayoutReport()
IlvMultipleLayoutReport.
createLayoutReport in class IlvGraphLayoutcreateLayoutReport(),
IlvMultipleLayoutReport
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).
IlvGraphLayoutException - if the sublayout throws a
graph layout exception.IlvGraphLayout.performLayout()public void setCoordinatesMode(int mode)
The default is IlvGraphLayout.INVERSE_VIEW_COORDINATES.
setCoordinatesMode in class IlvGraphLayoutmode - The coordinates mode to set.
IlvGraphLayout.getCoordinatesMode(),
IlvGrapherAdapter.setCoordinatesMode(int),
IlvGrapherAdapter.setReferenceTransformer(ilog.views.IlvTransformer),
IlvGrapherAdapter.setReferenceView(ilog.views.IlvManagerView)public void setUseDefaultParameters(boolean option)
true, the layout uses 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 IlvGraphLayoutIlvGraphLayout.isUseDefaultParameters()public void setMinBusyTime(long time)
layoutStepPerformed when the method
IlvGraphLayout.callLayoutStepPerformedIfNeeded() is used.
The default value is 50 (milliseconds).
setMinBusyTime in class IlvGraphLayoutIlvGraphLayout.layoutStepPerformed(),
IlvGraphLayout.callLayoutStepPerformedIfNeeded(),
IlvGraphLayout.getMinBusyTime()public void setAutoLayout(boolean enable)
true, the layout is automatically performed
each time the layout instance is notified that the geometry
or the structure of the graph has changed.
The default value is false.
setAutoLayout in class IlvGraphLayoutIlvGraphLayout.isAutoLayout(),
IlvGraphLayout.contentsChanged(ilog.views.graphlayout.GraphModelEvent),
IlvGraphLayout.performAutoLayout(),
IlvGraphLayout.setAutoLayoutHandler(ilog.views.graphlayout.IlvAutoLayoutHandler)public void setInputCheckEnabled(boolean enable)
It is enabled by default.
setInputCheckEnabled in class IlvGraphLayoutIlvGraphLayout.isInputCheckEnabled()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 IlvGraphLayouttrue if the algorithm can be stopped at this time.IlvGraphLayoutReport.getCode()
public void checkAppropriateLinks()
throws IlvInappropriateLinkException
Performing a layout may throw an IlvInappropriateLinkException
if the layout cannot deal with the links of the graph.
With an IlvGrapher, it is recommended using links
of type IlvPolylineLinkImage and link
connectors of type IlvFreeLinkConnector
to avoid the exception (see the documentation of
IlvInappropriateLinkException for details).
Sometimes it is useful to check in advance whether layout would throw
an IlvInappropriateLinkException, without performing a
time-consuming layout. You can call the method
checkAppropriateLinks() for this purpose. If it does not
throw an IlvInappropriateLinkException, then performing layout will
also not throw an IlvInappropriateLinkException. (Notice that
performing layout may still throw other exceptions.)
You can control which checks are done with
IlvGraphModel.setLinkCheckEnabled(boolean) and
IlvGraphModel.setConnectionPointCheckEnabled(boolean).
The typical usage is to call checkAppropriateLinks to catch
the exception and to call IlvGraphLayoutUtil.EnsureAppropriateLinks(ilog.views.graphlayout.IlvGraphModel, ilog.views.graphlayout.IlvLayoutProvider)
in order to replace the inappropriate links and/or link connectors with
new links.
checkAppropriateLinks in class IlvGraphLayoutIlvInappropriateLinkExceptionIlvGraphModel.setLinkCheckEnabled(boolean),
IlvGraphModel.setConnectionPointCheckEnabled(boolean),
IlvGraphLayoutUtil.EnsureAppropriateLinks(ilog.views.graphlayout.IlvGraphModel, ilog.views.graphlayout.IlvLayoutProvider),
IlvInappropriateLinkExceptionpublic IlvGraphicVector getMovingNodes()
IlvGrapherAdaper
in order to optimize for speed.
getMovingNodes in class IlvGraphLayoutpublic void setParametersUpToDate(boolean uptodate)
false argument
each time the value of a parameter is changed.
This method is automatically called with a true argument
each time the layout is successfully performed. In this case, it calls
setParametersUpToDate with a true argument
for the sublayouts as well.
setParametersUpToDate in class IlvGraphLayoutisParametersUpToDate()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.
The method returns false if the parameters of one of the
sublayouts is out-of-date.
isParametersUpToDate in class IlvGraphLayoutsetParametersUpToDate(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. In this case, it calls
setStructureUpToDate with a true argument
for the sublayouts as well.
setStructureUpToDate in class IlvGraphLayoutisStructureUpToDate()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.
The method returns false if the structure of one of the
sublayouts is out-of-date.
isStructureUpToDate in class IlvGraphLayoutsetStructureUpToDate(boolean)public void setGeometryUpToDate(boolean uptodate)
false argument
if the geometry of the graph changed.
This method is automatically called with a true argument
each time the layout is successfully performed. In this case, it calls
setGeometryUpToDate with a true argument
for the sublayouts as well.
setGeometryUpToDate in class IlvGraphLayoutisGeometryUpToDate()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.
The method returns false if the geometry of one of the
sublayouts is out-of-date.
isGeometryUpToDate in class IlvGraphLayoutsetGeometryUpToDate(boolean)public boolean supportsPercentageComplete()
The calculated percentage values are not very precise.
supportsPercentageComplete in class IlvGraphLayouttrue.IlvGraphLayout.increasePercentageComplete(int),
IlvGraphLayoutReport.getPercentageComplete(),
IlvJGraphLayoutProgressBarpublic boolean supportsStopImmediately()
true.
supportsStopImmediately in class IlvGraphLayoutfalse.getFirstGraphLayout(),
getSecondGraphLayout(),
getLabelLayout(),
stopImmediately(),
IlvGraphLayout.isStoppedImmediately()public boolean supportsAllowedTime()
true.
supportsAllowedTime in class IlvGraphLayoutfalse.getFirstGraphLayout(),
getSecondGraphLayout(),
getLabelLayout(),
IlvGraphLayout.setAllowedTime(long),
IlvGraphLayout.getAllowedTime(),
IlvGraphLayout.isLayoutTimeElapsed()public boolean supportsLayoutOfConnectedComponents()
IlvGraphLayout.getLayoutOfConnectedComponents() to position the connected
components.
If the first graph layout and the second graph layout support
this feature, then it returns true.
supportsLayoutOfConnectedComponents in class IlvGraphLayoutfalse.getFirstGraphLayout(),
getSecondGraphLayout(),
IlvGraphLayout.getLayoutOfConnectedComponents(),
IlvGraphLayout.isLayoutOfConnectedComponentsEnabled(),
IlvGraphLayout.performLayout()public boolean supportsSaveParametersToNamedProperties()
.ivl file.
If the first graph layout, the second graph layout, and the label
layout support this feature, then it returns true.
supportsSaveParametersToNamedProperties in class IlvGraphLayoutfalse.getFirstGraphLayout(),
getSecondGraphLayout(),
getLabelLayout(),
IlvGrapherAdapter.saveParametersToNamedProperties(ilog.views.graphlayout.IlvGraphLayout, boolean),
IlvGrapherAdapter.loadParametersFromNamedProperties(ilog.views.graphlayout.IlvGraphLayout),
IlvGrapherAdapter.removeParametersFromNamedProperties()
protected IlvGraphLayoutGrapherProperty createLayoutGrapherProperty(String name,
boolean withDefaults)
IlvMultipleLayoutGrapherProperty
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