public class RelativeLocator extends AbstractLocator
Modifier and Type | Field and Description |
---|---|
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 and Description |
---|
RelativeLocator()
Creates a new instance.
|
RelativeLocator(double relativeX,
double relativeY)
Creates a new instance.
|
RelativeLocator(double relativeX,
double relativeY,
boolean isTransform) |
Modifier and Type | Method and Description |
---|---|
static Locator |
center()
Non-transforming Center.
|
static Locator |
center(boolean isTransform)
Center.
|
static Locator |
east()
Non-transforming East.
|
static Locator |
east(boolean isTransform)
East.
|
boolean |
equals(java.lang.Object obj) |
int |
hashCode() |
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) |
locate
protected double relativeX
protected double relativeY
protected boolean isTransform
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.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)
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object