public class IlvAnnealingPolylineLabelDescriptor extends IlvAnnealingLabelDescriptor
IlvAnnealingPolylineLabelDescriptor
can be used
to specify that the label should be placed close to a polyline (the
polyline labeling problem). A typical application is to place
labels of roads on a map. The roads can be represented by polylines.
The labels should be close to the related roads, but they should not
overlap each other and should not overlap any road.
The following are two sample drawings that show link/line labeling with polyline label descriptors. In the left drawing, the "Start Label", "End Label" and "Center Label" were anchored at the start, end, center, respectively, of the corresponding link. The right drawing shows a link with multiple labels that have the right side in local side association specified as allowed side.
ilvAnnealingPolylineLabelDescriptor {
class : "ilog.views.graphlayout.labellayout.annealing.IlvAnnealingPolylineLabelDescriptor";
allowedSide : "2";
bottomOverlap : "3.0";
leftOverlap : "3.0";
lineWidth : "3.0";
maxDistFromPath : "3.0";
maxPercentageFromStart : "3.0";
minPercentageFromStart : "3.0";
preferredDistFromPath : "3.0";
preferredPercentageFromStart : "3.0";
preferredSide : "2";
rightOverlap : "3.0";
sideAssociation : "2";
topOverlap : "3.0";
treatAs : "2";
}
Modifier and Type | Property and Description |
---|---|
int |
allowedSide
Sets the allowed side where the label is placed. |
double |
bottomOverlap
Sets the amount the label can overlap the related obstacle or reference polyline at the bottom side of the label. |
java.lang.String |
class
Default constructor. |
double |
leftOverlap
Sets the amount the label can overlap the related obstacle or reference polyline at the left side of the label. |
double |
lineWidth
Sets the line width of the polyline given by the reference points. |
double |
maxDistFromPath
Sets the maximum distance from the location on the path. |
double |
maxPercentageFromStart
Sets the percentage relative to the length of the polyline that defines the end point of the area of the polyline that should be used for the label. |
double |
minPercentageFromStart
Sets the percentage relative to the length of the polyline that defines the start point of the area of the polyline that should be used for the label. |
double |
preferredDistFromPath
Sets the preferred distance from the location on the path. |
double |
preferredPercentageFromStart
Sets the percentage relative to the length of the polyline that defines the preferred position for the label. |
int |
preferredSide
Sets the preferred side where the label is placed. |
double |
rightOverlap
Sets the amount the label can overlap the related obstacle or reference polyline at the right side of the label. |
int |
sideAssociation
Sets the side association of the label. |
double |
topOverlap
Sets the amount the label can overlap the related obstacle or reference polyline at the top side of the label. |
int |
treatAs
Sets how the label should be treated by the IlvLabelLayoutRenderer of the IlvSDMEngine . |
public java.lang.String class
class : "ilog.views.graphlayout.labellayout.annealing.IlvAnnealingPolylineLabelDescriptor";
public int allowedSide
LOCAL
, the following options can be used to specify the
allowed side:
IlvDirection.Left
- left side in polyline
flow direction.IlvDirection.Right
- right side in polyline
flow direction.0
- both sides.GLOBAL
, the following options
can be used to specify the allowed side:
IlvDirection.Left
- left side.IlvDirection.Right
- right side.IlvDirection.Top
- top side.IlvDirection.Bottom
- bottom side.IlvDirection.TopLeft
- top side or left
side.IlvDirection.TopRight
- top side or right
side.IlvDirection.BottomLeft
- bottom side or left
side.IlvDirection.BottomRight
- bottom side or
right side.0
- all sides.0
.
Normally the allowed side specification is strictly obeyed. In side
association GLOBAL
, it may happen that the allowed side
specification is impossible. For instance, a strictly horizontal line
has a top and a bottom side, but is not considered to have a left and
right side. Therefore, to allow only the left or right side of
this line cannot be obeyed.
allowedSide : "2";
public double bottomOverlap
The default value is 0
.
bottomOverlap : "3.0";
public double leftOverlap
The default value is 0
.
leftOverlap : "3.0";
public double lineWidth
-1
, the line width of the
related obstacle is used.
lineWidth : "3.0";
public double maxDistFromPath
The default value is 0
.
maxDistFromPath : "3.0";
public double maxPercentageFromStart
The default value is 100
.
maxPercentageFromStart : "3.0";
public double minPercentageFromStart
The default value is 0
.
minPercentageFromStart : "3.0";
public double preferredDistFromPath
The default value is 0
.
preferredDistFromPath : "3.0";
public double preferredPercentageFromStart
The default value is 50
.
preferredPercentageFromStart : "3.0";
public int preferredSide
LOCAL
, the following options can be used to specify the
preferred side:
IlvDirection.Left
- left side in polyline
flow direction.IlvDirection.Right
- right side in polyline
flow direction.GLOBAL
, the following options
can be used to specify the preferred side:
IlvDirection.Left
- left side.IlvDirection.Right
- right side.IlvDirection.Top
- top side.IlvDirection.Bottom
- bottom side.IlvDirection.TopLeft
- top side or left
side.IlvDirection.TopRight
- top side or right
side.IlvDirection.BottomLeft
- bottom side or left
side.IlvDirection.BottomRight
- bottom side or
right side.IlvDirection.Left
.
The preferred side is only a recommendation for the layout and is not always strictly obeyed. In particular, if multiple labels are placed at the same related obstacle, only the first few labels can be placed at the preferred side of the obstacle.
preferredSide : "2";
public double rightOverlap
The default value is 0
.
rightOverlap : "3.0";
public int sideAssociation
#LOCAL
#GLOBAL
#LOCAL
.
sideAssociation : "2";
public double topOverlap
The default value is 0
.
topOverlap : "3.0";
public int treatAs
IlvLabelLayoutRenderer
of the IlvSDMEngine
.
This method is internally used. You should not call this method.
treatAs : "2";
© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.