|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--com.rolemodelsoft.drawlet.basics.AbstractLocator
|
+--com.rolemodelsoft.drawlet.basics.FigureRelativePoint
|
+--com.rolemodelsoft.drawlet.shapes.lines.LineFigureRelativePoint
This class implements Locator by providing x and y coordinates that are relative to a point on a segment of LineFigure. Although it is assumed that the normal use will have these locators on the LineFigure, that is not necessary.
| Field Summary | |
protected int |
segment
The 1-based index of the segment within the figure from which we will define our relative position. |
| Fields inherited from class com.rolemodelsoft.drawlet.basics.FigureRelativePoint |
figure,
offsetX,
offsetY,
relativeX,
relativeY |
| Constructor Summary | |
LineFigureRelativePoint(LineFigure figure)
Constructs and initializes a new instance of a locator which is relative to a point on a line |
|
LineFigureRelativePoint(LineFigure figure,
double relativeX,
double relativeY)
Constructs and initializes a new instance of a locator which is relative to a point on a line |
|
LineFigureRelativePoint(LineFigure figure,
double relativeX,
double relativeY,
int offsetX,
int offsetY)
Constructs and initializes a new instance of a locator which is relative to a point on a line |
|
LineFigureRelativePoint(LineFigure figure,
int segment,
double relativeX,
double relativeY)
Constructs and initializes a new instance of a locator which is relative to a point on a line |
|
LineFigureRelativePoint(LineFigure figure,
int segment,
double relativeX,
double relativeY,
int offsetX,
int offsetY)
Constructs and initializes a new instance of a locator which is relative to a point on a line |
|
LineFigureRelativePoint(LineFigure figure,
int offsetX,
int offsetY)
Constructs and initializes a new instance of a locator which is relative to a point on a line |
|
LineFigureRelativePoint(LineFigure figure,
int segment,
int offsetX,
int offsetY)
Constructs and initializes a new instance of a locator which is relative to a point on a line |
|
| Method Summary | |
protected double |
defaultRelativeX()
Answer the default/initial value of relativeX. |
protected double |
defaultRelativeY()
Answer the default/initial value of relativeY. |
int |
x()
Answer the x coordinate. |
int |
y()
Answer the y coordinate. |
| Methods inherited from class com.rolemodelsoft.drawlet.basics.FigureRelativePoint |
defaultOffsetX,
defaultOffsetY,
duplicate,
duplicateIn,
getFigure,
postDuplicate,
setFigure |
| Methods inherited from class com.rolemodelsoft.drawlet.basics.AbstractLocator |
r,
theta,
toString |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
| Field Detail |
protected int segment
| Constructor Detail |
public LineFigureRelativePoint(LineFigure figure)
figure - the figure to which the instance will be relative
public LineFigureRelativePoint(LineFigure figure,
double relativeX,
double relativeY)
figure - the figure to which the instance will be relativerelativeX - the percentage of the length of the default segment at which to determine XrelativeY - the percentage of the length of the default segment at which to determine Y
public LineFigureRelativePoint(LineFigure figure,
double relativeX,
double relativeY,
int offsetX,
int offsetY)
figure - the figure to which the instance will be relativerelativeX - the percentage of the length of the default segment at which to determine XrelativeY - the percentage of the length of the default segment at which to determine YoffsetX - the offset (added to relative X) in the x directionoffsetY - the offset (added to relative Y) in the y direction
public LineFigureRelativePoint(LineFigure figure,
int segment,
double relativeX,
double relativeY)
figure - the figure to which the instance will be relativesegment - the 1-based index of the specific segment which will be the basis of our relative locationrelativeX - the percentage of the length of the segment at which to determine XrelativeY - the percentage of the length of the segment at which to determine Y
public LineFigureRelativePoint(LineFigure figure,
int segment,
double relativeX,
double relativeY,
int offsetX,
int offsetY)
figure - the figure to which the instance will be relativesegment - the 1-based index of the specific segment which will be the basis of our relative locationrelativeX - the percentage of the length of the segment at which to determine XrelativeY - the percentage of the length of the segment at which to determine YoffsetX - the offset (added to relative X) in the x directionoffsetY - the offset (added to relative Y) in the y direction
public LineFigureRelativePoint(LineFigure figure,
int offsetX,
int offsetY)
figure - the figure to which the instance will be relativeoffsetX - the offset (added to default relative X) in the x directionoffsetY - the offset (added to default relative Y) in the y direction
public LineFigureRelativePoint(LineFigure figure,
int segment,
int offsetX,
int offsetY)
figure - the figure to which the instance will be relativesegment - the 1-based index of the specific segment which will be the basis of our relative locationoffsetX - the offset (added to default relative X) in the x directionoffsetY - the offset (added to default relative Y) in the y direction| Method Detail |
protected double defaultRelativeX()
protected double defaultRelativeY()
public int x()
public int y()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||