|
||||||||||
| PREV CLASS Documentation homepage NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectilog.views.graphlayout.labellayout.annealing.IlvAnnealingLabelDescriptor
ilog.views.graphlayout.labellayout.annealing.IlvAnnealingPolylineLabelDescriptor
public class IlvAnnealingPolylineLabelDescriptor
The class 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.
| Field Summary | |
|---|---|
static int |
CENTER
Option for the label anchor. |
static int |
END
Option for the label anchor. |
static int |
FREE
Option for the label anchor. |
static int |
GLOBAL
Option for the side association. |
static int |
LOCAL
Option for the side association. |
static int |
START
Option for the label anchor. |
| Fields inherited from class ilog.views.graphlayout.labellayout.annealing.IlvAnnealingLabelDescriptor |
|---|
actDistFromPath, actPathLocation, IGNORED, LABEL, maxDistFromPath, maxPathLocation, OBSTACLE |
| Constructor Summary | |
|---|---|
IlvAnnealingPolylineLabelDescriptor()
Creates a new empty instance of a polyline label descriptor. |
|
IlvAnnealingPolylineLabelDescriptor(IlvInputStream stream)
Creates a new IlvAnnealingPolylineLabelDescriptor from
an IlvInputStream. |
|
IlvAnnealingPolylineLabelDescriptor(Object label,
IlvLinkImage link,
int anchor)
Creates a new instance of a polyline link label descriptor. |
|
IlvAnnealingPolylineLabelDescriptor(Object label,
Object relatedObstacle,
IlvPoint[] referencePoints,
float lineWidth,
float minPercentageFromStart,
float maxPercentageFromStart,
float prefPercentageFromStart,
float maxDistFromPath,
float preferredDistFromPath,
int preferredSide,
int allowedSide,
int sideAssociation,
float topOverlap,
float bottomOverlap,
float leftOverlap,
float rightOverlap)
Creates a new instance of a polyline label descriptor. |
|
IlvAnnealingPolylineLabelDescriptor(Object label,
Object relatedObstacle,
IlvPoint[] referencePoints,
float lineWidth,
float minPercentageFromStart,
float maxPercentageFromStart,
float maxDistFromPath,
float preferredDistFromPath,
int preferredSide,
int allowedSide,
int sideAssociation,
float topOverlap,
float bottomOverlap,
float leftOverlap,
float rightOverlap)
Creates a new instance of a polyline label descriptor. |
|
IlvAnnealingPolylineLabelDescriptor(Object label,
Object relatedObstacle,
int anchor,
int preferredSide,
int allowedSide,
int sideAssociation)
Creates a new instance of a polyline label descriptor. |
|
IlvAnnealingPolylineLabelDescriptor(Object label,
Object link,
Object source,
Object target,
int anchor,
float maxDistFromLink,
float preferredDistFromLink,
int preferredSide,
int allowedSide,
int sideAssociation,
float topOverlap,
float bottomOverlap,
float leftOverlap,
float rightOverlap)
Creates a new instance of a polyline link label descriptor. |
|
| Method Summary | |
|---|---|
boolean |
considerObstacle(Object obstacle)
Returns true if the overlap between the label and the input
obstacle should be considered during the quality calculation of the
Simulated Annealing label layout algorithm. |
int |
getAllowedSide()
Returns the allowed side where the label is placed. |
int |
getAnchor()
Returns the anchor of the label. |
float |
getBottomOverlap()
Returns the amount the label can overlap the related obstacle or reference polyline at the bottom side of the label. |
IlvRect |
getBoundingBox()
|
float |
getLeftOverlap()
Returns the amount the label can overlap the related obstacle or reference polyline at the left side of the label. |
float |
getLineWidth()
Returns the specified line width of the polyline given by the reference points. |
float |
getMaxDistFromPath()
Returns the maximal distance from the location on the path. |
float |
getMaxPercentageFromStart()
Returns 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. |
protected float |
getMinDist(Object obstacle,
float minDist)
Returns the minimal distance value between this label and the input obstacle. |
float |
getMinPercentageFromStart()
Returns 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. |
Object |
getObject()
|
float |
getPreferredDistFromPath()
Returns the preferred distance from the location on the path. |
double |
getPreferredPathLocation()
Returns the preferred location on the path. |
float |
getPreferredPercentageFromStart()
Returns the percentage relative to the length of the polyline that defines the preferred position for the label. |
int |
getPreferredSide()
Returns the preferred side where the label is placed. |
IlvPoint[] |
getReferencePoints()
Returns a copy of the specified reference points that define the polyline where the label must be placed. |
Object |
getRelatedObstacle()
Returns the obstacle that is related to the label. |
Object |
getRelatedObstacleSource()
Returns the source node if the related obstacle is a link. |
Object |
getRelatedObstacleTarget()
Returns the target node if the related obstacle is a link. |
float |
getRightOverlap()
Returns the amount the label can overlap the related obstacle or reference polyline at the right side of the label. |
int |
getSideAssociation()
Returns the side association of the label. |
float |
getTopOverlap()
Returns the amount the label can overlap the related obstacle or reference polyline at the top side of the label. |
void |
initialize(IlvLabelingModel labelingModel)
Initializes the label descriptor before layout. |
void |
setAllowedSide(int side)
Sets the allowed side where the label is placed. |
void |
setAnchor(int anchor)
Sets the anchor of the label. |
void |
setBottomOverlap(float overlap)
Sets the amount the label can overlap the related obstacle or reference polyline at the bottom side of the label. |
void |
setBoundingBox(IlvRect bbox)
|
void |
setLeftOverlap(float overlap)
Sets the amount the label can overlap the related obstacle or reference polyline at the left side of the label. |
void |
setLineWidth(float lineWidth)
Sets the line width of the polyline given by the reference points. |
void |
setMaxDistFromPath(float distance)
Sets the maximal distance from the location on the path. |
void |
setMaxPercentageFromStart(float maxPercentage)
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. |
void |
setMinPercentageFromStart(float minPercentage)
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. |
void |
setPosition(double pathLocation,
float distFromPath)
Sets the label conceptually to the specified position. |
void |
setPreferredDistFromPath(float distance)
Sets the preferred distance from the location on the path. |
void |
setPreferredPercentageFromStart(float prefPercentage)
Sets the percentage relative to the length of the polyline that defines the preferred position for the label. |
void |
setPreferredSide(int side)
Sets the preferred side where the label is placed. |
void |
setReferencePoints(IlvPoint[] points)
Sets the reference points that define the polyline where the label must be placed. |
void |
setRelatedObstacle(Object obstacle)
Sets the obstacle that is related to the label. |
void |
setRelatedObstacleSource(Object source)
Sets the source node if the related obstacle is a link. |
void |
setRelatedObstacleTarget(Object target)
Sets the target node if the related obstacle is a link. |
void |
setRightOverlap(float overlap)
Sets the amount the label can overlap the related obstacle or reference polyline at the right side of the label. |
void |
setSideAssociation(int association)
Returns the side association of the label. |
void |
setTopOverlap(float overlap)
Sets the amount the label can overlap the related obstacle or reference polyline at the top side of the label. |
void |
setTowardsPreferredPosition(double pathLocation,
float distFromPath,
int i,
int maxI)
Sets the label to a position that is closer to the preferred position than the input position given by pathLocation and
distFromPath. |
void |
write(IlvOutputStream stream)
Writes the label descriptor to the output stream. |
| Methods inherited from class ilog.views.graphlayout.labellayout.annealing.IlvAnnealingLabelDescriptor |
|---|
getLabel, getRotation, getTreatAs, setTreatAs, updatePosition |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int LOCAL
Compare the polyline with a road: at any point of the road, you can determine the left and right side of the road by looking away from the start into the direction where the road continues towards the end of the road. Notice that if you have an object (e.g. a city) at the left side and the road makes a sharp bend by 180 degree, the object after the bend appear at the right side. Hence, the meaning of left and right is local to the road, not global like a compass direction.
public static final int GLOBAL
In this case, the meaning of the sides is globally defined, like the compass directions. It is independent from the flow direction of the polyline line segments. If you compare it with a map of roads, then left is towards the west direction of the map, right is towards the east direction of the map, top is towards the north direction and bottom is the towards the south direction of the map.
public static final int CENTER
public static final int START
public static final int END
public static final int FREE
| Constructor Detail |
|---|
public IlvAnnealingPolylineLabelDescriptor()
setRelatedObstacle(java.lang.Object),
setReferencePoints(ilog.views.IlvPoint[]),
setLineWidth(float),
setMinPercentageFromStart(float),
setMaxPercentageFromStart(float),
setPreferredPercentageFromStart(float),
setMaxDistFromPath(float),
setPreferredDistFromPath(float),
setPreferredSide(int),
setAllowedSide(int),
setSideAssociation(int),
setTopOverlap(float),
setBottomOverlap(float),
setLeftOverlap(float),
setRightOverlap(float),
IlvAnnealingLabelLayout.setLabelDescriptor(java.lang.Object, ilog.views.graphlayout.labellayout.annealing.IlvAnnealingLabelDescriptor)
public IlvAnnealingPolylineLabelDescriptor(Object label,
Object relatedObstacle,
int anchor,
int preferredSide,
int allowedSide,
int sideAssociation)
The label is anchored at the polyline obstacle. Valid options for the anchor are:
CENTER - The label is placed near the center of the polyline.
START - The label is placed closer to the start point of the
polyline.
END - The label is placed closer to the end point of the
polyline.
FREE - The label is placed anywhere at the polyline.
The label is placed at the allowed side of the polyline. Furthermore, the layout takes as hint the distance and side where the label should be preferably placed.
The meaning of the parameters allowedSide and
preferredSide depends on the side association.
Valid options for the side association are:
LOCAL - sides are specified local to the flow direction
of the polyline.
GLOBAL - sides are specified relative to the global
coordinates.
LOCAL, the following options
can be used to specify the allowed and preferred sides:
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 allowed and preferred sides:
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.
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.
label - The label.relatedObstacle - The obstacle that is related to the label.
The points of the polyline are retrieved from the related
obstacle. It must be a polyline obstacle in the labeling
model.anchor - The anchor of the label.preferredSide - The preferred side where the label should be placed.allowedSide - The sides that are allowed for the label, or 0, if all
sides are allowed.sideAssociation - The association for the preferred and allowed side.IlvAnnealingLabelLayout.setLabelDescriptor(java.lang.Object, ilog.views.graphlayout.labellayout.annealing.IlvAnnealingLabelDescriptor),
IlvLabelingModel.isPolylineObstacle(java.lang.Object),
LOCAL,
GLOBAL
public IlvAnnealingPolylineLabelDescriptor(Object label,
IlvLinkImage link,
int anchor)
The label is anchored at the polyline link. Valid options for the anchor are:
CENTER - The label is placed near the center of the link.
START - The label is placed closer to the source of the
link.
END - The label is placed closer to the destination of the
link.
FREE - The label is placed anywhere at the link.
label - The label.link - The link. It must be a polyline obstacle in the labeling
model.anchor - The anchor of the label.IlvAnnealingLabelLayout.setLabelDescriptor(java.lang.Object, ilog.views.graphlayout.labellayout.annealing.IlvAnnealingLabelDescriptor),
IlvLabelingModel.isPolylineObstacle(java.lang.Object),
IlvLabelingModel.isObstacle(java.lang.Object),
IlvLinkImage,
IlvDefaultLabelingModel
public IlvAnnealingPolylineLabelDescriptor(Object label,
Object link,
Object source,
Object target,
int anchor,
float maxDistFromLink,
float preferredDistFromLink,
int preferredSide,
int allowedSide,
int sideAssociation,
float topOverlap,
float bottomOverlap,
float leftOverlap,
float rightOverlap)
The label is anchored at the polyline link. Valid options for the anchor are:
CENTER - The label is placed near the center of the link.
START - The label is placed closer to the source of the
link.
END - The label is placed closer to the destination of the
link.
FREE - The label is placed anywhere at the link.
The label is placed at the allowed side of the link. Furthermore, the layout takes as hint the distance and side where the label should be preferably placed.
The meaning of the parameters allowedSide and
preferredSide depends on the side association.
Valid options for the side association are:
LOCAL - sides are specified local to the flow direction
of the link.
GLOBAL - sides are specified relative to the global
coordinates.
LOCAL, the following options
can be used to specify the allowed and preferred sides:
IlvDirection.Left - left side in link flow.
IlvDirection.Right - right side in link flow.
GLOBAL, the following options
can be used to specify the allowed and preferred sides:
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.
GLOBAL, it may happen that the allowed
side specification is impossible. For instance, a strictly horizontal
link has a top and a bottom side, but no left and right side (because
at the left and right side are the end nodes of the link, where the label
should not be placed).
Therefore, to allow only the left or right side of this link cannot be
obeyed.
label - The label.link - The link. It must be a polyline obstacle in the labeling
model.source - The source node. It must be an obstacle in the labeling
model.target - The target node. It must be an obstacle in the labeling
model.anchor - The anchor of the label.maxDistFromLink - The maximal distance the label is allowed to be
placed away from the link.preferredDistFromLink - The preferred distance the label is
placed away from the link.preferredSide - The preferred side where the label should be placed.allowedSide - The sides that are allowed for the label, or 0, if all
sides are allowed.sideAssociation - The association for the preferred and allowed side.topOverlap - The amount the label can overlap the link
at the top side of the label.bottomOverlap - The amount the label can overlap the link
at the bottom side of the label.leftOverlap - The amount the label can overlap the link
at the left side of the label.rightOverlap - The amount the label can overlap the link
at the right side of the label.IlvAnnealingLabelLayout.setLabelDescriptor(java.lang.Object, ilog.views.graphlayout.labellayout.annealing.IlvAnnealingLabelDescriptor),
IlvLabelingModel.isPolylineObstacle(java.lang.Object),
IlvLabelingModel.isObstacle(java.lang.Object),
LOCAL,
GLOBAL
public IlvAnnealingPolylineLabelDescriptor(Object label,
Object relatedObstacle,
IlvPoint[] referencePoints,
float lineWidth,
float minPercentageFromStart,
float maxPercentageFromStart,
float maxDistFromPath,
float preferredDistFromPath,
int preferredSide,
int allowedSide,
int sideAssociation,
float topOverlap,
float bottomOverlap,
float leftOverlap,
float rightOverlap)
public IlvAnnealingPolylineLabelDescriptor(Object label,
Object relatedObstacle,
IlvPoint[] referencePoints,
float lineWidth,
float minPercentageFromStart,
float maxPercentageFromStart,
float prefPercentageFromStart,
float maxDistFromPath,
float preferredDistFromPath,
int preferredSide,
int allowedSide,
int sideAssociation,
float topOverlap,
float bottomOverlap,
float leftOverlap,
float rightOverlap)
It is possible to specify that only a partial area of the polyline
should be used. This is done by specifying the start and end points of
the area along the polyline by using the minimal and maximal
percentage of the polyline length that should be used. If the entire
polyline should be used, specify the minimal percentage 0 and the maximal
percentage 100. If the label should be placed in the first third of the
area close to the start point, set minPercentageFromStart to
0 and maxPercentageFromStart to 33.3.
If the label should be placed in the last third of the area close to the
end point, set minPercentageFromStart to 66.6 and
maxPercentageFromStart to 100.
If the label should be placed close to the middle of the polyline,
set minPercentageFromStart to 33.3 and
maxPercentageFromStart to 66.6.
Additionally, you can specify a preference. For instance, if you set
prefPercentageFromStart to 50, then the label will
be placed near the middle of the polyline whenever possible.
Normally the minimal and maximal percentages are strictly obeyed, while
the preferred percentage is only a recommendation for the layout
algorithm. The preferred percentage must be between the minimal and the
maximal percentage.
The label is placed no farther than maxDistFromPath away
from the path. It is placed at the allowed side.
Furthermore, the layout takes as a hint the distance and side where the
label preferably should be placed. A label may partially overlap the
related obstacle according to the specified overlap value.
The meaning of the parameters allowedSide and
preferredSide depends on the side association.
Valid options for the side association are:
LOCAL - Sides are specified local to the flow direction
of the polyline.
GLOBAL - Sides are specified relative to the global
coordinates.
LOCAL, the following options
can be used to specify the allowed and preferred sides:
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 allowed and preferred sides:
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.
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.
label - The label.relatedObstacle - The obstacle that is related to the label,
for example,
when labeling roads of a geographic map, the related obstacle
should be the object representing the road that has this
label. The algorithm does not count overlaps between the
label and its related obstacle. If the layout algorithm
should count all overlaps to all labels, the related obstacle
should be null.referencePoints - The points that define the polyline the label
should be close to. If no reference points are given, the
points are retrieved from the related obstacle. In this
case, the related obstacle must be a polyline obstacle in
the labeling model.lineWidth - The line width of the polyline. If -1 is
given, the line width is retrieved from the related
obstacle. In this case, the related obstacle must be
a polyline obstacle in the labeling model.minPercentageFromStart - The start point of the area of the polyline
that should be used, expressed as a percentage value relative
to the length of the polyline.maxPercentageFromStart - The end point of the area of the polyline
that should be used, expressed as a percentage value relative
to the length of the polyline.prefPercentageFromStart - The preferred position of the label,
expressed as a percentage value relative to the length of the
polyline.maxDistFromPath - The maximal distance the label is allowed to be
placed away from the path.preferredDistFromPath - The preferred distance the label is
placed away from the path.preferredSide - The preferred side where the label should be placed.allowedSide - The sides that are allowed for the label, or 0 if all
sides are allowed.sideAssociation - The association for the preferred and allowed sides.topOverlap - The amount the label can overlap the related obstacle
at the top side of the label.bottomOverlap - The amount the label can overlap the related obstacle
at the bottom side of the label.leftOverlap - The amount the label can overlap the related obstacle
at the left side of the label.rightOverlap - The amount the label can overlap the related obstacle
at the right side of the label.IlvAnnealingLabelLayout.setLabelDescriptor(java.lang.Object, ilog.views.graphlayout.labellayout.annealing.IlvAnnealingLabelDescriptor),
IlvLabelingModel.isPolylineObstacle(java.lang.Object),
LOCAL,
GLOBAL
public IlvAnnealingPolylineLabelDescriptor(IlvInputStream stream)
throws IOException,
IlvReadFileException
IlvAnnealingPolylineLabelDescriptor from
an IlvInputStream.
stream - The input stream from which the descriptor must be read.
IlvReadFileException - if an error occurs while reading.
IOException| Method Detail |
|---|
public void initialize(IlvLabelingModel labelingModel)
initialize in class IlvAnnealingLabelDescriptorlabelingModel - The labeling model attached to the layout algorithm.
public void setPosition(double pathLocation,
float distFromPath)
For experts:
This method does not really move the label in the labeling model, but
updates internal data structures that allow to test easily what would
happen if the label would be at the input position. The real move of the
label via IlvLabelingModel.moveLabel(java.lang.Object, float, float, boolean) is delayed until the end
of all tests.
setPosition in class IlvAnnealingLabelDescriptorpathLocation - The location on the path.distFromPath - The distance from the location on the path.IlvAnnealingLabelDescriptor.updatePosition(float, float)
public void setTowardsPreferredPosition(double pathLocation,
float distFromPath,
int i,
int maxI)
pathLocation and
distFromPath.
You should not call this directly. The layout algorithm calls this method iteratively to test various positions that are closer to the preferred position.
setTowardsPreferredPosition in class IlvAnnealingLabelDescriptorpathLocation - The current location on the path.distFromPath - The current distance from the location on the pathi - The number of the iteration step, from 0 to maxI - 1.maxI - The maximal number of iteration steps.setPosition(double, float),
getPreferredPathLocation(),
getPreferredDistFromPath()public double getPreferredPathLocation()
getPreferredPathLocation in class IlvAnnealingLabelDescriptorpublic boolean considerObstacle(Object obstacle)
true if the overlap between the label and the input
obstacle should be considered during the quality calculation of the
Simulated Annealing label layout algorithm.
In fact, it returns false if the input obstacle is the
related obstacle.
considerObstacle in class IlvAnnealingLabelDescriptorobstacle - The obstacle to test.
true if there is a penalty if the label overlaps the
obstacle, and false, if there is no penalty.
protected float getMinDist(Object obstacle,
float minDist)
getMinDist in class IlvAnnealingLabelDescriptorpublic void setRelatedObstacle(Object obstacle)
If you use this method to change a descriptor that is currently installed
for a label, you should reinstall it by calling
IlvAnnealingLabelLayout.setLabelDescriptor(java.lang.Object, ilog.views.graphlayout.labellayout.annealing.IlvAnnealingLabelDescriptor) again
to make the change active.
obstacle - The obstacle.getRelatedObstacle(),
setReferencePoints(ilog.views.IlvPoint[])public final Object getRelatedObstacle()
null if only an array of reference points was
specified.
getRelatedObstacle in class IlvAnnealingLabelDescriptorsetRelatedObstacle(java.lang.Object)public void setRelatedObstacleSource(Object source)
If you use this method to change a descriptor that is currently installed
for a label, you should reinstall it by calling
IlvAnnealingLabelLayout.setLabelDescriptor(java.lang.Object, ilog.views.graphlayout.labellayout.annealing.IlvAnnealingLabelDescriptor) again
to make the change active.
source - The source node to set.getRelatedObstacleSource()public final Object getRelatedObstacleSource()
setRelatedObstacleSource(java.lang.Object)public void setRelatedObstacleTarget(Object target)
If you use this method to change a descriptor that is currently installed
for a label, you should reinstall it by calling
IlvAnnealingLabelLayout.setLabelDescriptor(java.lang.Object, ilog.views.graphlayout.labellayout.annealing.IlvAnnealingLabelDescriptor) again
to make the change active.
target - The target node to set.getRelatedObstacleTarget()public final Object getRelatedObstacleTarget()
setRelatedObstacleTarget(java.lang.Object)public void setReferencePoints(IlvPoint[] points)
null, the shape of
the related obstacle defines the where the label must be placed.
Note that a copy of the input point array is stored. The original
input point array can be reused afterwards.
If you use this method to change a descriptor that is currently installed
for a label, you should reinstall it by calling
IlvAnnealingLabelLayout.setLabelDescriptor(java.lang.Object, ilog.views.graphlayout.labellayout.annealing.IlvAnnealingLabelDescriptor) again
to make the change active.
points - The reference points defining the polyline, or
null to use the label's related obstacle.getReferencePoints(),
setRelatedObstacle(java.lang.Object)public final IlvPoint[] getReferencePoints()
null if no reference points were specified.
setReferencePoints(ilog.views.IlvPoint[])public void setLineWidth(float lineWidth)
-1, the line width of
the related obstacle is used.
If you use this method to change a descriptor that is currently installed
for a label, you should reinstall it by calling
IlvAnnealingLabelLayout.setLabelDescriptor(java.lang.Object, ilog.views.graphlayout.labellayout.annealing.IlvAnnealingLabelDescriptor) again
to make the change active.
lineWidth - The line width of the polyline, or -1 for
the line width of the associated obstacle.getLineWidth()public final float getLineWidth()
setLineWidth(float)public void setAnchor(int anchor)
CENTER - The label is placed near the center of the polyline.
START - The label is placed closer to the start point of the
polyline.
END - The label is placed closer to the end point of the
polyline.
FREE - The label is placed anywhere at the polyline.
If you use this method to change a descriptor that is currently installed
for a label, you should reinstall it by calling
IlvAnnealingLabelLayout.setLabelDescriptor(java.lang.Object, ilog.views.graphlayout.labellayout.annealing.IlvAnnealingLabelDescriptor) again
to make the change active.
anchor - The anchor of the label.getAnchor(),
setMinPercentageFromStart(float),
setMaxPercentageFromStart(float),
setPreferredPercentageFromStart(float)public final int getAnchor()
setAnchor(int),
getMinPercentageFromStart(),
getMaxPercentageFromStart(),
getPreferredPercentageFromStart()public void setMinPercentageFromStart(float minPercentage)
If you use this method to change a descriptor that is currently installed
for a label, you should reinstall it by calling
IlvAnnealingLabelLayout.setLabelDescriptor(java.lang.Object, ilog.views.graphlayout.labellayout.annealing.IlvAnnealingLabelDescriptor) again
to make the change active.
minPercentage - The start point of the label area, expressed as a
percentage relative to the length of the polyline.getMinPercentageFromStart()public final float getMinPercentageFromStart()
setMinPercentageFromStart(float)public void setMaxPercentageFromStart(float maxPercentage)
If you use this method to change a descriptor that is currently installed
for a label, you should reinstall it by calling
IlvAnnealingLabelLayout.setLabelDescriptor(java.lang.Object, ilog.views.graphlayout.labellayout.annealing.IlvAnnealingLabelDescriptor) again
to make the change active.
maxPercentage - The end point of the label area, expressed as a
percentage relative to the length of the polyline.getMaxPercentageFromStart()public final float getMaxPercentageFromStart()
setMaxPercentageFromStart(float)public void setPreferredPercentageFromStart(float prefPercentage)
If you use this method to change a descriptor that is currently installed
for a label, you should reinstall it by calling
IlvAnnealingLabelLayout.setLabelDescriptor(java.lang.Object, ilog.views.graphlayout.labellayout.annealing.IlvAnnealingLabelDescriptor) again
to make the change active.
prefPercentage - The preferred position for the label, which must be
a value between the minimal and maximal percentages.getPreferredPercentageFromStart(),
setMinPercentageFromStart(float),
setMaxPercentageFromStart(float)public final float getPreferredPercentageFromStart()
setPreferredPercentageFromStart(float)public void setTopOverlap(float overlap)
If you use this method to change a descriptor that is currently installed
for a label, you should reinstall it by calling
IlvAnnealingLabelLayout.setLabelDescriptor(java.lang.Object, ilog.views.graphlayout.labellayout.annealing.IlvAnnealingLabelDescriptor) again
to make the change active.
overlap - The allowable amount of overlap at the top side of the
label.getTopOverlap()public final float getTopOverlap()
setTopOverlap(float)public void setBottomOverlap(float overlap)
If you use this method to change a descriptor that is currently installed
for a label, you should reinstall it by calling
IlvAnnealingLabelLayout.setLabelDescriptor(java.lang.Object, ilog.views.graphlayout.labellayout.annealing.IlvAnnealingLabelDescriptor) again
to make the change active.
overlap - The allowable amount of overlap at the bottom side of the
label.getBottomOverlap()public final float getBottomOverlap()
setBottomOverlap(float)public void setLeftOverlap(float overlap)
If you use this method to change a descriptor that is currently installed
for a label, you should reinstall it by calling
IlvAnnealingLabelLayout.setLabelDescriptor(java.lang.Object, ilog.views.graphlayout.labellayout.annealing.IlvAnnealingLabelDescriptor) again
to make the change active.
overlap - The allowable amount of overlap at the left side of the
label.getLeftOverlap()public final float getLeftOverlap()
setLeftOverlap(float)public void setRightOverlap(float overlap)
If you use this method to change a descriptor that is currently installed
for a label, you should reinstall it by calling
IlvAnnealingLabelLayout.setLabelDescriptor(java.lang.Object, ilog.views.graphlayout.labellayout.annealing.IlvAnnealingLabelDescriptor) again
to make the change active.
overlap - The allowable amount of overlap at the right side of the
label.getRightOverlap()public final float getRightOverlap()
setRightOverlap(float)public void setPreferredSide(int side)
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.
If you use this method to change a descriptor that is currently installed
for a label, you should reinstall it by calling
IlvAnnealingLabelLayout.setLabelDescriptor(java.lang.Object, ilog.views.graphlayout.labellayout.annealing.IlvAnnealingLabelDescriptor) again
to make the change active.
side - The preferred side of label placement.getPreferredSide(),
setSideAssociation(int)public final int getPreferredSide()
IlvDirection.
setPreferredSide(int)public void setAllowedSide(int side)
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.
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.
If you use this method to change a descriptor that is currently installed
for a label, you should reinstall it by calling
IlvAnnealingLabelLayout.setLabelDescriptor(java.lang.Object, ilog.views.graphlayout.labellayout.annealing.IlvAnnealingLabelDescriptor) again
to make the change active.
side - The allowed side specification for label placement.getAllowedSide(),
setSideAssociation(int)public final int getAllowedSide()
IlvDirection.
setAllowedSide(int)public void setSideAssociation(int association)
IlvAnnealingLabelLayout.setLabelDescriptor(java.lang.Object, ilog.views.graphlayout.labellayout.annealing.IlvAnnealingLabelDescriptor) again
to make the change active.
association - The side association of the label.