JHotDraw 7.4.1

org.jhotdraw.draw.locator
Class RelativeDecoratorLocator

java.lang.Object
  extended by org.jhotdraw.draw.locator.AbstractLocator
      extended by org.jhotdraw.draw.locator.RelativeLocator
          extended by 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 Patterns

Strategy
RelativeDecoratorLocator encapsulates a strategy for locating a point on a decorator.
Component: DecoratedFigure; Strategy: RelativeDecoratorLocator.



Version:
$Id: RelativeDecoratorLocator.java -1 $
Author:
Werner Randelshofer
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.jhotdraw.draw.locator.RelativeLocator
isTransform, relativeX, relativeY
 
Constructor Summary
RelativeDecoratorLocator()
           
RelativeDecoratorLocator(double relativeX, double relativeY)
          Creates a new instance.
RelativeDecoratorLocator(double relativeX, double relativeY, boolean isQuadratic)
           
 
Method Summary
static Locator center()
          Center.
static Locator east()
           
 java.awt.geom.Point2D.Double locate(Figure owner)
          Locates a position on the provided figure.
static Locator north()
          North.
static Locator northEast()
          North east.
static Locator northWest()
          North west.
static Locator south()
          South.
static Locator southEast()
          South east.
static Locator southWest()
          South west.
static Locator west()
          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
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

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: Locator
Locates a position on the provided figure.

Specified by:
locate in interface Locator
Overrides:
locate in class RelativeLocator
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.


Copyright 1996-2010 (c) by the authors and contributors of the JHotDraw project.
Some rights reserved.