org.jhotdraw.draw.locator
Class RelativeDecoratorLocator
- java.lang.Object
-
- org.jhotdraw.draw.locator.AbstractLocator
-
- org.jhotdraw.draw.locator.RelativeLocator
-
- org.jhotdraw.draw.locator.RelativeDecoratorLocator
-
- All Implemented Interfaces:
- java.io.Serializable, Locator, DOMStorable
public class RelativeDecoratorLocator extends RelativeLocator
A locator that specfies a point that is relative to the bounds of a figures decorator.
Design PatternsStrategy
RelativeDecoratorLocatorencapsulates a strategy for locating a point on a decorator.
Component:DecoratedFigure; Strategy:RelativeDecoratorLocator.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description RelativeDecoratorLocator()RelativeDecoratorLocator(double relativeX, double relativeY)Creates a new instance.RelativeDecoratorLocator(double relativeX, double relativeY, boolean isQuadratic)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description static Locatorcenter()Center.static Locatoreast()java.awt.geom.Point2D.Doublelocate(Figure owner)Locates a position on the provided figure.static Locatornorth()North.static LocatornorthEast()North east.static LocatornorthWest()North west.static Locatorsouth()South.static LocatorsouthEast()South east.static LocatorsouthWest()South west.static Locatorwest()West.-
Methods inherited from class org.jhotdraw.draw.locator.RelativeLocator
center, east, equals, hashCode, north, northEast, northWest, read, south, southEast, southWest, west, write
-
Methods inherited from class org.jhotdraw.draw.locator.AbstractLocator
locate
-
-
-
-
Constructor Detail
-
RelativeDecoratorLocator
public RelativeDecoratorLocator()
-
RelativeDecoratorLocator
public RelativeDecoratorLocator(double relativeX, double relativeY)Creates a new instance.
-
RelativeDecoratorLocator
public RelativeDecoratorLocator(double relativeX, double relativeY, boolean isQuadratic)
-
-
Method Detail
-
locate
public java.awt.geom.Point2D.Double locate(Figure owner)
Description copied from interface:LocatorLocates a position on the provided figure.- Specified by:
locatein interfaceLocator- Overrides:
locatein classRelativeLocator- Returns:
- a point on the figure.
-
east
public static Locator east()
-
north
public static Locator north()
North.
-
west
public static Locator west()
West.
-
northEast
public static Locator northEast()
North east.
-
northWest
public static Locator northWest()
North west.
-
south
public static Locator south()
South.
-
southEast
public static Locator southEast()
South east.
-
southWest
public static Locator southWest()
South west.
-
center
public static Locator center()
Center.
-
-
DataMelt 3.0 © DataMelt by jWork.ORG