Class TLcdGXYViewXYWorldTransformation

java.lang.Object
com.luciad.view.gxy.TLcdGXYViewXYWorldTransformation
All Implemented Interfaces:
ILcdGXYViewXYWorldTransformation, Serializable, Cloneable

public class TLcdGXYViewXYWorldTransformation extends Object implements ILcdGXYViewXYWorldTransformation
This an implementation of the ILcdGXYViewXYWorldTransformation interface.
See Also:
  • Constructor Details Link icon

    • TLcdGXYViewXYWorldTransformation Link icon

      public TLcdGXYViewXYWorldTransformation()
      Constructs a unitary transformation.
    • TLcdGXYViewXYWorldTransformation Link icon

      public TLcdGXYViewXYWorldTransformation(Point aViewOrigin, double aScale)
      Constructs a transformation with the given view origin and scale. The world origin is taken to be (0,0).
      Parameters:
      aViewOrigin - the view origin.
      aScale - the scale to apply from world to view coordinates.
    • TLcdGXYViewXYWorldTransformation Link icon

      public TLcdGXYViewXYWorldTransformation(Point aViewOrigin, ILcdPoint aWorldOrigin, double aScale)
      Constructs a transformation with the given view origin, world origin, and scale.
      Parameters:
      aViewOrigin - the view origin.
      aWorldOrigin - the world origin.
      aScale - scaling factor from world to view coordinates.
    • TLcdGXYViewXYWorldTransformation Link icon

      public TLcdGXYViewXYWorldTransformation(ILcdGXYView aGXYView)
      Initializes the view origin, world origin and scale of the given ILcdGXYView.
      Parameters:
      aGXYView - the ILcdGXYView for which to construct the transformation.
    • TLcdGXYViewXYWorldTransformation Link icon

      public TLcdGXYViewXYWorldTransformation(Point aViewOrigin, ILcdPoint aWorldOrigin, double aScale, double aRotation)
      Constructs a transformation with the given view origin, world origin, scale, and rotation.
      Parameters:
      aViewOrigin - the view origin.
      aWorldOrigin - the world origin.
      aScale - scaling factor from world to view coordinates.
      aRotation - the rotation to apply around the world origin (in degrees).
    • TLcdGXYViewXYWorldTransformation Link icon

      public TLcdGXYViewXYWorldTransformation(Point aViewOrigin, ILcdPoint aWorldOrigin, double aScaleX, double aScaleY, double aRotation)
      Constructs a transformation with the given view origin, world origin, scale, and rotation.
      Parameters:
      aViewOrigin - the view origin.
      aWorldOrigin - the world origin.
      aScaleX - scaling factor from world to view coordinates along x-axis.
      aScaleY - scaling factor from world to view coordinates along y-axis.
      aRotation - the rotation to apply around the world origin (in degrees).
  • Method Details Link icon

    • setupFor Link icon

      public void setupFor(ILcdGXYView aGXYView)
      Setup with the view origin, world origin and scale of the given ILcdGXYView.
      Parameters:
      aGXYView - the ILcdGXYView for which to initialize this TLcdGXYViewXYWorldTransformation.
    • getViewOrigin Link icon

      public Point getViewOrigin()
      Returns the viewOrigin value of this TLcdGXYViewXYWorldTransformation.
      Returns:
      the viewOrigin value of this TLcdGXYViewXYWorldTransformation.
      See Also:
    • setViewOrigin Link icon

      public void setViewOrigin(int aX, int aY)
      Sets the view origin.
      Parameters:
      aX - view x coordinate.
      aY - view y coordinate.
      See Also:
    • setViewOrigin Link icon

      public void setViewOrigin(Point aViewOrigin)
      Sets the view origin.
      Parameters:
      aViewOrigin - point to become new view origin.
      See Also:
    • getWorldOrigin Link icon

      public ILcdPoint getWorldOrigin()
      Returns the worldOrigin value of this TLcdGXYViewXYWorldTransformation.
      Returns:
      the worldOrigin value of this TLcdGXYViewXYWorldTransformation.
      See Also:
    • setWorldOrigin Link icon

      public void setWorldOrigin(double aX, double aY)
      Sets the world origin.
      Parameters:
      aX - world x coordinate.
      aY - world y coordinate.
      See Also:
    • setWorldOrigin Link icon

      public void setWorldOrigin(ILcdPoint aWorldOrigin)
      Sets the world origin.
      Parameters:
      aWorldOrigin - ILcdPoint the new world origin. Only the 2 first coordinates are considered.
      See Also:
    • getScale Link icon

      public double getScale()
      Returns the scaling factor from world to view coordinates. If the scale along the x-axis differs from the scale along the y-axis, a mean value is returned.

      The scale corresponds to the number of pixels per world unit, as determined by the ILcdXYWorldReference. For example, a view displaying geographical data could use a scale in pixels per meter.

      Returns:
      the scaling factor from world to view coordinates.
      See Also:
    • getScaleX Link icon

      public double getScaleX()
      Returns the scaling factor from world to view coordinates along the x-axis.

      The scale corresponds to the number of pixels per world unit, as determined by the ILcdXYWorldReference. For example, a view displaying geographical data could use a scale in pixels per meter.

      Returns:
      the scaling factor from world to view coordinates along the x-axis.
    • getScaleY Link icon

      public double getScaleY()
      Returns the scaling factor from world to view coordinates along the y-axis.

      The scale corresponds to the number of pixels per world unit, as determined by the ILcdXYWorldReference. For example, a view displaying geographical data could use a scale in pixels per meter.

      Returns:
      the scaling factor from world to view coordinates along the y-axis.
    • setScale Link icon

      public void setScale(double aScale)
      Sets the scaling factor from world to view coordinates.

      The scale corresponds to the number of pixels per world unit, as determined by the ILcdXYWorldReference. For example, a view displaying geographical data could use a scale in pixels per meter.

      Parameters:
      aScale - the scaling factor from world to view coordinates.
      See Also:
    • getRotation Link icon

      public double getRotation()
      Gets the rotation of this ILcdGXYViewXYWorldTransformation in degrees. The rotation is positive counter-clockwise. The rotation is applied in the world reference system around the worldOrigin.
      Returns:
      the rotation of this ILcdGXYViewXYWorldTransformation in degrees.
      See Also:
    • setRotation Link icon

      public void setRotation(double aRotation)
      Sets the rotation of this ILcdGXYViewXYWorldTransformation in degrees. The rotation is positive counter-clockwise. The rotation is applied in the world reference system around the worldOrigin.
      Parameters:
      aRotation - the rotation of this ILcdGXYViewXYWorldTransformation in degrees.
      See Also:
    • worldDistance2view Link icon

      public double worldDistance2view(double aWorldDistance)
      Description copied from interface: ILcdGXYViewXYWorldTransformation
      Converts a distance in world space to a distance in AWT (toolkit) view space.
      Specified by:
      worldDistance2view in interface ILcdGXYViewXYWorldTransformation
      Parameters:
      aWorldDistance - the distance to be converted.
      Returns:
      the converted distance in view coordinates.
    • worldPoint2viewAWTPointSFCT Link icon

      public void worldPoint2viewAWTPointSFCT(ILcdPoint aWorldPoint, Point aViewPointSFCT)
      Description copied from interface: ILcdGXYViewXYWorldTransformation
      Converts an ILcdPoint in world coordinates to an AWT Point in AWT (toolkit) view coordinates.
      Specified by:
      worldPoint2viewAWTPointSFCT in interface ILcdGXYViewXYWorldTransformation
      Parameters:
      aWorldPoint - the world ILcdPoint to transform.
      aViewPointSFCT - the AWT Point to be set.
    • worldPoint2viewXYPointSFCT Link icon

      public void worldPoint2viewXYPointSFCT(ILcdPoint aWorldPoint, ILcd2DEditablePoint aViewPointSFCT)
      Description copied from interface: ILcdGXYViewXYWorldTransformation
      Converts an ILcdPoint in world coordinates to a ILcd2DEditablePoint in AWT (toolkit) view coordinates.
      Specified by:
      worldPoint2viewXYPointSFCT in interface ILcdGXYViewXYWorldTransformation
      Parameters:
      aWorldPoint - the world ILcdPoint to transform.
      aViewPointSFCT - the AWT ILcd2DEditablePoint to be set.
    • viewAWTPoint2worldSFCT Link icon

      public void viewAWTPoint2worldSFCT(Point aViewPoint, ILcd2DEditablePoint aWorldPointSFCT)
      Description copied from interface: ILcdGXYViewXYWorldTransformation
      Converts a Point in AWT (toolkit) view coordinates to a ILcd2DEditablePoint in world coordinates.
      Specified by:
      viewAWTPoint2worldSFCT in interface ILcdGXYViewXYWorldTransformation
      Parameters:
      aViewPoint - the AWT view coordinate to transform.
      aWorldPointSFCT - the world point to be set.
    • viewXYPoint2worldSFCT Link icon

      public void viewXYPoint2worldSFCT(ILcdPoint aViewPoint, ILcd2DEditablePoint aWorldPointSFCT)
      Description copied from interface: ILcdGXYViewXYWorldTransformation
      Converts an ILcdPoint in AWT (toolkit) view coordinates to a ILcd2DEditablePoint in world coordinates.
      Specified by:
      viewXYPoint2worldSFCT in interface ILcdGXYViewXYWorldTransformation
      Parameters:
      aViewPoint - the AWT view coordinate to transform.
      aWorldPointSFCT - the world point to be set.
    • viewXYPoint2worldSFCT Link icon

      public void viewXYPoint2worldSFCT(int aViewX, int aViewY, ILcd2DEditablePoint aWorldPointSFCT)
      Description copied from interface: ILcdGXYViewXYWorldTransformation
      Converts a (x,y) location in AWT (toolkit) view coordinates to a ILcd2DEditablePoint in world coordinates.
      Specified by:
      viewXYPoint2worldSFCT in interface ILcdGXYViewXYWorldTransformation
      Parameters:
      aViewX - the x-value of the AWT view coordinate to transform.
      aViewY - the y-value of the AWT view coordinate to transform.
      aWorldPointSFCT - the world point to be set.
    • viewAWTDistance2world Link icon

      public double viewAWTDistance2world(int aViewDistance)
      Description copied from interface: ILcdGXYViewXYWorldTransformation
      Converts a distance in AWT (toolkit) view space to a distance in world space.
      Specified by:
      viewAWTDistance2world in interface ILcdGXYViewXYWorldTransformation
      Parameters:
      aViewDistance - the distance to be converted.
      Returns:
      the converted distance in world coordinates.
    • viewXYDistance2world Link icon

      public double viewXYDistance2world(double aViewDistance)
      Description copied from interface: ILcdGXYViewXYWorldTransformation
      Converts a distance in AWT (toolkit) view space to a distance in world space.
      Specified by:
      viewXYDistance2world in interface ILcdGXYViewXYWorldTransformation
      Parameters:
      aViewDistance - the distance to be converted.
      Returns:
      the converted distance in world coordinates.
    • viewAWTBounds2worldSFCT Link icon

      public void viewAWTBounds2worldSFCT(Rectangle aViewRectangle, ILcd2DEditableBounds aWorldBoundsSFCT)
      Description copied from interface: ILcdGXYViewXYWorldTransformation
      Converts a Rectangle in AWT (toolkit) view coordinates to a ILcd2DEditableBounds in world coordinates.
      Specified by:
      viewAWTBounds2worldSFCT in interface ILcdGXYViewXYWorldTransformation
      Parameters:
      aViewRectangle - the bounds in AWT view coordinates to transform.
      aWorldBoundsSFCT - the transformed world bounds to be set by the transformation.
    • viewXYBounds2worldSFCT Link icon

      public void viewXYBounds2worldSFCT(ILcdBounds aViewBounds, ILcd2DEditableBounds aWorldBoundsSFCT)
      Description copied from interface: ILcdGXYViewXYWorldTransformation
      Converts a ILcdBounds in AWT (toolkit) view coordinates to a ILcd2DEditableBounds in world coordinates.
      Specified by:
      viewXYBounds2worldSFCT in interface ILcdGXYViewXYWorldTransformation
      Parameters:
      aViewBounds - the bounds in AWT view coordinates to transform.
      aWorldBoundsSFCT - the transformed world bounds to be set by the transformation.
    • worldBounds2viewAWTSFCT Link icon

      public void worldBounds2viewAWTSFCT(ILcdBounds aWorldBounds, Rectangle aRectangleSFCT)
      Description copied from interface: ILcdGXYViewXYWorldTransformation
      Converts a ILcdBounds in world coordinates to a Rectangle in AWT (toolkit) view coordinates.
      Specified by:
      worldBounds2viewAWTSFCT in interface ILcdGXYViewXYWorldTransformation
      Parameters:
      aWorldBounds - the bounds in world coordinates to transform.
      aRectangleSFCT - the transformed AWT view bounds to be set by the transformation.
    • worldBounds2viewXYSFCT Link icon

      public void worldBounds2viewXYSFCT(ILcdBounds aWorldBounds, ILcd2DEditableBounds aViewBoundsSFCT)
      Description copied from interface: ILcdGXYViewXYWorldTransformation
      Converts a ILcdBounds in world coordinates to a ILcd2DEditableBounds in AWT (toolkit) view coordinates.
      Specified by:
      worldBounds2viewXYSFCT in interface ILcdGXYViewXYWorldTransformation
      Parameters:
      aWorldBounds - the bounds in world coordinates to transform.
      aViewBoundsSFCT - the transformed AWT view bounds to be set by the transformation.
    • equals Link icon

      public boolean equals(Object aGXYViewXYWorldTransformation)
      Overrides:
      equals in class Object
    • clone Link icon

      public Object clone() throws CloneNotSupportedException
      Description copied from interface: ILcdGXYViewXYWorldTransformation
      Returns a clone of this ILcdGXYViewXYWorldTransformation.
      Specified by:
      clone in interface ILcdGXYViewXYWorldTransformation
      Overrides:
      clone in class Object
      Returns:
      a clone of this ILcdGXYViewXYWorldTransformation.
      Throws:
      CloneNotSupportedException - if the object's class does not support cloning. Subclasses that override the clone method can also throw this exception to indicate that an instance cannot be cloned.