|
Search this API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object y.layout.FreeEdgeLabelModel.ModelParameter
public static class FreeEdgeLabelModel.ModelParameter
This model parameter encodes a label position within FreeEdgeLabelModel
.
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 Summary | |
---|---|
FreeEdgeLabelModel.ModelParameter()
Creates a new instance of FreeEdgeLabelModel.ModelParameter with radius 50
and angle 0 . |
|
FreeEdgeLabelModel.ModelParameter(double radius,
double theta)
Creates a new instance of FreeEdgeLabelModel.ModelParameter with the given radius and angle. |
|
FreeEdgeLabelModel.ModelParameter(double radius,
double theta,
double angle)
Creates a new instance of FreeEdgeLabelModel.ModelParameter with the given radius, angle and rotation angle. |
Method Summary | |
---|---|
double |
getAngle()
Returns the rotation angle of the label that is placed using this model parameter. |
YPoint |
getPoint()
Returns a point that represents the location of the label's center in relation to the source point of the edge. |
void |
setAngle(double angle)
Specifies 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. |
java.lang.String |
toString()
Returns a String representation of this model parameter. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public FreeEdgeLabelModel.ModelParameter()
FreeEdgeLabelModel.ModelParameter
with radius 50
and angle 0
.
public FreeEdgeLabelModel.ModelParameter(double radius, double theta)
FreeEdgeLabelModel.ModelParameter
with the given radius and 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 FreeEdgeLabelModel.ModelParameter(double radius, double theta, double angle)
FreeEdgeLabelModel.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 labelMethod Detail |
---|
public double getAngle()
setAngle(double)
public void setAngle(double angle)
angle
- the rotation angle of the labelpublic YPoint getPoint()
public void setPoint(double radius, double theta)
radius
- the distance to the source pointtheta
- the location on the radiuspublic java.lang.String toString()
String
representation of this model parameter.
The String
contains the radius around the source node on which the label is placed and the angle that
describes the location on said radius.
toString
in class java.lang.Object
String
representation
|
© Copyright 2000-2022, yWorks GmbH. All rights reserved. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |