|
JHotDraw 7.1 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jhotdraw.draw.BezierLabelLocator
public class BezierLabelLocator
This locator locates a position relative to a polyline. The position is chosen in a way, which is suitable for labeling the polyline. The preferredSize of the label is used to determine its location.
Constructor Summary | |
---|---|
BezierLabelLocator()
Creates a new instance. |
|
BezierLabelLocator(double relativePosition,
double angle,
double distance)
Creates a new locator. |
Method Summary | |
---|---|
java.awt.geom.Point2D.Double |
getRelativeLabelPoint(BezierFigure owner,
Figure label)
Returns a Point2D.Double on the polyline that is at the provided relative position. |
java.awt.geom.Point2D.Double |
getRelativePoint(BezierFigure owner)
Returns a Point2D.Double on the polyline that is at the provided relative position. |
java.awt.geom.Point2D.Double |
locate(Figure owner)
Locates a position on the provided figure. |
java.awt.geom.Point2D.Double |
locate(Figure owner,
Figure label)
Locates a position on the provided figure relative to the dependent figure. |
void |
read(DOMInput in)
|
void |
write(DOMOutput out)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BezierLabelLocator()
public BezierLabelLocator(double relativePosition, double angle, double distance)
relativePosition
- The relative position of the label on the polyline.
0.0 specifies the start of the polyline, 1.0 the
end of the polyline. Values between 0.0 and 1.0 are relative positions
on the polyline.angle
- The angle of the distance vector.distance
- The length of the distance vector.Method Detail |
---|
public java.awt.geom.Point2D.Double locate(Figure owner)
Locator
locate
in interface Locator
public java.awt.geom.Point2D.Double locate(Figure owner, Figure label)
Locator
locate
in interface Locator
public java.awt.geom.Point2D.Double getRelativePoint(BezierFigure owner)
public java.awt.geom.Point2D.Double getRelativeLabelPoint(BezierFigure owner, Figure label)
public void read(DOMInput in)
read
in interface DOMStorable
public void write(DOMOutput out)
write
in interface DOMStorable
|
Copyright 1996-2007 (c) JHotDraw.org. Some rights reserved. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |