public static class FreeEdgeLabelLayoutModel.ModelParameter extends Object
FreeEdgeLabelLayoutModel
.
It represents every possible location in relation to the source point of the edge. The radius describes the distance of
the label center from the source point. There is an angle theta
which defines the location on the circle with
the given radius. It is the angle between the first segment of the underlying edge and the imaginary line to the center
of the label. Finally, there is a second angle that describes the rotation of the label box.
setPoint(double, double)
,
setAngle(double)
Constructor and Description |
---|
ModelParameter()
|
ModelParameter(double radius,
double theta)
Creates a new instance of
FreeEdgeLabelLayoutModel.ModelParameter with the given radius, angle and rotation angle. |
ModelParameter(double radius,
double theta,
double angle)
Creates a new instance of
FreeEdgeLabelLayoutModel.ModelParameter with the given radius, angle and rotation angle. |
Modifier and Type | Method and Description |
---|---|
double |
getAngle()
Gets the rotation angle of the label that is placed using this model parameter.
|
YPoint |
getPoint()
Gets a point that represents the location of the label's center in relation to the source point of the edge.
|
void |
setAngle(double value)
Sets the rotation angle of the label that is placed using this model parameter.
|
void |
setPoint(double radius,
double theta)
Specifies a point that represents the location of the label's center in relation to the source point of the edge.
|
String |
toString()
Returns a
String representation of this model parameter. |
public ModelParameter()
public ModelParameter(double radius, double theta)
FreeEdgeLabelLayoutModel.ModelParameter
with the given radius, angle and rotation angle.radius
- the distance of the label from the source node of the underlying edgetheta
- the angle in radians between the first segment of the underlying edge and the imaginary line to the center of the labelpublic ModelParameter(double radius, double theta, double angle)
FreeEdgeLabelLayoutModel.ModelParameter
with the given radius, angle and rotation angle.radius
- the distance of the label from the source node of the underlying edgetheta
- the angle in radians between the first segment of the underlying edge and the imaginary line to the center of the labelangle
- the rotation angle of the labelpublic double getAngle()
setAngle(double)
public YPoint getPoint()
The x-coordinate corresponds to the radius which describes the distance of the label to the source point. The y-coordinate corresponds to the angle between the first segment of the underlying edge and the imaginary line to the center of the label.
public void setAngle(double value)
value
- the rotation angle of the labelgetAngle()
public void setPoint(double radius, double theta)
The x-coordinate corresponds to the radius which describes the distance of the label to the source point. The y-coordinate corresponds to the angle between the first segment of the underlying edge and the imaginary line to the center of the label.
radius
- the distance to the source pointtheta
- the location on the radiuspublic String toString()