Package gov.nih.mipav.model.algorithms
Class ContourPlot.TranslatedPoint2D
- java.lang.Object
-
- java.awt.geom.Point2D
-
- gov.nih.mipav.model.algorithms.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 ofPoint2D
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
-
-
Constructor Summary
Constructors Constructor Description TranslatedPoint2D(java.awt.geom.Point2D origin, double xt, double yt)
Creates a newContourPlot.TranslatedPoint2D
from the specified point with specified translation.
-
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'sorigin
so that this point ends up at the desired location.java.lang.String
toString()
-
-
-
Constructor Detail
-
TranslatedPoint2D
public TranslatedPoint2D(java.awt.geom.Point2D origin, double xt, double yt)
Creates a newContourPlot.TranslatedPoint2D
from the specified point with specified translation.- Parameters:
origin
- the point from which the created point is translatedxt
- translation in x directionyt
- translation in y direction
-
-
Method Detail
-
getX
public double getX()
- Specified by:
getX
in classjava.awt.geom.Point2D
-
getY
public double getY()
- Specified by:
getY
in classjava.awt.geom.Point2D
-
setLocation
public void setLocation(double x, double y)
Sets the location of this point'sorigin
so that this point ends up at the desired location.- Specified by:
setLocation
in classjava.awt.geom.Point2D
-
clone
public ContourPlot.TranslatedPoint2D clone()
- Overrides:
clone
in classjava.awt.geom.Point2D
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-