001    package com.google.gwt.maps.client.controls;
002    
003    import com.google.gwt.core.client.JavaScriptObject;
004    
005    /**
006     * Options for the rendering of the pan control.
007     * <br><br>
008     * See <a href="https://developers.google.com/maps/documentation/javascript/reference#PanControlOptions">PanControlOptions API Doc</a>
009     */
010    public class PanControlOptions extends JavaScriptObject {
011    
012      /**
013       * creates a new instance of, Options for the rendering of the pan control.
014       */
015      public final static PanControlOptions newInstance() {
016        return JavaScriptObject.createObject().cast();
017      }
018      
019      /**
020       * Options for the rendering of the pan control.
021       * use newInstance
022       */
023      protected PanControlOptions() {}
024      
025      /**
026       * Position id. Used to specify the position of the control on the map. The default position is TOP_LEFT.
027       */
028      public final ControlPosition getPosition() {
029        return ControlPosition.fromValue(getPositionImpl());
030      }
031      
032      private final native int getPositionImpl() /*-{
033        return this.position;
034      }-*/;
035      
036      /**
037       * Position id. Used to specify the position of the control on the map. The default position is TOP_LEFT.
038       * @param position {@link ControlPosition}
039       */
040      public final void setPosition(ControlPosition position) {
041        setPositionImpl(position.value());
042      }
043    
044      private final native void setPositionImpl(int position) /*-{
045        this.position = position;
046      }-*/;
047      
048    }