Search this API

y.layout
Class FreeNodeLabelModel.ModelParameter

java.lang.Object
  extended by y.layout.FreeNodeLabelModel.ModelParameter
Enclosing class:
FreeNodeLabelModel

public static class FreeNodeLabelModel.ModelParameter
extends java.lang.Object

The model parameter that encodes a label position within FreeNodeLabelModel. It represents every possible location in relation to the node. The point describes the offset of the label's center to the upper-left corner of the node.

See Also:
setPoint(double, double)
 

Constructor Summary
FreeNodeLabelModel.ModelParameter()
          Creates a new instance of FreeNodeLabelModel.ModelParameter.
FreeNodeLabelModel.ModelParameter(double dx, double dy)
          Creates a new instance of FreeNodeLabelModel.ModelParameter with the given offset.
 
Method Summary
 YPoint getPoint()
          Returns the offset of the label's center to the upper-left corner of the node.
 void setPoint(double dx, double dy)
          Specifies the offset of the label's center to the upper-left corner of the node.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FreeNodeLabelModel.ModelParameter

public FreeNodeLabelModel.ModelParameter()
Creates a new instance of FreeNodeLabelModel.ModelParameter. It has no offset, i.e., the upper-left corners of both node label and node are at the same location.


FreeNodeLabelModel.ModelParameter

public FreeNodeLabelModel.ModelParameter(double dx,
                                         double dy)
Creates a new instance of FreeNodeLabelModel.ModelParameter with the given offset.

Parameters:
dx - the horizontal offset
dy - the vertical offset
Method Detail

getPoint

public YPoint getPoint()
Returns the offset of the label's center to the upper-left corner of the node.

Returns:
the offset

setPoint

public void setPoint(double dx,
                     double dy)
Specifies the offset of the label's center to the upper-left corner of the node.

Parameters:
dx - the horizontal offset
dy - the vertical offset

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