001 package com.google.gwt.maps.client.overlays; 002 003 import com.google.gwt.core.client.JavaScriptObject; 004 import com.google.gwt.core.client.JsArray; 005 import com.google.gwt.maps.client.MapImpl; 006 import com.google.gwt.maps.client.MapWidget; 007 import com.google.gwt.maps.client.base.LatLng; 008 import com.google.gwt.maps.client.mvc.MVCArray; 009 010 public class PolygonOptions extends JavaScriptObject { 011 012 protected PolygonOptions() {} 013 014 public final static PolygonOptions newInstance() { 015 return JavaScriptObject.createObject().cast(); 016 } 017 018 /** 019 * sets Indicates whether this Polyline handles click events. Defaults to true. 020 * @param clickable 021 */ 022 public final native void setClickable(boolean clickable) /*-{ 023 this.clickable = clickable; 024 }-*/; 025 026 /** 027 * gets Indicates whether this Polyline handles click events. Defaults to true. 028 */ 029 public final native boolean getClickable() /*-{ 030 return this.clickable; 031 }-*/; 032 033 /** 034 * The fill color. All CSS3 colors are supported except for extended named colors. 035 * @param fillColor 036 */ 037 public final native void setFillColor(String fillColor) /*-{ 038 this.fillColor = fillColor; 039 }-*/; 040 041 /** 042 * The fill color. All CSS3 colors are supported except for extended named colors. 043 */ 044 public final native String getFillColor() /*-{ 045 return this.fillColor; 046 }-*/; 047 048 /** 049 * The fill opacity between 0.0 and 1.0 050 * @param fillOpacity 051 */ 052 public final native void setFillOpacity(double fillOpacity) /*-{ 053 this.fillOpacity = fillOpacity; 054 }-*/; 055 056 /** 057 * The fill opacity between 0.0 and 1.0 058 */ 059 public final native double getFillOpacity() /*-{ 060 return this.fillOpacity; 061 }-*/; 062 063 /** 064 * sets When true, render each edge as a geodesic (a segment of a "great circle"). A geodesic is the shortest path between two points along the surface of the Earth. When false, render each edge as a straight line on screen. Defaults to false. 065 * @param geodesic 066 */ 067 public final native void setGeodesic(boolean geodesic) /*-{ 068 this.geodesic = geodesic; 069 }-*/; 070 071 /** 072 * gets When true, render each edge as a geodesic (a segment of a "great circle"). A geodesic is the shortest path between two points along the surface of the Earth. When false, render each edge as a straight line on screen. Defaults to false. 073 */ 074 public final native boolean getGeodesic() /*-{ 075 return this.geodesic; 076 }-*/; 077 078 /** 079 * Renders the Polygone on the map 080 * @param mapWidget 081 */ 082 public final void setMap(MapWidget mapWidget) { 083 setMapImpl(mapWidget.getJso()); 084 } 085 086 private final native void setMapImpl(MapImpl map) /*-{ 087 this.map = map; 088 }-*/; 089 090 /** 091 * gets Map on which to display Polyline. 092 */ 093 public final MapWidget getMapWidget() { 094 return MapWidget.newInstance(getMapImpl()); 095 } 096 097 private final native MapImpl getMapImpl() /*-{ 098 return this.map; 099 }-*/; 100 101 /** 102 * The ordered sequence of coordinates that designates a closed loop. Unlike polygons, a polygon may consist of one or more paths. As a result, the paths property may specify one or more arrays of LatLng coordinates. Simple polygons may be defined using a single array of LatLngs. More complex polygons may specify an array of arrays. Any simple arrays are convered into MVCArrays. Inserting or removing LatLngs from the MVCArray will automatically update the polygon on the map. 103 * @param paths 104 */ 105 public final native void setPaths(MVCArray<LatLng> paths) /*-{ 106 this.paths = paths; 107 }-*/; 108 109 public final native MVCArray<LatLng> getPaths_MVCArray() /*-{ 110 return this.paths; 111 }-*/; 112 113 /** 114 * The ordered sequence of coordinates that designates a closed loop. Unlike polygons, a polygon may consist of one or more paths. As a result, the paths property may specify one or more arrays of LatLng coordinates. Simple polygons may be defined using a single array of LatLngs. More complex polygons may specify an array of arrays. Any simple arrays are convered into MVCArrays. Inserting or removing LatLngs from the MVCArray will automatically update the polygon on the map. 115 * @param paths 116 */ 117 public final native void setPathss(MVCArray<MVCArray<LatLng>> paths) /*-{ 118 this.paths = paths; 119 }-*/; 120 121 public final native MVCArray<MVCArray<LatLng>> getPathss_MVCArray() /*-{ 122 return this.paths; 123 }-*/; 124 125 /** 126 * The ordered sequence of coordinates that designates a closed loop. Unlike polygons, a polygon may consist of one or more paths. As a result, the paths property may specify one or more arrays of LatLng coordinates. Simple polygons may be defined using a single array of LatLngs. More complex polygons may specify an array of arrays. Any simple arrays are convered into MVCArrays. Inserting or removing LatLngs from the MVCArray will automatically update the polygon on the map. 127 * @param paths 128 */ 129 public final native void setPaths(JsArray<LatLng> paths) /*-{ 130 this.paths = paths; 131 }-*/; 132 133 public final native JsArray<LatLng> getPaths_JsArray() /*-{ 134 return this.paths; 135 }-*/; 136 137 /** 138 * The ordered sequence of coordinates that designates a closed loop. Unlike polygons, a polygon may consist of one or more paths. As a result, the paths property may specify one or more arrays of LatLng coordinates. Simple polygons may be defined using a single array of LatLngs. More complex polygons may specify an array of arrays. Any simple arrays are convered into MVCArrays. Inserting or removing LatLngs from the MVCArray will automatically update the polygon on the map. 139 * @param paths 140 */ 141 public final native void setPathss(JsArray<JsArray<LatLng>> paths) /*-{ 142 this.paths = paths; 143 }-*/; 144 145 public final native JsArray<JsArray<LatLng>> getPathss_JsArray() /*-{ 146 return this.paths; 147 }-*/; 148 149 /** 150 * sets The stroke color. All CSS3 colors are supported except for extended named colors. 151 * @param strokeColor 152 */ 153 public final native void setStrokeColor(String strokeColor) /*-{ 154 this.strokeColor = strokeColor; 155 }-*/; 156 157 /** 158 * gets The stroke color. All CSS3 colors are supported except for extended named colors. 159 */ 160 public final native String getStrokeColor() /*-{ 161 return this.strokeColor; 162 }-*/; 163 164 /** 165 * sets The stroke opacity between 0.0 and 1.0 166 * @param strokeOpacity 167 */ 168 public final native void setStrokeOpacity(double strokeOpacity) /*-{ 169 this.strokeOpacity = strokeOpacity; 170 }-*/; 171 172 /** 173 * gets The stroke opacity between 0.0 and 1.0 174 */ 175 public final native double getStrokeOpacity() /*-{ 176 return this.strokeOpacity; 177 }-*/; 178 179 /** 180 * sets The stroke width in pixels. 181 * @param strokeWeight 182 */ 183 public final native void setStrokeWeight(int strokeWeight) /*-{ 184 this.strokeWeight = strokeWeight; 185 }-*/; 186 187 /** 188 * gets The stroke width in pixels. 189 */ 190 public final native int getStrokeWeight() /*-{ 191 return this.strokeWeight; 192 }-*/; 193 194 /** 195 * sets The zIndex compared to other polys. 196 * @param zIndex 197 */ 198 public final native void setZindex(int zIndex) /*-{ 199 this.zIndex = zIndex; 200 }-*/; 201 202 /** 203 * gets The zIndex compared to other polys. 204 */ 205 public final native int getZindex() /*-{ 206 return this.zIndex; 207 }-*/; 208 209 }