|
JHotDraw 7.1 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jhotdraw.draw.AbstractLocator
org.jhotdraw.draw.RelativeLocator
public class RelativeLocator
A locator that specfies a point that is relative to the bounds of a figure.
Field Summary | |
---|---|
protected boolean |
isTransform
If this is set to true, if the locator is transforming with the figure. |
protected double |
relativeX
Relative x-coordinate on the bounds of the figure. |
protected double |
relativeY
Relative y-coordinate on the bounds of the figure. |
Constructor Summary | |
---|---|
RelativeLocator()
Creates a new instance. |
|
RelativeLocator(double relativeX,
double relativeY)
Creates a new instance. |
|
RelativeLocator(double relativeX,
double relativeY,
boolean isTransform)
|
Method Summary | |
---|---|
static Locator |
center()
Non-transforming Center. |
static Locator |
center(boolean isTransform)
Center. |
static Locator |
east()
Non-transforming East. |
static Locator |
east(boolean isTransform)
East. |
java.awt.geom.Point2D.Double |
locate(Figure owner)
Locates a position on the provided figure. |
static Locator |
north()
Non-transforming North. |
static Locator |
north(boolean isTransform)
North. |
static Locator |
northEast()
Non-transforming North east. |
static Locator |
northEast(boolean isTransform)
Norht East. |
static Locator |
northWest()
Non-transforming North west. |
static Locator |
northWest(boolean isTransform)
North West. |
void |
read(DOMInput in)
|
static Locator |
south()
Non-transforming South. |
static Locator |
south(boolean isTransform)
South. |
static Locator |
southEast()
Non-transforming South east. |
static Locator |
southEast(boolean isTransform)
South East. |
static Locator |
southWest()
Non-transforming South west. |
static Locator |
southWest(boolean isTransform)
South West. |
static Locator |
west()
Non-transforming West. |
static Locator |
west(boolean isTransform)
West. |
void |
write(DOMOutput out)
|
Methods inherited from class org.jhotdraw.draw.AbstractLocator |
---|
locate |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected double relativeX
protected double relativeY
protected boolean isTransform
Constructor Detail |
---|
public RelativeLocator()
public RelativeLocator(double relativeX, double relativeY)
public RelativeLocator(double relativeX, double relativeY, boolean isTransform)
relativeX
- x-position relative to bounds expressed as a value
between 0 and 1.relativeY
- y-position relative to bounds expressed as a value
between 0 and 1.isTransform
- Set this to true, if the locator shall honor the
TRANSFORM attribute of the Figure.Method Detail |
---|
public java.awt.geom.Point2D.Double locate(Figure owner)
Locator
public static Locator east()
public static Locator east(boolean isTransform)
isTransform
- Set this to true, if RelativeLocator shall honour
the AttributesKey.TRANSFORM attribute of the Figure.public static Locator north()
public static Locator north(boolean isTransform)
isTransform
- Set this to true, if RelativeLocator shall honour
the AttributesKey.TRANSFORM attribute of the Figure.public static Locator west()
public static Locator west(boolean isTransform)
isTransform
- Set this to true, if RelativeLocator shall honour
the AttributesKey.TRANSFORM attribute of the Figure.public static Locator northEast()
public static Locator northEast(boolean isTransform)
isTransform
- Set this to true, if RelativeLocator shall honour
the AttributesKey.TRANSFORM attribute of the Figure.public static Locator northWest()
public static Locator northWest(boolean isTransform)
isTransform
- Set this to true, if RelativeLocator shall honour
the AttributesKey.TRANSFORM attribute of the Figure.public static Locator south()
public static Locator south(boolean isTransform)
isTransform
- Set this to true, if RelativeLocator shall honour
the AttributesKey.TRANSFORM attribute of the Figure.public static Locator southEast()
public static Locator southEast(boolean isTransform)
isTransform
- Set this to true, if RelativeLocator shall honour
the AttributesKey.TRANSFORM attribute of the Figure.public static Locator southWest()
public static Locator southWest(boolean isTransform)
isTransform
- Set this to true, if RelativeLocator shall honour
the AttributesKey.TRANSFORM attribute of the Figure.public static Locator center()
public static Locator center(boolean isTransform)
isTransform
- Set this to true, if RelativeLocator shall honour
the AttributesKey.TRANSFORM attribute of the Figure.public void write(DOMOutput out)
public void read(DOMInput in)
|
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 |