turingmachine
Class CTMPoint

java.lang.Object
  extended by java.awt.geom.Point2D
      extended by java.awt.Point
          extended by turingmachine.CTMPoint
All Implemented Interfaces:
java.lang.Cloneable, java.io.Serializable

class CTMPoint
extends java.awt.Point
implements java.io.Serializable

New point class to implement extra stuff default point class implements.


Nested Class Summary
 
Nested classes inherited from class java.awt.geom.Point2D
java.awt.geom.Point2D.Double, java.awt.geom.Point2D.Float
 
Field Summary
(package private) static long serialVersionUID
          Serial id, so future version will load old files.
 
Fields inherited from class java.awt.Point
x, y
 
Constructor Summary
CTMPoint()
          Default constructor.
CTMPoint(int aX, int aY)
          Constructor.
CTMPoint(java.awt.Point aPoint)
          Constructor.
 
Method Summary
(package private)  CTMPoint add(int aX, int aY)
          Add aPoint to this.
(package private)  CTMPoint add(java.awt.geom.Point2D aPoint)
          Add aPoint to this.
static CTMPoint getMidpointInstance(java.awt.Point aPoint1, java.awt.Point aPoint2)
          Create a new instance of ctmpoint that is halfway between aPoint1 and aPoint2.
(package private)  void resizeMax(java.awt.Point aMaxTest)
          Extends to x and y extents of the point to which ever has bigger extents, aMaxTest or this.
(package private)  CTMPoint scale(double aScale)
           
(package private)  CTMPoint set(java.awt.Point aPoint)
           
(package private)  CTMPoint subtract(int aX, int aY)
          Subtract aPoint from this.
(package private)  CTMPoint subtract(java.awt.Point aSubPoint)
          Subtract aPoint from this.
(package private) static void translate(java.awt.Point[] aPoints, int aX, int aY)
           
 
Methods inherited from class java.awt.Point
equals, getLocation, getX, getY, move, setLocation, setLocation, setLocation, toString, translate
 
Methods inherited from class java.awt.geom.Point2D
clone, distance, distance, distance, distanceSq, distanceSq, distanceSq, hashCode, setLocation
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

serialVersionUID

static final long serialVersionUID
Serial id, so future version will load old files.

See Also:
Constant Field Values
Constructor Detail

CTMPoint

CTMPoint()
Default constructor.


CTMPoint

CTMPoint(int aX,
         int aY)
Constructor.

Parameters:
aX - The x component of the point.
aY - The y component of the point.

CTMPoint

CTMPoint(java.awt.Point aPoint)
Constructor.

Parameters:
aPoint - The point to duplicate.
Method Detail

getMidpointInstance

public static CTMPoint getMidpointInstance(java.awt.Point aPoint1,
                                           java.awt.Point aPoint2)
Create a new instance of ctmpoint that is halfway between aPoint1 and aPoint2.

Parameters:
aPoint1 - First point for midpoint.
aPoint2 - Second point for midpoint.
Returns:
The new midpoint instance.

resizeMax

void resizeMax(java.awt.Point aMaxTest)
Extends to x and y extents of the point to which ever has bigger extents, aMaxTest or this.

Parameters:
aMaxTest - The point to extend to if need be.

add

CTMPoint add(java.awt.geom.Point2D aPoint)
Add aPoint to this.

Parameters:
aPoint - The point to translate by.
Returns:
this

add

CTMPoint add(int aX,
             int aY)
Add aPoint to this.

Parameters:
aX - The horizontal amount to translate by.
aY - The vertical amount to translate by.
Returns:
this

subtract

CTMPoint subtract(java.awt.Point aSubPoint)
Subtract aPoint from this.

Parameters:
aSubPoint - The point to translate by.
Returns:
this

subtract

CTMPoint subtract(int aX,
                  int aY)
Subtract aPoint from this.

Parameters:
aX - The horizontal amount to translate by.
aY - The vertical amount to translate by.
Returns:
this

scale

CTMPoint scale(double aScale)

set

CTMPoint set(java.awt.Point aPoint)

translate

static void translate(java.awt.Point[] aPoints,
                      int aX,
                      int aY)