001 package com.google.gwt.maps.client.overlays; 002 003 import com.google.gwt.core.client.JavaScriptObject; 004 import com.google.gwt.maps.client.MapImpl; 005 import com.google.gwt.maps.client.MapWidget; 006 import com.google.gwt.maps.client.base.LatLngBounds; 007 008 /** 009 * {@link Rectangle} Options 010 * <br><br> 011 * See <a href="https://developers.google.com/maps/documentation/javascript/reference#RectangleOptions">RectangleOptions API Doc</a> 012 */ 013 public class RectangleOptions extends JavaScriptObject { 014 015 /** 016 * use newInstance(); 017 */ 018 protected RectangleOptions() {} 019 020 /** 021 * creates Rectangle options 022 */ 023 public final static RectangleOptions newInstance() { 024 return JavaScriptObject.createObject().cast(); 025 } 026 027 /** 028 * sets The bounds. 029 * @param bounds 030 */ 031 public final native void setBounds(LatLngBounds bounds) /*-{ 032 this.bounds = bounds; 033 }-*/; 034 035 /** 036 * gets The bounds. 037 */ 038 public final native LatLngBounds getBounds() /*-{ 039 return this.bounds; 040 }-*/; 041 042 /** 043 * sets Indicates whether this Polyline handles click events. Defaults to true. 044 * @param clickable 045 */ 046 public final native void setClickable(boolean clickable) /*-{ 047 this.clickable = clickable; 048 }-*/; 049 050 /** 051 * gets Indicates whether this Polyline handles click events. Defaults to true. 052 */ 053 public final native boolean getClickable() /*-{ 054 return this.clickable; 055 }-*/; 056 057 /** 058 * The fill color. All CSS3 colors are supported except for extended named colors. 059 * @param fillColor 060 */ 061 public final native void setFillColor(String fillColor) /*-{ 062 this.fillColor = fillColor; 063 }-*/; 064 065 /** 066 * The fill color. All CSS3 colors are supported except for extended named colors. 067 */ 068 public final native String getFillColor() /*-{ 069 return this.fillColor; 070 }-*/; 071 072 /** 073 * The fill opacity between 0.0 and 1.0 074 * @param fillOpacity 075 */ 076 public final native void setFillOpacity(double fillOpacity) /*-{ 077 this.fillOpacity = fillOpacity; 078 }-*/; 079 080 /** 081 * The fill opacity between 0.0 and 1.0 082 */ 083 public final native double getFillOpacity() /*-{ 084 return this.fillOpacity; 085 }-*/; 086 087 /** 088 * sets Map on which to display Polyline. 089 * @param mapWidget 090 */ 091 public final void setMap(MapWidget mapWidget) { 092 setMapImpl(mapWidget.getJso()); 093 } 094 095 private final native void setMapImpl(MapImpl map) /*-{ 096 this.map = map; 097 }-*/; 098 099 /** 100 * gets Map on which to display Polyline. 101 */ 102 public final MapWidget getMapWidget() { 103 return MapWidget.newInstance(getMapImpl()); 104 } 105 106 private final native MapImpl getMapImpl() /*-{ 107 return this.map; 108 }-*/; 109 110 /** 111 * sets The stroke color. All CSS3 colors are supported except for extended named colors. 112 * @param strokeColor 113 */ 114 public final native void setStrokeColor(String strokeColor) /*-{ 115 this.strokeColor = strokeColor; 116 }-*/; 117 118 /** 119 * gets The stroke color. All CSS3 colors are supported except for extended named colors. 120 */ 121 public final native String getStrokeColor() /*-{ 122 return this.strokeColor; 123 }-*/; 124 125 /** 126 * sets The stroke opacity between 0.0 and 1.0 127 * @param strokeOpacity 128 */ 129 public final native void setStrokeOpacity(double strokeOpacity) /*-{ 130 this.strokeOpacity = strokeOpacity; 131 }-*/; 132 133 /** 134 * gets The stroke opacity between 0.0 and 1.0 135 */ 136 public final native double getStrokeOpacity() /*-{ 137 return this.strokeOpacity; 138 }-*/; 139 140 /** 141 * sets The stroke width in pixels. 142 * @param strokeWeight 143 */ 144 public final native void setStrokeWeight(int strokeWeight) /*-{ 145 this.strokeWeight = strokeWeight; 146 }-*/; 147 148 /** 149 * gets The stroke width in pixels. 150 */ 151 public final native int getStrokeWeight() /*-{ 152 return this.strokeWeight; 153 }-*/; 154 155 /** 156 * sets The zIndex compared to other rectangles. 157 * @param zIndex 158 */ 159 public final native void setZindex(int zIndex) /*-{ 160 this.zIndex = zIndex; 161 }-*/; 162 163 /** 164 * gets The zIndex compared to other rectangles. 165 */ 166 public final native int getZindex() /*-{ 167 return this.zIndex; 168 }-*/; 169 }