Class JMTPoint

java.lang.Object
java.awt.geom.Point2D
jsimgraph.definitions.JMTPoint
All Implemented Interfaces:
Cloneable

public class JMTPoint extends Point2D

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
  • 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 coordinate
      y - y coordinate
      rotate - 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 coordinate
      y - y coordinate
      rotate - true if station is rotated
      angle - value of the rotation angle
    • JMTPoint

      public JMTPoint(Point2D point, boolean rotate)
      Builds a new JMTPoint from a given point
      Parameters:
      point - point for coordinates
      rotate - true if station is rotated
    • JMTPoint

      public JMTPoint(Point2D point, boolean rotate, double angle)
      Builds a new JMTPoint from a given point
      Parameters:
      point - point for coordinates
      rotate - true if station is rotated
      angle - value of the rotation angle
  • Method Details

    • getX

      public double getX()
      Specified by:
      getX in class Point2D
    • getY

      public double getY()
      Specified by:
      getY in class Point2D
    • setLocation

      public void setLocation(double x, double y)
      Specified by:
      setLocation in class Point2D
    • clone

      public Object clone()
      Overrides:
      clone in class Point2D
    • 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