public class IlpLinkLayoutRenderer
extends ilog.cpl.graph.css.renderer.IlpLinkLayoutRenderer
IlpNetworkView.
This class is a CSS stylable Bean. It can be configured like this in a CSS file:
LinkLayout {
class: "ilog.tgo.graphic.graphlayout.IltShortLinkLayout";
// Any properties configurable for given class.
}
The value of the class property should be the name of a
subclass of IlvGraphLayout that has a
no-argument constructor.
The allowed properties and their values depend on the class.
The properties linkLayout can be set on a subgraph node.
This lets you use a different link layout algorithm for each subgraph.
For example, the following rule says that subgraph identified as
SubNetwork1 must be laid out using an
IlvLinkLayout algorithm:
#SubNetwork1:linkLayoutRenderer {
linkLayout: @+linkLayout;
}
Subobject#linkLayout {
class: 'ilog.views.graphlayout.link.IlvLinkLayout';
// Any properties configurable for given class.
}
When specifying the link layout for a given subnetwork, use the pseudoclass linkLayoutRenderer indicating that the properties refers to the link layout renderer.
Perforce JViews layout algorithms (that is, subclasses of
IlvGraphLayout) provide many parameters
that control how a specific layout will be applied to a particular node
or link. Starting with JTGO 7.5, the link layout renderer lets you
set these per-object parameters from the style sheet as in the following
examples:
object."ilog.tgo.model.IltAbstractLink":linkLayoutRenderer:link {
linkStyle: DIRECT_STYLE;
}
The first rule will cause the method
IlvLinkLayout.setLinkStyle(java.lang.Object, int)
to be called for all the links that match the rule.
Note: Starting with JTGO 7.5, if you are not using any node
or link parameters, you can disable this mechanism using
setUsePerObjectParameters(false).
This will remove the overhead of testing the parameters, which can speed up
the rendering process significantly.
IlpNetworkView| Constructor and Description |
|---|
IlpLinkLayoutRenderer() |
| Modifier and Type | Method and Description |
|---|---|
IlvGraphLayout |
getLinkLayout()
Returns the graph layout for links.
|
IlvGraphLayout |
getLinkLayout(IlpRepresentationObject ro)
Return the link layout that is associated with the given representation
object.
|
boolean |
isUsePerObjectParameters()
Returns
true if per-object layout parameters
are enabled (the default), or false otherwise. |
void |
setLinkLayout(IlpRepresentationObject ro,
IlvGraphLayout layout)
Sets the link layout that is associated to the given
subnetwork representation object.
|
void |
setLinkLayout(IlvGraphLayout layout)
Changes the link layout.
|
void |
setUsePerObjectParameters(boolean use)
Enables or disables per-object layout parameters.
|
apply, applyDeclarations, customizeContainerGraphic, customizeGraphic, getCSSID, resetattach, detach, getLayoutParametersgetView, noteContainerAdded, noteContainerUpdatedpublic IlvGraphLayout getLinkLayout()
getLinkLayout in class ilog.cpl.graph.css.renderer.IlpLinkLayoutRenderernull if none has been specified.public void setLinkLayout(IlvGraphLayout layout)
setLinkLayout in class ilog.cpl.graph.css.renderer.IlpLinkLayoutRendererlayout - A graph layout or null.public IlvGraphLayout getLinkLayout(IlpRepresentationObject ro)
getLinkLayout in class ilog.cpl.graph.css.renderer.IlpLinkLayoutRendererro - Representation objectnull if nothing
has been explicitely configured to this node.public void setLinkLayout(IlpRepresentationObject ro, IlvGraphLayout layout)
The value is stored here just temporarily while the composite grapher of the given representation object is not created.
setLinkLayout in class ilog.cpl.graph.css.renderer.IlpLinkLayoutRendererpublic boolean isUsePerObjectParameters()
true if per-object layout parameters
are enabled (the default), or false otherwise.isUsePerObjectParameters in class ilog.cpl.graph.css.renderer.IlpLinkLayoutRenderersetUsePerObjectParameters(boolean)public void setUsePerObjectParameters(boolean use)
This method can be used to disable or re-enable the mechanism that sets per-link parameters, as explained in the class description.
By default, per-object parameters are enabled. You can disable them if you are sure that your style sheet does not use any per-object layout parameters. Disabling per-object parameters speeds up the rendering process.
setUsePerObjectParameters in class ilog.cpl.graph.css.renderer.IlpLinkLayoutRendereruse - If this parameter is true, per-object
layout parameters can be set in the style sheet, as explained
in the class description. If this parameter is false,
per-object layout parameters are ignored.© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.