|
Search this API | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface EdgeLabelLayout
EdgeLabelLayout defines the properties of one edge label from the perspective of a labeling algorithm.
Note: To avoid inconsistencies, changing the model parameter should always be
combined with updating the corresponding oriented box.
// label box for which we set the model parameter OrientedRectangle newLabelBox = ... // calculate the model parameter for the label box Object param = labelLayout.getLabelModel().createModelParameter(newLabelBox, edgeLayout, sourceLayout, targetLayout); // calculate the label box for the model parameter. Note that it may differ from newLabelBox! OrientedRectangle labelPlacement = labelLayout.getLabelModel().getLabelPlacement(newLabelBox.getSize(), edgeLayout, sourceLayout, targetLayout, param); // update the oriented box labelLayout.getOrientedBox().adoptValues(labelPlacement);
![]() |
![]() |
| Field Summary |
|---|
| Fields inherited from interface y.layout.LabelLayoutConstants |
|---|
PLACE_ANYWHERE, PLACE_AT_CENTER, PLACE_AT_SOURCE, PLACE_AT_SOURCE_PORT, PLACE_AT_TARGET, PLACE_AT_TARGET_PORT, PLACE_LEFT_OF_EDGE, PLACE_ON_EDGE, PLACE_RIGHT_OF_EDGE, PLACEMENT_ALONG_EDGE_MASK, PLACEMENT_ON_SIDE_OF_EDGE_MASK |
| Method Summary | |
|---|---|
EdgeLabelModel |
getLabelModel()
Returns the label model that describes the valid locations for this label. |
PreferredPlacementDescriptor |
getPreferredPlacementDescriptor()
Returns the preferred placement for this edge label, which can be considered by layout algorithms. |
| Methods inherited from interface y.layout.LabelLayout |
|---|
getBox, getModelParameter, getOrientedBox, setModelParameter |
| Method Detail |
|---|
EdgeLabelModel getLabelModel()
EdgeLabelModel associated with this EdgeLabelLayoutPreferredPlacementDescriptor getPreferredPlacementDescriptor()
layout algorithms.
PreferredPlacementDescriptor for this EdgeLabelLayout
|
© Copyright 2000-2025, yWorks GmbH. All rights reserved. |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||