|
||||||||||
| PREV CLASS Documentation homepage NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectilog.views.graphlayout.IlvGraphLayout
ilog.views.graphlayout.recursive.IlvRecursiveLayout
ilog.views.graphlayout.recursive.IlvRecursiveMultipleLayout
public class IlvRecursiveMultipleLayout
The main class for the Recursive Multiple Layout algorithm.
This is not a layout algorithm but rather a facility to perform multiple layouts recursively in a nested grapher. In principle, this is just the combination of Recursive Layout and Multiple Layout.
Unless otherwise mentioned, the normal layout algorithms such as
IlvHierarchicalLayout,
IlvTreeLayout,
IlvMultipleLayout, and so forth
work on a flat graph, that is, they lay out the attached graph but
not the subgraphs of the attached graph.
Similarly, label layout algorithms work only on flat managers,
not on nested graphs.
The Recursive Multiple Layout is different: it traverses the nesting
structure starting from the attached graph and recursively applies a
first graph layout, then a second graph layout, and finally a label layout
on all subgraphs. It can be tailored for which sublayouts have to be applied
to which subgraph.
The Recursive Multiple Layout is a Recursive Layout (see
IlvRecursiveLayout) where all layouts
of subgraphs are Multiple Layouts (see IlvMultipleLayout).
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 examples shows how to achieve this by using the Recursive
Multiple Layout class. There are basically two scenarios:
To perform a Tree Layout, a Link Layout, and an Annealing Label Layout on a nested graph, call:
IlvGraphLayout layout = new IlvMultipleRecursiveLayout(
new IlvTreeLayout(),
new IlvLinkLayout(),
new IlvAnnealingLabelLayout());
layout.attach(grapher);
layout.performLayout(true, true);
If you simply want to apply a label layout in a nested grapher, call:
IlvGraphLayout layout = new IlvMultipleRecursiveLayout(
new IlvAnnealingLabelLayout());
layout.attach(grapher);
layout.performLayout(true, true);
In this case, each subgraph is treated bottom-up. First a tree layout
is performed on the subgraph. Then a link layout is performed on the
subgraph, finally the label layout is performed on the subgraph.
All subgraphs of the nested graph including the top-level graph
are treated in this way. All layouts are performed with the same
global layout parameters as the layout instances passed as arguments
to the constructor of IlvRecursiveMultipleLayout, which
are called the reference layouts.
You can access the reference layout instances to change the global
layout parameters:
IlvTreeLayout treeLayout =
(IlvTreeLayout)layout.getFirstReferenceGraphLayout();
treeLayout.setFlowDirection(IlvDirection.Left);
IlvLinkLayout linkLayout =
(IlvLinkLayout)layout.getSecondReferenceGraphLayout();
linkLayout.setLinkOffset(5f);
IlvAnnealingLabelLayout labelLayout =
(IlvAnnealingLabelLayout)layout.getReferenceLabelLayout();
labelLayout.setObstacleOffset(20f);
Internally, a clone of the reference instance is created for each subgraph.
This clone remains attached as long as the Recursive Multiple Layout is
attached to the top-level graph. Before layout is performed, the global
layout parameters are copied from the reference instance to each clone.
If you need to set layout parameters for individual nodes, links, or labels,
you have to access the layout instance of the subgraph that owns the node,
link, or label:
IlvTreeLayout treeLayout = (IlvTreeLayout)layout.getFirstGraphLayout(subgraph); treeLayout.setAlignment(node, IlvTreeLayout.TIP_OVER); IlvLinkLayout linkLayout = (IlvLinkLayout)layout.getSecondGraphLayout(subgraph); linkLayout.setLinkStyle(link, IlvLinkLayout.ORTHOGONAL_STYLE); IlvAnnealingLabelLayout labelLayout = (IlvAnnealingLabelLayout)layout.getLabelLayout(subgraph); labelLayout.setLabelDescriptor(label, descriptor);
In the typical case, when you use instances of IlvGraphic as
nodes and instances of IlvGrapher as subgraphs, it is:
IlvTreeLayout treeLayout = (IlvTreeLayout)layout.getFirstGraphLayout(node.getGraphicBag()); treeLayout.setAlignment(node, IlvTreeLayout.TIP_OVER); ...
Second scenario: Different layout styles at different subgraphs
The following example shows the second scenario: Each subgraph should be laid out by a different layout style or with individual layout parameters. In this case, there are no reference layouts. You specify the layouts of subgraphs in a very convenient way:
IlvRecursiveMultipleLayout layout = new IlvRecursiveMultipleLayout();
layout.attach(topLevelGrapher);
// specify the layout of the top-level graph
layout.setLayout(null, new IlvGridLayout(),
new IlvLinkLayout(),
new IlvRandomLabelLayout());
// specify the layout of subgraphs
layout.setLayout(subgraph1, new IlvTreeLayout(),
new IlvLinkLayout(),
new IlvAnnealingLabelLayout());
layout.setLayout(subgraph2, new IlvHierarchicalLayout(),
new IlvLinkLayout(),
new IlvAnnealingLabelLayout());
// perform the layout
IlvLayoutReport report = layout.performLayout(true, true);
In this scenario, all layout parameters of different subgraphs are
independent. You access the layout instance of each individual subgraph
in the same way as when you have a reference layout. This allows you
to change global layout parameters for this subgraph as well as
parameters of nodes, links, or labels of the subgraph.
Notes:
IlvRecursiveLayout.layout = new IlvRecursiveLayout(new IlvRecursiveMultipleLayout()); layout.performLayout(true, true)This would traverse the nested graph and perform the Recursive Layout for each subgraph, which, however, itself would recursively traverse the nested graph again. This would just be waste of run time.
IlvGrapherAdapter.saveParametersToNamedProperties(IlvGraphLayout, boolean).
| Field Summary | |
|---|---|
static int |
ACTIVE
The sublayout is active for all subgraphs. |
static int |
INACTIVE
The sublayout is inactive for all subgraphs. |
static int |
MIXED
The sublayout can be active or inactive for individual subgraphs. |
| Fields inherited from class ilog.views.graphlayout.recursive.IlvRecursiveLayout |
|---|
INTERNAL_PROVIDER_MODE, PROPAGATE_CLASS_MISMATCH, PROPAGATE_EXCEPTION, PROPAGATE_PARAMETER_AMBIGUOUS, PROPAGATE_PARAMETER_MISMATCH, PROPAGATE_PARAMETER_SET, REFERENCE_LAYOUT_MODE, SPECIFIED_PROVIDER_MODE |
| Fields inherited from class ilog.views.graphlayout.IlvGraphLayout |
|---|
INVERSE_VIEW_COORDINATES, MANAGER_COORDINATES, VIEW_COORDINATES |
| Constructor Summary | |
|---|---|
IlvRecursiveMultipleLayout()
Creates a new instance of the Recursive Multiple Layout algorithm that allows you to apply layouts to the entire nested graph. |
|
IlvRecursiveMultipleLayout(IlvGraphLayout referenceLayout1,
IlvGraphLayout referenceLayout2)
Creates a new instance of the Recursive Multiple Layout algorithm. |
|
IlvRecursiveMultipleLayout(IlvGraphLayout referenceLayout1,
IlvGraphLayout referenceLayout2,
IlvLabelLayout referenceLayout3)
Creates a new instance of the Recursive Multiple Layout algorithm that allows you to apply the reference layouts to the entire nested graph. |
|
IlvRecursiveMultipleLayout(IlvLabelLayout referenceLayout)
Creates a new instance of the Recursive Multiple Layout algorithm that allows you to apply the reference label layout to the entire nested graph. |
|
IlvRecursiveMultipleLayout(IlvRecursiveMultipleLayout source)
Creates a new layout instance by copying an existing one. |
|
| Method Summary | |
|---|---|
void |
addSubLabelLayoutEventListener(LabelLayoutEventListener listener)
Adds a listener for the layout events delivered during the label layout of subgraphs. |
void |
attach(IlvGraphModel graphModel)
Allows you to specify the top-level graph model of the nested graph you want to lay out. |
IlvGraphLayout |
copy()
Copies the layout instance. |
void |
copyParameters(IlvGraphLayout source)
Copies the parameters from a given layout instance. |
void |
detach()
Detaches the graph model from the layout instance. |
IlvGraphLayout |
getFirstGraphLayout(Object subgraph)
Returns the layout instance to be used for the input subgraph as the first layout. |
int |
getFirstGraphLayoutActive()
Returns whether the first graph layout of all subgraphs is active. |
int |
getFirstGraphLayoutActiveDuringAutoLayout()
Tests if the first graph layout of all subgraphs is active during automatic layout. |
IlvGraphLayout |
getFirstReferenceGraphLayout()
Returns the first reference graph layout, if the reference layout mode is used. |
IlvLabelLayout |
getLabelLayout(Object subgraph)
Returns the layout instance to be used for the input subgraph as the label layout. |
int |
getLabelLayoutActive()
Returns whether the label layout of all subgraphs is active. |
int |
getLabelLayoutActiveDuringAutoLayout()
Tests if the label layout of all subgraphs is active during automatic layout. |
IlvGraphLayout |
getLayout(Object subgraph)
Returns the layout instance to be used for the input subgraph. |
IlvLabelingModel |
getReferenceLabelingModel()
Returns the reference labeling model used for the label layout. |
IlvLabelLayout |
getReferenceLabelLayout()
Returns the reference label layout, if the reference layout mode is used. |
IlvGraphLayout |
getSecondGraphLayout(Object subgraph)
Returns the layout instance to be used for the input subgraph as the second layout. |
int |
getSecondGraphLayoutActive()
Tests if the second graph layout of all subgraphs is active. |
int |
getSecondGraphLayoutActiveDuringAutoLayout()
Tests if the second graph layout of all subgraphs is active during automatic layout. |
IlvGraphLayout |
getSecondReferenceGraphLayout()
Returns the second reference graph layout, if the reference layout mode is used. |
protected void |
init()
Initializes instance variables. |
void |
layoutStepPerformed(GraphLayoutEvent event)
This method is called by the graph layouts of subgraphs. |
void |
layoutStepPerformed(LabelLayoutEvent event)
This method is called by the label layout. |
protected int |
performSublayout(Object subgraph,
IlvGraphLayout layout,
boolean force,
boolean redraw)
Starts the input layout algorithm. |
void |
propagateFirstGraphLayoutActive(boolean active)
Sets whether the first graph layout of all subgraphs is active. |
void |
propagateLabelLayoutActive(boolean active)
Sets whether the label layout of all subgraphs is active. |
void |
propagateSecondGraphLayoutActive(boolean active)
Sets whether the second graph layout of all subgraphs is active. |
void |
removeSubLabelLayoutEventListener(LabelLayoutEventListener listener)
Removes a listener for the layout events delivered during the label layout of subgraphs. |
void |
setFirstGraphLayoutActive(boolean active)
Deprecated. Beginning with ILOG JViews 8.1, use propagateFirstGraphLayoutActive(boolean) instead. |
void |
setFirstGraphLayoutActive(int active)
Sets whether the first graph layout of all subgraphs is active. |
void |
setFirstGraphLayoutActiveDuringAutoLayout(int active)
Sets whether the first graph layout of all subgraphs is active during automatic layout. |
void |
setLabelLayoutActive(boolean active)
Deprecated. Beginning with ILOG JViews 8.1, use propagateLabelLayoutActive(boolean) instead. |
void |
setLabelLayoutActive(int active)
Sets whether the label layout of all subgraphs is active. |
void |
setLabelLayoutActiveDuringAutoLayout(int active)
Sets whether the label layout of all subgraphs is active during automatic layout. |
void |
setLayout(Object subgraph,
IlvGraphLayout layout)
Sets the layout instance to be used for the input subgraph. |
void |
setLayout(Object subgraph,
IlvGraphLayout layout,
boolean detachPrevious,
boolean traverse)
Sets the layout instance to be used for the input subgraph. |
void |
setLayout(Object subgraph,
IlvGraphLayout layout1,
IlvGraphLayout layout2)
Sets the layout instances to be used for the input subgraph. |
void |
setLayout(Object subgraph,
IlvGraphLayout layout1,
IlvGraphLayout layout2,
IlvLabelLayout layout3)
Sets the layout instances to be used for the input subgraph. |
void |
setReferenceLabelingModel(IlvLabelingModel model)
Sets the reference labeling model to be used for the label layouts. |
void |
setSecondGraphLayoutActive(boolean active)
Deprecated. Beginning with ILOG JViews 8.1, use propagateSecondGraphLayoutActive(boolean) instead. |
void |
setSecondGraphLayoutActive(int active)
Sets whether the second graph layout of all subgraphs is active. |
void |
setSecondGraphLayoutActiveDuringAutoLayout(int active)
Sets whether the second graph layout of all subgraphs is active during automatic layout. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int ACTIVE
setFirstGraphLayoutActive(int),
setFirstGraphLayoutActiveDuringAutoLayout(int),
setSecondGraphLayoutActive(int),
setSecondGraphLayoutActiveDuringAutoLayout(int),
setLabelLayoutActive(int),
setLabelLayoutActiveDuringAutoLayout(int),
Constant Field Valuespublic static final int INACTIVE
setFirstGraphLayoutActive(int),
setFirstGraphLayoutActiveDuringAutoLayout(int),
setSecondGraphLayoutActive(int),
setSecondGraphLayoutActiveDuringAutoLayout(int),
setLabelLayoutActive(int),
setLabelLayoutActiveDuringAutoLayout(int),
Constant Field Valuespublic static final int MIXED
setFirstGraphLayoutActive(int),
setFirstGraphLayoutActiveDuringAutoLayout(int),
setSecondGraphLayoutActive(int),
setSecondGraphLayoutActiveDuringAutoLayout(int),
setLabelLayoutActive(int),
setLabelLayoutActiveDuringAutoLayout(int),
Constant Field Values| Constructor Detail |
|---|
public IlvRecursiveMultipleLayout(IlvGraphLayout referenceLayout1,
IlvGraphLayout referenceLayout2)
Use this constructor if you want to apply the same layout
styles with the same global layout parameters to all subgraphs of the
nested graph. The layout mode of this Recursive Multiple Layout is
IlvRecursiveLayout.REFERENCE_LAYOUT_MODE.
This constructor behaves like a recursive layout that contains
a multiple layout. The following code example using
IlvRecursiveMultipleLayout:
layout = new IlvRecursiveMultipleLayout(layout1, layout2);is equivalent to:
layout = new IlvRecursiveLayout(
new IlvMultipleLayout(layout1, layout2));
The reference graph layouts must not be an instance of
IlvRecursiveLayout.
To indicate the top-level grapher of the nesting hierarchy you want to
lay out, use the method attach(IlvGrapher).
To indicate the graph model of the top-level graph of the nesting
hierarchy to lay out, call attach(IlvGraphModel).
To perform the layout, call performLayout(boolean, boolean).
IlvGraphLayout.attach(ilog.views.IlvGrapher),
IlvGraphLayout.attach(ilog.views.graphlayout.IlvGraphModel),
IlvGraphLayout.performLayout(boolean, boolean),
IlvRecursiveLayout.getLayoutMode()
public IlvRecursiveMultipleLayout(IlvGraphLayout referenceLayout1,
IlvGraphLayout referenceLayout2,
IlvLabelLayout referenceLayout3)
IlvRecursiveLayout.REFERENCE_LAYOUT_MODE.
This constructor behaves basically like a Recursive Layout that contains a Multiple Layout. The code
layout = new IlvRecursiveMultipleLayout(layout1, layout2, layout3);is equivalent to
layout = new IlvRecursiveLayout(
new IlvMultipleLayout(layout1, layout2, layout3));
The reference graph layouts must not be an instance of
IlvRecursiveLayout.
To indicate the top-level grapher of the nesting hierarchy you want to
lay out, use the method attach(IlvGrapher).
To indicate the graph model of the top-level graph of the nesting
hierarchy you want to lay out, use the method
attach(IlvGraphModel).
To perform the layout, use the method
performLayout(boolean, boolean).
IlvGraphLayout.attach(ilog.views.IlvGrapher),
IlvGraphLayout.attach(ilog.views.graphlayout.IlvGraphModel),
IlvGraphLayout.performLayout(boolean, boolean),
IlvRecursiveLayout.getLayoutMode()public IlvRecursiveMultipleLayout(IlvLabelLayout referenceLayout)
IlvRecursiveLayout.REFERENCE_LAYOUT_MODE.
This constructor behaves basically like a Recursive Layout that contains a Multiple Layout that contains the label layout. The code
layout = new IlvRecursiveMultipleLayout(labelLayout);is equivalent to
layout = new IlvRecursiveLayout(
new IlvMultipleLayout(null, null, labelLayout));
To indicate the top-level grapher of the nesting hierarchy you want to
lay out, use the method attach(IlvGrapher).
To indicate the graph model of the top-level graph of the nesting
hierarchy you want to lay out, use the method
attach(IlvGraphModel).
To perform the layout, use the method
performLayout(boolean, boolean).
IlvGraphLayout.attach(ilog.views.IlvGrapher),
IlvGraphLayout.attach(ilog.views.graphlayout.IlvGraphModel),
IlvGraphLayout.performLayout(boolean, boolean),
IlvRecursiveLayout.getLayoutMode()public IlvRecursiveMultipleLayout()
setLayout(Object, IlvGraphLayout, IlvGraphLayout, IlvLabelLayout).
The layout mode of this Recursive Multiple Layout is
IlvRecursiveLayout.INTERNAL_PROVIDER_MODE.
To indicate the top-level grapher of the nesting hierarchy you want to
lay out, use the method attach(IlvGrapher).
To indicate the graph model of the top-level graph of the nesting
hierarchy you want to lay out, use the method
attach(IlvGraphModel).
To perform the layout, use the method
performLayout(boolean, boolean).
IlvGraphLayout.attach(ilog.views.IlvGrapher),
IlvGraphLayout.attach(ilog.views.graphlayout.IlvGraphModel),
IlvGraphLayout.performLayout(boolean, boolean),
IlvRecursiveLayout.getLayoutMode()public IlvRecursiveMultipleLayout(IlvRecursiveMultipleLayout source)
copy() method.
Any subclass should provide a copy constructor.
The parameters of the source layout are copied using
the method copyParameters(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 IlvRecursiveLayoutpublic IlvGraphLayout copy()
This method copies the layout instance by calling the copy constructor. Note that the parameters which are specific to a node or a link are not copied. The reference labeling model is not copied. It depends on the layout mode what is copied:
IlvRecursiveLayout.REFERENCE_LAYOUT_MODE -
The reference layouts are copied deeply.IlvRecursiveLayout.INTERNAL_PROVIDER_MODE -
The information which subgraph uses which sublayouts is not copied.
copy in class IlvRecursiveLayoutIlvRecursiveMultipleLayout(IlvRecursiveMultipleLayout),
copyParameters(ilog.views.graphlayout.IlvGraphLayout),
IlvRecursiveLayout.getLayoutMode()public void copyParameters(IlvGraphLayout source)
IlvRecursiveLayout.REFERENCE_LAYOUT_MODE -
The reference layouts are copied deeply.IlvRecursiveLayout.INTERNAL_PROVIDER_MODE -
The information which subgraph uses which sublayouts is not copied.
copyParameters in class IlvRecursiveLayoutsource - The layout instance from which the parameters are copied.copy(),
IlvRecursiveLayout.getLayoutMode()public void setReferenceLabelingModel(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 Recursive Multiple Layout.
The reference labeling model is used to attach the label layout of
the top-level graph. Clones of the reference labeling model are used
to attach the label layout of subgraphs that are nested inside.
The clones are created by calling
IlvLabelingModel.createLabelingModel(Object) on the reference
labeling model.
Note that all these labeling models are disposed of when the layout is
detached and cannot be used afterwards. Therefore you have to call
setLabelingModel each time immediately before attaching it.
model - The labeling model.IlvGraphLayout.attach(ilog.views.IlvGrapher),
IlvGraphLayout.attach(ilog.views.graphlayout.IlvGraphModel)public IlvLabelingModel getReferenceLabelingModel()
null, an
IlvDefaultLabelingModel is used when possible.
public IlvGraphLayout getFirstReferenceGraphLayout()
null otherwise.
In reference layout mode, the reference layout is used to lay out the top-level graph. Clones of the reference layout are used to lay out the subgraphs. The entire nested graph is laid out with the global layout parameters of the reference layout. If you change global layout parameters of the reference layout, this will affect the layout of subgraphs as well, because the global layout parameters are copied from the reference layout to the layouts of the subgraphs.
IlvRecursiveLayout.getLayoutMode(),
IlvRecursiveMultipleLayout(IlvGraphLayout, IlvGraphLayout, IlvLabelLayout)public IlvGraphLayout getSecondReferenceGraphLayout()
null otherwise.
In reference layout mode, the reference layout is used to lay out the top-level graph. Clones of the reference layout are used to lay out the subgraphs. The entire nested graph is laid out with the global layout parameters of the reference layout. If you change global layout parameters of the reference layout, this will affect the layout of subgraphs as well, because the global layout parameters are copied from the reference layout to the layouts of the subgraphs.
IlvRecursiveLayout.getLayoutMode(),
IlvRecursiveMultipleLayout(IlvGraphLayout, IlvGraphLayout, IlvLabelLayout)public IlvLabelLayout getReferenceLabelLayout()
null otherwise.
In reference layout mode, the reference layout is used to lay out the top-level graph. Clones of the reference layout are used to lay out the subgraphs. The entire nested graph is laid out with the global layout parameters of the reference layout. If you change global layout parameters of the reference layout, this will affect the layout of subgraphs as well, because the global layout parameters are copied from the reference layout to the layouts of the subgraphs.
IlvRecursiveLayout.getLayoutMode(),
IlvRecursiveMultipleLayout(IlvLabelLayout),
IlvRecursiveMultipleLayout(IlvGraphLayout, IlvGraphLayout, IlvLabelLayout)
public void setLayout(Object subgraph,
IlvGraphLayout layout)
IlvMultipleLayout.
If null is passed as the subgraph, the input layout is used
for the top-level graph.
If null is passed as the layout, no layout will be performed
for the corresponding subgraph.
You can use this method only in internal provider mode. You must attach a grapher or graph model first before using this method. Each subgraph must get a different layout instance, that is, the layout instances cannot be shared among different subgraphs. The input layout is automatically attached and detached by the Recursive Multiple Layout as needed.
setLayout in class IlvRecursiveLayoutsubgraph - The subgraph or null.layout - The layout instance used to lay out the subgraph.
This can be null, or must be an instance of
IlvMultipleLayout.IlvGraphLayout.attach(ilog.views.IlvGrapher),
IlvGraphLayout.attach(ilog.views.graphlayout.IlvGraphModel),
setLayout(Object, IlvGraphLayout, IlvGraphLayout, IlvLabelLayout),
IlvRecursiveLayout.getLayoutMode(),
IlvRecursiveMultipleLayout(),
getLayout(java.lang.Object)
public void setLayout(Object subgraph,
IlvGraphLayout layout,
boolean detachPrevious,
boolean traverse)
IlvMultipleLayout.
If the traverse flag is true, it traverses
the nested graph starting from the input graph and sets a clone of
the input layout recursively for each subgraphs.
Notice that if you insert subgraphs after calling this method,
the new subgraphs have no layout yet assigned.
If null is passed as the subgraph, the input layout is used
for the top-level graph, and the traversal, if any, starts at the
top-level graph.
If null is passed as the layout, no layout will be performed
for the corresponding subgraphs.
You can use this method only in internal provider mode. Each subgraph must get a different layout instance, that is, the layout instances cannot be shared among different subgraphs. You must attach a grapher or graph model first before using this method. The input layout is automatically attached and detached by the Recursive Multiple Layout as needed.
setLayout in class IlvRecursiveLayoutsubgraph - The subgraph or null.layout - The layout instance used to lay out the subgraph.
This must be an instance of
IlvMultipleLayout.detachPrevious - If true, the layout instance previously
specified as the preferred layout of the subgraph
(if any) is detached.traverse - If true, clones of the input layout are
recursively used for all current subgraphs of the input
graph.setLayout(Object, IlvGraphLayout),
IlvGraphLayout.attach(ilog.views.IlvGrapher),
IlvGraphLayout.attach(ilog.views.graphlayout.IlvGraphModel),
IlvRecursiveLayout.getLayoutMode(),
IlvRecursiveMultipleLayout(),
getLayout(java.lang.Object)
public void setLayout(Object subgraph,
IlvGraphLayout layout1,
IlvGraphLayout layout2)
null is passed as the subgraph, the input layout is used
for the top-level graph.
Internally, a Multiple Layout is created that contains the input layouts
as sublayouts.
When the Recursive Multiple Layout is performed, layout1
is applied first and layout2 second to the input subgraph.
You can use this method only in internal provider mode. You must attach a grapher or graph model before using this method. Each subgraph must get different layout instances, that is, the layout instances cannot be shared among different subgraphs. The input layouts are automatically attached and detached by the recursive multiple layout as needed.
subgraph - The subgraph or null.layout1 - The first graph layout used to lay out the subgraph.layout2 - The second graph layout used to lay out the subgraph.IlvGraphLayout.attach(ilog.views.IlvGrapher),
IlvGraphLayout.attach(ilog.views.graphlayout.IlvGraphModel),
IlvRecursiveLayout.getLayoutMode(),
IlvRecursiveMultipleLayout(),
getLayout(java.lang.Object),
getFirstGraphLayout(java.lang.Object),
getSecondGraphLayout(java.lang.Object)
public void setLayout(Object subgraph,
IlvGraphLayout layout1,
IlvGraphLayout layout2,
IlvLabelLayout layout3)
null is passed as the subgraph, the input layout is used
for the top-level graph.
Internally, a Multiple Layout is created that contains the input layouts
as sublayouts.
When the Recursive Multiple Layout is performed, layout1
is applied first, layout2 second, and layout3
last to the input subgraph.
You can use this method only in internal provider mode. You must attach a grapher or graph model first before using this method. Each subgraph must get different layout instances, that is, the layout instances cannot be shared among different subgraphs. The input layouts are automatically attached and detached by the Recursive Multiple Layout as needed.
subgraph - The subgraph or null.layout1 - The first graph layout used to lay out the subgraph.layout2 - The second graph layout used to lay out the subgraph.layout3 - The label layout used to lay out the subgraph.IlvGraphLayout.attach(ilog.views.IlvGrapher),
IlvGraphLayout.attach(ilog.views.graphlayout.IlvGraphModel),
IlvRecursiveLayout.getLayoutMode(),
IlvRecursiveMultipleLayout(),
getLayout(java.lang.Object),
getFirstGraphLayout(java.lang.Object),
getSecondGraphLayout(java.lang.Object),
getLabelLayout(java.lang.Object)public IlvGraphLayout getFirstGraphLayout(Object subgraph)
null is passed as the subgraph, the layout instance
of the top-level graph is returned.
You can use this method in all layout modes.
You must attach a grapher or graph model first before using this method.
The method may return null if no layout should be performed
for the subgraph.
In reference layout mode, changing global layout parameters of the layout instances of subgraphs is useless, because during layout, the global parameters of the first reference graph layout are used for each subgraph.
subgraph - The subgraph or null.
IlvGraphLayout.attach(ilog.views.IlvGrapher),
IlvGraphLayout.attach(ilog.views.graphlayout.IlvGraphModel),
IlvRecursiveLayout.getLayoutMode(),
setLayout(Object, IlvGraphLayout, IlvGraphLayout, IlvLabelLayout)public IlvGraphLayout getSecondGraphLayout(Object subgraph)
null is passed as the subgraph, the layout instance
of the top-level graph is returned.
You can use this method in all layout modes.
You must attach a grapher or graph model first before using this method.
The method may return null if no layout should be performed
for the subgraph.
In reference layout mode, changing global layout parameters of the layout instances of subgraphs is useless, because during layout, the global parameters of the second reference graph layout are used for each subgraph.
subgraph - The subgraph or null.
IlvGraphLayout.attach(ilog.views.IlvGrapher),
IlvGraphLayout.attach(ilog.views.graphlayout.IlvGraphModel),
IlvRecursiveLayout.getLayoutMode(),
setLayout(Object, IlvGraphLayout, IlvGraphLayout, IlvLabelLayout)public IlvLabelLayout getLabelLayout(Object subgraph)
null is passed as the subgraph, the layout instance
of the top-level graph is returned.
You can use this method in all layout modes.
You must attach a grapher or graph model first before using this method.
The method may return null if no layout should be performed
for the subgraph.
In reference layout mode, changing global layout parameters of the layout instances of subgraphs is useless, because during layout, the global parameters of the reference label layout are used for each subgraph.
subgraph - The subgraph or null.
IlvGraphLayout.attach(ilog.views.IlvGrapher),
IlvGraphLayout.attach(ilog.views.graphlayout.IlvGraphModel),
IlvRecursiveLayout.getLayoutMode(),
setLayout(Object, IlvGraphLayout, IlvGraphLayout, IlvLabelLayout)public IlvGraphLayout getLayout(Object subgraph)
IlvMultipleLayout.
If null is passed as the subgraph, the layout instance
of the top-level graph is returned.
You can use this method in all layout modes.
You must attach a grapher or graph model first before using this method.
The method may return null if no layout should be performed
for the subgraph.
In reference layout mode, changing global layout parameters of the layout instances of subgraphs is useless, because during layout, the global parameters of the reference layout are used for each subgraph.
getLayout in class IlvRecursiveLayoutsubgraph - The subgraph or null.
IlvGraphLayout.attach(ilog.views.IlvGrapher),
IlvGraphLayout.attach(ilog.views.graphlayout.IlvGraphModel),
IlvRecursiveLayout.getLayoutMode(),
setLayout(java.lang.Object, ilog.views.graphlayout.IlvGraphLayout)public void attach(IlvGraphModel graphModel)
IlvRecursiveLayout.REFERENCE_LAYOUT_MODE.
If a label layout algorithm is used but no reference labeling model was
specified before, it tries to use an IlvDefaultLabelingModel.
attach in class IlvRecursiveLayoutgraphModel - The graph model.detach(),
setReferenceLabelingModel(ilog.views.graphlayout.labellayout.IlvLabelingModel)public void detach()
IlvGraphLayout.attach(IlvGraphModel).
The detach method performs cleaning operations on the
graph model.
In addition to the cleaning operations in the base class, the
Recursive Multiple Layout detaches the sublayouts of subgraphs
and disposes of the labeling models including the reference labeling model.
In internal provider mode, it also cleans all settings of layout instances
for subgraphs.
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 IlvRecursiveLayoutIlvGraphLayout.attach(ilog.views.IlvGrapher),
IlvGraphLayout.attach(ilog.views.graphlayout.IlvGraphModel),
setLayout(java.lang.Object, ilog.views.graphlayout.IlvGraphLayout)
protected int performSublayout(Object subgraph,
IlvGraphLayout layout,
boolean force,
boolean redraw)
throws IlvGraphLayoutException