Class JMTPoint
java.lang.Object
java.awt.geom.Point2D
jsimgraph.definitions.JMTPoint
- All Implemented Interfaces:
Cloneable
Name: JMTPoint
Description: A Point2D implementation class used to store position of a station
Date: 21/feb/07 Time: 18:37:35
- Version:
- 1.0
- Author:
- Bertoli Marco
-
Nested Class Summary
Nested classes/interfaces inherited from class Point2D
Point2D.Double, Point2D.Float -
Constructor Summary
ConstructorsConstructorDescriptionJMTPoint()Builds a new JMTPoint at position (0,0) and no rotation.JMTPoint(double x, double y, boolean rotate) Builds a new JMTPointJMTPoint(double x, double y, boolean rotate, double angle) Builds a new JMTPoint from a given pointBuilds a new JMTPoint from a given pointBuilds a new JMTPoint from a given point -
Method Summary
Methods inherited from class Point2D
distance, distance, distance, distanceSq, distanceSq, distanceSq, equals, hashCode, setLocation
-
Constructor Details
-
JMTPoint
public JMTPoint()Builds a new JMTPoint at position (0,0) and no rotation. -
JMTPoint
public JMTPoint(double x, double y, boolean rotate) Builds a new JMTPoint- Parameters:
x- x coordinatey- y coordinaterotate- true if station is rotated
-
JMTPoint
public JMTPoint(double x, double y, boolean rotate, double angle) Builds a new JMTPoint from a given point- Parameters:
x- x coordinatey- y coordinaterotate- true if station is rotatedangle- value of the rotation angle
-
JMTPoint
Builds a new JMTPoint from a given point- Parameters:
point- point for coordinatesrotate- true if station is rotated
-
JMTPoint
Builds a new JMTPoint from a given point- Parameters:
point- point for coordinatesrotate- true if station is rotatedangle- value of the rotation angle
-
-
Method Details
-
getX
-
getY
-
setLocation
public void setLocation(double x, double y) - Specified by:
setLocationin classPoint2D
-
clone
-
isRotate
public boolean isRotate()- Returns:
- true if station is rotated
-
getAngle
public double getAngle()- Returns:
- the value of the rotation angle
-
setAngle
public void setAngle(double angle) - Parameters:
angle- = value of the rotation angle
-
setRotate
public void setRotate(boolean rotate) - Parameters:
rotate- true if station is rotated
-
setX
public void setX(double x) - Parameters:
x- x coordinate
-
setY
public void setY(double y) - Parameters:
y- y coordinate
-