Class ContourPlot.TranslatedPoint2D

  • All Implemented Interfaces:
    java.lang.Cloneable
    Enclosing class:
    ContourPlot

    public class ContourPlot.TranslatedPoint2D
    extends java.awt.geom.Point2D
    The TranslatedPoint2D is an implementation of Point2D that references another Point2D and has a certain fixed translation from that point. When changing the location of the referenced point, this point will change accordingly.
    Author:
    hageldave
    • Nested Class Summary

      • Nested classes/interfaces inherited from class java.awt.geom.Point2D

        java.awt.geom.Point2D.Double, java.awt.geom.Point2D.Float
    • Field Summary

      Fields 
      Modifier and Type Field Description
      java.awt.geom.Point2D origin  
      double tx  
      double ty  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      ContourPlot.TranslatedPoint2D clone()  
      double getX()  
      double getY()  
      void setLocation​(double x, double y)
      Sets the location of this point's origin so that this point ends up at the desired location.
      java.lang.String toString()  
      • Methods inherited from class java.awt.geom.Point2D

        distance, distance, distance, distanceSq, distanceSq, distanceSq, equals, hashCode, setLocation
      • Methods inherited from class java.lang.Object

        finalize, getClass, notify, notifyAll, wait, wait, wait
    • Field Detail

      • tx

        public final double tx
      • ty

        public final double ty
      • origin

        public final java.awt.geom.Point2D origin
    • Constructor Detail

      • TranslatedPoint2D

        public TranslatedPoint2D​(java.awt.geom.Point2D origin,
                                 double xt,
                                 double yt)
        Creates a new ContourPlot.TranslatedPoint2D from the specified point with specified translation.
        Parameters:
        origin - the point from which the created point is translated
        xt - translation in x direction
        yt - translation in y direction
    • Method Detail

      • getX

        public double getX()
        Specified by:
        getX in class java.awt.geom.Point2D
      • getY

        public double getY()
        Specified by:
        getY in class java.awt.geom.Point2D
      • setLocation

        public void setLocation​(double x,
                                double y)
        Sets the location of this point's origin so that this point ends up at the desired location.
        Specified by:
        setLocation in class java.awt.geom.Point2D
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object