com.rolemodelsoft.drawlet.basics
Class PolarCoordinate

java.lang.Object
  |
  +--com.rolemodelsoft.drawlet.basics.AbstractLocator
        |
        +--com.rolemodelsoft.drawlet.basics.PolarCoordinate

public class PolarCoordinate
extends AbstractLocator

This provides basic default functionality for MovableLocators. Basically, it's just java.awt.Point with the proper interface to be interchangeable with other Locators

See Also:
Serialized Form

Field Summary
protected  int r
          The x coordinate of this DrawingPoint.
protected  double theta
          The y coordinate of this DrawingPoint.
 
Constructor Summary
PolarCoordinate(int r, double theta)
          Constructs and initializes a PolarCoordinate from the specified r and theta values.
 
Method Summary
 int r()
          Answer the radius of the Locator (as a PolarCoordinate).
 double theta()
          Answer the angle in radians of the Locator (as a PolarCoordinate).
 int x()
          Answer the x coordinate.
 int y()
          Answer the y coordinate.
 
Methods inherited from class com.rolemodelsoft.drawlet.basics.AbstractLocator
duplicate, duplicateIn, postDuplicate, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

r

protected int r
The x coordinate of this DrawingPoint.

theta

protected double theta
The y coordinate of this DrawingPoint.
Constructor Detail

PolarCoordinate

public PolarCoordinate(int r,
                       double theta)
Constructs and initializes a PolarCoordinate from the specified r and theta values.
Parameters:
r - the radius.
theta - the theta
Method Detail

r

public int r()
Answer the radius of the Locator (as a PolarCoordinate).
Overrides:
r in class AbstractLocator
Returns:
an integer representing the radius

theta

public double theta()
Answer the angle in radians of the Locator (as a PolarCoordinate).
Overrides:
theta in class AbstractLocator
Returns:
double representing theta

x

public int x()
Answer the x coordinate.
Overrides:
x in class AbstractLocator
Returns:
an integer representing the x coordinate

y

public int y()
Answer the y coordinate.
Overrides:
y in class AbstractLocator
Returns:
an integer representing the y coordinate