Search this API

y.layout
Interface LabelLayout

All Known Subinterfaces:
EdgeLabelLayout, NodeLabelLayout
All Known Implementing Classes:
DefaultNodeLabelLayout, EdgeLabel, EdgeLabelLayoutImpl, LabelLayoutImpl, NodeLabel, NodeLabelLayoutImpl

public interface LabelLayout

LabelLayout defines the properties of a label from the perspective of a labeling algorithm. Both node and edge labels need to implement this interface. It describes the size and position of a label.

Note: To avoid inconsistencies, changing the model parameter should always be combined with updating the corresponding oriented box.

 
Your browser does not support SVG content.

Method Summary
 YRectangle getBox()
          Returns the bounding box of the label.
 java.lang.Object getModelParameter()
          Returns the label model parameter that describes the position of this label.
 OrientedRectangle getOrientedBox()
          Returns the box of the label.
 void setModelParameter(java.lang.Object parameter)
          Specifies the label model parameter that describes the position of this label.
 

Method Detail

getBox

YRectangle getBox()
Returns the bounding box of the label. The bounding box is the smallest, paraxial rectangle that contains the whole label.

Returns:
the bounding box of the label

getOrientedBox

OrientedRectangle getOrientedBox()
Returns the box of the label. This box matches the area that is covered by the label. The up vector of the rectangle encodes the orientation of the label.

Returns:
the oriented box of the label

getModelParameter

java.lang.Object getModelParameter()
Returns the label model parameter that describes the position of this label. The model parameter must fit the according label model.

Returns:
the label model parameter
See Also:
setModelParameter(Object)

setModelParameter

void setModelParameter(java.lang.Object parameter)
Specifies the label model parameter that describes the position of this label. The model parameter must fit the according label model.

Parameters:
parameter - the label model parameter

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