Search this API

Interface NodeLabelLayout

All Superinterfaces:
All Known Implementing Classes:
DefaultNodeLabelLayout, NodeLabel, NodeLabelLayoutImpl

public interface NodeLabelLayout
extends LabelLayout

NodeLabelLayout defines the properties of one node 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, 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


Method Summary
 NodeLabelModel getLabelModel()
          Returns the label model that describes the valid locations for this label.
Methods inherited from interface y.layout.LabelLayout
getBox, getModelParameter, getOrientedBox, setModelParameter

Method Detail


NodeLabelModel getLabelModel()
Returns the label model that describes the valid locations for this label.

the NodeLabelModel associated with this NodeLabelLayout

© Copyright 2000-2021,
yWorks GmbH.
All rights reserved.