Package | com.yworks.yfiles.layout |
Interface | public interface NodeLabelLayout extends LabelLayout |
Implementors | DefaultNodeLabelLayout, NodeLabelLayoutImpl |
Note: if you update the model parameter with modelParameter you should also update the corresponding oriented box (orientedBox) to avoid inconsistency:
// 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, nodeLayout); // calculate the label box for the model parameter. Note that it may differ from newLabelBox! OrientedRectangle labelPlacement = labelLayout.getLabelModel().getLabelPlacement(newLabelBox.getSize(), nodeLayout, param); // update the oriented box labelLayout.getOrientedBox().adoptValues(labelPlacement);
See also
Property | Defined By | ||
---|---|---|---|
box : YRectangle [read-only]
Returns the bounding box of the label
| LabelLayout | ||
labelModel : NodeLabelModel [read-only]
Returns the node label model associated with this label layout
| NodeLabelLayout | ||
modelParameter : Object
Specifies the label model parameter that describes the position of this label. | LabelLayout | ||
orientedBox : YOrientedRectangle [read-only]
Returns the box of the label
| LabelLayout |
labelModel | property |
labelModel:NodeLabelModel
[read-only] Returns the node label model associated with this label layout
public function get labelModel():NodeLabelModel