Class Translation2D


  • public class Translation2D
    extends java.lang.Object
    Definition of a 2D translation transformation. A 2D point is moved from a source location to a destination location.
    Author:
    andi
    • Constructor Summary

      Constructors 
      Constructor Description
      Translation2D​(double srcX, double srcY, double destX, double destY)
      Initialize the object using coordinates for the source and destination
      Translation2D​(javafx.geometry.Point2D source, javafx.geometry.Point2D destination)
      Initialize the object using two 2D points.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      javafx.beans.property.ReadOnlyObjectProperty<javafx.geometry.Point2D> destinationProperty()
      Property containing the destination point.
      javafx.geometry.Point2D getDestination()
      Get the destination point.
      javafx.geometry.Point2D getSource()
      Get the source point.
      javafx.beans.property.ReadOnlyObjectProperty<javafx.geometry.Point2D> sourceProperty()
      Property containing the source point.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Translation2D

        public Translation2D​(javafx.geometry.Point2D source,
                             javafx.geometry.Point2D destination)
        Initialize the object using two 2D points.
        Parameters:
        source - point
        destination - point
      • Translation2D

        public Translation2D​(double srcX,
                             double srcY,
                             double destX,
                             double destY)
        Initialize the object using coordinates for the source and destination
        Parameters:
        srcX - X-coordinate of the source point
        srcY - Y-coordinate of the source point
        destX - X-coordinate of the destination point
        destY - Y-coordinate of the destination point
    • Method Detail

      • getSource

        public javafx.geometry.Point2D getSource()
        Get the source point.
        Returns:
        .
      • getDestination

        public javafx.geometry.Point2D getDestination()
        Get the destination point.
        Returns:
        .
      • sourceProperty

        public javafx.beans.property.ReadOnlyObjectProperty<javafx.geometry.Point2D> sourceProperty()
        Property containing the source point.
        Returns:
        .
      • destinationProperty

        public javafx.beans.property.ReadOnlyObjectProperty<javafx.geometry.Point2D> destinationProperty()
        Property containing the destination point.
        Returns:
        .