public class IlvLabelLayoutRenderer extends IlvFilterSDMRenderer
IlvLabelLayoutRenderer
is a
filtering renderer that applies an "annealing" label layout algorithm
to: IlvGeneralNode
instances
IlvGeneralLink
instances
IlvSDMCompositeNode
instances which are direct children of the root IlvSDMCompositeNode
IlvSDMCompositeLink
instances which are direct children of the root IlvSDMCompositeLink
IlvComposite
instance, its IlvAnnealingLabelDescriptor
instance can be customized in the style sheet.
The pseudo-classes of IlvLabelLayoutRenderer
are "labelLayout" and "labelLayout_n"
where n
is an index of a child of a IlvSDMCompositeNode
.
Here is an example:
node { class : "ilog.views.sdm.graphic.IlvSDMCompositeNode"; children[0] : @+base; LinkConnectionRectangle : "0"; // Connect links to the base. } node[label] { children[1] : @+label; constraints[1] : @=attachmentLabel; } node:labelLayout { preferredDirection : Bottom; } node:labelLayout_1 { preferredDistFromPath : 20; preferredDirection : Top; maxDistFromPath : 30; } Subobject#base:init { class : "ilog.views.graphic.IlvRectangle(definitionRect)"; definitionRect : '@|rect(0,0,@width,@height)'; fillOn : true; background : #BABABA; } Subobject#base { foreground : black; } Subobject#base:selected { foreground : red; } Subobject#attachmentLabel { class : "ilog.views.graphic.composite.layout.IlvAttachmentConstraint" ; hotSpot : TopCenter; anchor : BottomCenter; offset : 0,3; } Subobject#label { class : ilog.views.sdm.graphic.IlvGraphicFactories$ZoomableLabel; IlvRect : 0,0,100,100; label : @label; foreground : black; name : "label"; }
The following rendering property is handled directly by the renderer:
LabelLayoutIgnored
- If this property is set to true
,
the object will be completely ignored by the label layout.
CSS example:
LabelLayout {
alias : "<value>";
debug : "false";
enabled : "false";
layoutOfGeneralLinkLabelsEnabled : "false";
layoutOfGeneralNodeLabelsEnabled : "false";
layoutOfLinkLabelsEnabled : "false";
layoutOfNodeLabelsEnabled : "false";
layoutOfNonTextLabelsEnabled : "false";
parameter : "<value>";
performingLayoutOnZoom : "false";
}
Modifier and Type | Property and Description |
---|---|
java.lang.String |
alias
Sets the alias of this renderer. |
boolean |
debug
Enables tracing when the label layout renderer runs. |
boolean |
enabled
Enable or disables the label layout algorithm. |
boolean |
layoutOfGeneralLinkLabelsEnabled
Deprecated.
Since JViews 6.0, use
layoutOfLinkLabelsEnabled . |
boolean |
layoutOfGeneralNodeLabelsEnabled
Deprecated.
Since JViews 6.0, use
layoutOfNodeLabelsEnabled . |
boolean |
layoutOfLinkLabelsEnabled
Enables or disables the layout of labels attached to the IlvGeneralLink objects
or to the IlvSDMCompositeLink objects of the graph. |
boolean |
layoutOfNodeLabelsEnabled
Enables or disables the layout of labels attached to the IlvGeneralNode objects
or to IlvSDMCompositeNode objects of the graph. |
boolean |
layoutOfNonTextLabelsEnabled
Enables or disables whether the layout considers the non-textual children of IlvSDMCompositeNode and
IlvSDMCompositeLink objects
as labels. |
java.lang.String |
parameter
This method gives access to a privileged parameter of the renderer, and allows this parameter to be specified quickly in the main option rule of the style sheet. |
boolean |
performingLayoutOnZoom
Specifies whether the layout algorithm should be applied every time the transformer of the reference view changes, or only when the data is initially rendered. |
public java.lang.String alias
SubGraph
or GraphLayout
.
alias : "<value>";
public boolean debug
debug : "false";
public boolean enabled
enabled : "false";
public boolean layoutOfGeneralLinkLabelsEnabled
layoutOfLinkLabelsEnabled
.IlvGeneralLink
objects
of the graph.
By default, the layout of general link labels is enabled.
CSS example:
layoutOfGeneralLinkLabelsEnabled : "false";
public boolean layoutOfGeneralNodeLabelsEnabled
layoutOfNodeLabelsEnabled
.IlvGeneralNode
objects
of the graph.
By default, the layout of general node labels is enabled.
CSS example:
layoutOfGeneralNodeLabelsEnabled : "false";
public boolean layoutOfLinkLabelsEnabled
IlvGeneralLink
objects
or to the IlvSDMCompositeLink
objects of the graph.
By default, the layout of general link labels is enabled.
CSS example:
layoutOfLinkLabelsEnabled : "false";
public boolean layoutOfNodeLabelsEnabled
IlvGeneralNode
objects
or to IlvSDMCompositeNode
objects of the graph.
layoutOfNodeLabelsEnabled : "false";
public boolean layoutOfNonTextLabelsEnabled
IlvSDMCompositeNode
and
IlvSDMCompositeLink
objects
as labels.
Textual children are children of one of the following types:
ilog.views.graphic.IlvText
ilog.views.graphic.IlvLabel
ilog.views.graphic.IlvZoomableLabel
If this option is enabled, you can specify via CSS for each individual child (except for the base child) whether it should be considered as a label or an obstacle. If the option is enabled, this works for textual and for non-textual children. If the option is disabled, all non-textual children are considered obstacles. You can only choose for the textual children of the types mentioned above whether they are considered as labels or obstacles.
In the following example of CSS specification, the child with index
1
is treated as a label even though it is not a textual
child. The child with index 2
is treated as obstacle even
though it is a textual child:
LabelLayout { enabled : "true" ; layoutOfNonTextLabelsEnabled: "true"; } node:labelLayout_1 { preferredDirection: "Top"; treatAs: "LABEL"; } node:labelLayout_2 { treatAs: "OBSTACLE"; }CSS example:
layoutOfNonTextLabelsEnabled : "false";
layoutOfLinkLabelsEnabled
public java.lang.String parameter
For example, the main parameter of the
ilog.views.sdm.renderer.maps.IlvMapRenderer
is the name
of the map file. You can specify that you want to display a
map of the USA by the single declaration:
SDM { Map : "usa.ivl"; }
The default implementation does nothing. Subclasses should
override this method to give access to their main parameter.
CSS example:
parameter : "<value>";
public boolean performingLayoutOnZoom
performingLayoutOnZoom : "false";
© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.