001    package com.google.gwt.maps.client.base;
002    
003    import com.google.gwt.core.client.JavaScriptObject;
004    
005    /**
006     * A point on a two-dimensional plane.
007     * <br><br>
008     * See <a href="https://developers.google.com/maps/documentation/javascript/reference#Point">Point API Doc</a>
009     */
010    public class Point extends JavaScriptObject {
011      
012      /**
013       * A point on a two-dimensional plane.
014       * use newInstance();
015       */
016      protected Point() {}
017    
018      /**
019       * creates A point on a two-dimensional plane.
020       * @param x
021       * @param y
022       */
023      public final static Point newInstance(double x, double y) {
024        return createJso(x, y).cast();
025      }
026      
027      private final static native JavaScriptObject createJso(double x, double y) /*-{
028        return new $wnd.google.maps.Point(x, y);
029      }-*/;
030      
031      /**
032       * Compares two Points
033       * @param other
034       */
035      public final native boolean equals(Point other) /*-{
036        return this.equals(other);
037      }-*/;
038      
039      /**
040       * Returns a string representation of this Point.
041       */
042      public final native String getToString() /*-{
043        return this.toString();
044      }-*/;
045      
046      /**
047       * get X coordinate
048       */
049      public final native double getX() /*-{
050        return this.x;
051      }-*/;
052      
053      /**
054       * get Y coordinate
055       */
056      public final native double getY() /*-{
057        return this.y;
058      }-*/;
059    }