Class MapViewPoint

java.lang.Object
it.tidalwave.mapviewer.MapViewPoint
All Implemented Interfaces:
Cartesian

public final class MapViewPoint extends Object implements Cartesian
This class represents a point on the map. (0, 0) corresponds to the center of the map view.
Author:
Fabrizio Giudici
See Also:
  • Constructor Details

    • MapViewPoint

      public MapViewPoint()
  • Method Details

    • of

      @Nonnull public static MapViewPoint of(@Nonnull Cartesian point)
      Returns a new point given a (x,y) source..
      Parameters:
      point - the source
      Returns:
      a new point given a (x,y) source
    • of

      @Nonnull public static MapViewPoint of(@Nonnull javafx.scene.input.MouseEvent event)
      Returns a new point copying from a MouseEvent..
      Parameters:
      event - the event
      Returns:
      a new point copying from a MouseEvent
    • translated

      @Nonnull public MapPoint translated(double dx, double dy)
      Returns a point translated of the specified amount..
      Parameters:
      dx - the horizontal translation
      dy - the vertical translation
      Returns:
      a point translated of the specified amount
    • toString

      @Nonnull public String toString()
      Overrides:
      toString in class Object