|
||||||||||
| 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.IlvOverlappingLabelMovementPolicy
public class IlvOverlappingLabelMovementPolicy
A label movement policy that allows a label to be moved by the label layout algorithm only if the label initially overlaps other labels or obstacles. Labels that are initially overlap-free are prohibited to move. The parameters of the policy allow to tailor whether small overlaps play a role, and whether the offsets specified for the annealing label layout are considered when checking for overlaps. Notice that this label movement policy works only for the annealing label layout.
IlvAnnealingLabelLayout.setLabelMovementPolicy(ilog.views.graphlayout.labellayout.IlvLabelMovementPolicy)| Constructor Summary | |
|---|---|
IlvOverlappingLabelMovementPolicy()
Creates a new label movement policy that prohibits the movement of labels that are overlap-free. |
|
IlvOverlappingLabelMovementPolicy(double maxOverlapValue,
boolean checkOverlapWithLabels,
boolean considerOffsets)
Creates a new label movement policy that prohibits the movement of labels that are nearly overlap-free. |
|
| Method Summary | |
|---|---|
boolean |
allowMove(IlvLabelingModel labelingModel,
Object label)
Allows or prohibits the movement of a label. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public IlvOverlappingLabelMovementPolicy()
public IlvOverlappingLabelMovementPolicy(double maxOverlapValue,
boolean checkOverlapWithLabels,
boolean considerOffsets)
0 if you want
only overlapping labels to move.
The decision whether a label is allowed to move depends on the overlaps
with obstacles. If the parameter checkOverlapWithLabels
is true, it also depends on the overlaps with other labels.
If the parameter is false, overlaps between label pairs
are ignored. In this case, labels that only overlap other labels will be
prohibited to move.
The policy can consider or ignore the label and obstacle offset parameters of the layout algorithm. If the offsets are considered, the overlap value is calculated by using the label and obstacle offset parameters. This means that a label gets also a high overlap value and hence is allowed to move if it is too close to another obstacle or label while not yet really overlapping it. If the offsets are ignored, a label gets only a nonzero overlap value if it really overlaps another obstacle or label, therefore labels that are closer than the specified offsets to obstacles or other labels but don't overlap anything are prohibited to move.
Notice that this label movement policy works only for the annealing label layout.
maxOverlapValue - The maximal overlap value so that a label
is prohibited to move.checkOverlapWithLabels - If true, the overlap value
is calculated including overlaps between label pairs.
If false, the overlap value is calculated excluding
overlaps between label pairs.considerOffsets - If true, the label and obstacle offset
parameters of the layout algorithm are considered, otherwise
they are ignored in the decision whether it is allowed to
move a label.| Method Detail |
|---|
public boolean allowMove(IlvLabelingModel labelingModel,
Object label)
label.
allowMove in interface IlvLabelMovementPolicylabelingModel - The labeling model to which the label belongs.label - The label.
true if it is allowed to move the label,
and false otherwise.
|
||||||||||
| PREV CLASS Documentation homepage NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||