|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectJavaScriptObject
com.google.maps.gwt.client.MVCObject
com.google.maps.gwt.client.Polygon
public class Polygon
A polygon (like a polyline) defines a series of connected coordinates in an ordered sequence; additionally, polygons form a closed loop and define a filled region. THIS SOURCE CODE IS GENERATED, DO NOT MODIFY
Nested Class Summary | |
---|---|
static interface |
Polygon.ClickHandler
This event is fired when the DOM click event is fired on the Polygon. |
static interface |
Polygon.DblClickHandler
This event is fired when the DOM dblclick event is fired on the Polygon. |
static interface |
Polygon.MouseDownHandler
This event is fired when the DOM mousedown event is fired on the Polygon. |
static interface |
Polygon.MouseMoveHandler
This event is fired when the DOM mousemove event is fired on the Polygon. |
static interface |
Polygon.MouseOutHandler
This event is fired on Polygon mouseout. |
static interface |
Polygon.MouseOverHandler
This event is fired on Polygon mouseover. |
static interface |
Polygon.MouseUpHandler
This event is fired when the DOM mouseup event is fired on the Polygon. |
static interface |
Polygon.RightClickHandler
This event is fired when the Polygon is right-clicked on. |
Constructor Summary | |
---|---|
protected |
Polygon()
Protected constructor avoids default public constructor. |
Method Summary | |
---|---|
void |
addClickListener(Polygon.ClickHandler handler)
Adds the given listener function to the given event name for the given object instance. |
void |
addClickListenerOnce(Polygon.ClickHandler handler)
Like addListener, but the handler removes itself after handling the first event. |
void |
addDblClickListener(Polygon.DblClickHandler handler)
Adds the given listener function to the given event name for the given object instance. |
void |
addDblClickListenerOnce(Polygon.DblClickHandler handler)
Like addListener, but the handler removes itself after handling the first event. |
void |
addMouseDownListener(Polygon.MouseDownHandler handler)
Adds the given listener function to the given event name for the given object instance. |
void |
addMouseDownListenerOnce(Polygon.MouseDownHandler handler)
Like addListener, but the handler removes itself after handling the first event. |
void |
addMouseMoveListener(Polygon.MouseMoveHandler handler)
Adds the given listener function to the given event name for the given object instance. |
void |
addMouseMoveListenerOnce(Polygon.MouseMoveHandler handler)
Like addListener, but the handler removes itself after handling the first event. |
void |
addMouseOutListener(Polygon.MouseOutHandler handler)
Adds the given listener function to the given event name for the given object instance. |
void |
addMouseOutListenerOnce(Polygon.MouseOutHandler handler)
Like addListener, but the handler removes itself after handling the first event. |
void |
addMouseOverListener(Polygon.MouseOverHandler handler)
Adds the given listener function to the given event name for the given object instance. |
void |
addMouseOverListenerOnce(Polygon.MouseOverHandler handler)
Like addListener, but the handler removes itself after handling the first event. |
void |
addMouseUpListener(Polygon.MouseUpHandler handler)
Adds the given listener function to the given event name for the given object instance. |
void |
addMouseUpListenerOnce(Polygon.MouseUpHandler handler)
Like addListener, but the handler removes itself after handling the first event. |
void |
addRightClickListener(Polygon.RightClickHandler handler)
Adds the given listener function to the given event name for the given object instance. |
void |
addRightClickListenerOnce(Polygon.RightClickHandler handler)
Like addListener, but the handler removes itself after handling the first event. |
void |
clearClickListeners()
Removes all listeners for the given event for the given instance. |
void |
clearDblClickListeners()
Removes all listeners for the given event for the given instance. |
void |
clearInstanceListeners()
Removes all listeners for all events for the given instance. |
void |
clearMouseDownListeners()
Removes all listeners for the given event for the given instance. |
void |
clearMouseMoveListeners()
Removes all listeners for the given event for the given instance. |
void |
clearMouseOutListeners()
Removes all listeners for the given event for the given instance. |
void |
clearMouseOverListeners()
Removes all listeners for the given event for the given instance. |
void |
clearMouseUpListeners()
Removes all listeners for the given event for the given instance. |
void |
clearRightClickListeners()
Removes all listeners for the given event for the given instance. |
static Polygon |
create()
Create a polygon using the passed PolygonOptions
, which specify the polygon's path, the stroke style for the
polygon's edges, and the fill style for the polygon's interior
regions. |
static Polygon |
create(PolygonOptions opts)
Create a polygon using the passed PolygonOptions
, which specify the polygon's path, the stroke style for the
polygon's edges, and the fill style for the polygon's interior
regions. |
boolean |
getEditable()
Returns whether this shape can be edited by the user. |
GoogleMap |
getMap()
Returns the map on which this shape is attached. |
MVCArray<LatLng> |
getPath()
Retrieves the first path. |
MVCArray<MVCArray<LatLng>> |
getPaths()
Retrieves the paths for this polygon. |
boolean |
getVisible()
Returns whether this poly is visible on the map. |
void |
setEditable(boolean editable)
If set to true, the user can edit this shape by dragging the control points shown at the vertices and on each segment. |
void |
setMap(GoogleMap map)
Renders this shape on the specified map. |
void |
setOptions(PolygonOptions options)
|
void |
setPath(
Sets the first path. |
void |
setPath(MVCArray<LatLng> path)
Sets the first path. |
void |
setPaths(
Sets the path for this polygon. |
void |
setPaths(MVCArray<MVCArray<LatLng>> paths)
Sets the path for this polygon. |
void |
setVisible(boolean visible)
Hides this poly if set to false
. |
void |
triggerClick(JavaScriptObject... varargs)
Triggers the given event. |
void |
triggerDblClick(JavaScriptObject... varargs)
Triggers the given event. |
void |
triggerMouseDown(JavaScriptObject... varargs)
Triggers the given event. |
void |
triggerMouseMove(JavaScriptObject... varargs)
Triggers the given event. |
void |
triggerMouseOut(JavaScriptObject... varargs)
Triggers the given event. |
void |
triggerMouseOver(JavaScriptObject... varargs)
Triggers the given event. |
void |
triggerMouseUp(JavaScriptObject... varargs)
Triggers the given event. |
void |
triggerRightClick(JavaScriptObject... varargs)
Triggers the given event. |
Methods inherited from class com.google.maps.gwt.client.MVCObject |
---|
bindTo, bindTo, bindTo, bindTo, changed, get, notify, set, setValues, setValues, unbind, unbindAll |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected Polygon()
Method Detail |
---|
public static Polygon create(PolygonOptions opts)
PolygonOptions
, which specify the polygon's path, the stroke style for the
polygon's edges, and the fill style for the polygon's interior
regions. A polygon may contain one or more paths, where each path
consists of an array of
LatLng
s. You may pass either an array of LatLngs or an
MVCArray
of
LatLng
s when constructing these paths. Arrays are converted to
MVCArray
s within the polygon upon instantiation.
public static Polygon create()
PolygonOptions
, which specify the polygon's path, the stroke style for the
polygon's edges, and the fill style for the polygon's interior
regions. A polygon may contain one or more paths, where each path
consists of an array of
LatLng
s. You may pass either an array of LatLngs or an
MVCArray
of
LatLng
s when constructing these paths. Arrays are converted to
MVCArray
s within the polygon upon instantiation.
public final void addClickListener(Polygon.ClickHandler handler)
public final void addClickListenerOnce(Polygon.ClickHandler handler)
public final void addDblClickListener(Polygon.DblClickHandler handler)
public final void addDblClickListenerOnce(Polygon.DblClickHandler handler)
public final void addMouseDownListener(Polygon.MouseDownHandler handler)
public final void addMouseDownListenerOnce(Polygon.MouseDownHandler handler)
public final void addMouseMoveListener(Polygon.MouseMoveHandler handler)
public final void addMouseMoveListenerOnce(Polygon.MouseMoveHandler handler)
public final void addMouseOutListener(Polygon.MouseOutHandler handler)
public final void addMouseOutListenerOnce(Polygon.MouseOutHandler handler)
public final void addMouseOverListener(Polygon.MouseOverHandler handler)
public final void addMouseOverListenerOnce(Polygon.MouseOverHandler handler)
public final void addMouseUpListener(Polygon.MouseUpHandler handler)
public final void addMouseUpListenerOnce(Polygon.MouseUpHandler handler)
public final void addRightClickListener(Polygon.RightClickHandler handler)
public final void addRightClickListenerOnce(Polygon.RightClickHandler handler)
public final void clearClickListeners()
public final void clearDblClickListeners()
public final void clearInstanceListeners()
public final void clearMouseDownListeners()
public final void clearMouseMoveListeners()
public final void clearMouseOutListeners()
public final void clearMouseOverListeners()
public final void clearMouseUpListeners()
public final void clearRightClickListeners()
public final boolean getEditable()
public final GoogleMap getMap()
public final MVCArray<LatLng> getPath()
public final MVCArray<MVCArray<LatLng>> getPaths()
public final boolean getVisible()
public final void setEditable(boolean editable)
public final void setMap(GoogleMap map)
public final void setOptions(PolygonOptions options)
public final void setPath(MVCArray<LatLng> path)
PolylineOptions
for more details.
public final void setPath(path)
PolylineOptions
for more details.
public final void setPaths(MVCArray<MVCArray<LatLng>> paths)
public final void setPaths(paths)
public final void setVisible(boolean visible)
false
.
public final void triggerClick(JavaScriptObject... varargs)
public final void triggerDblClick(JavaScriptObject... varargs)
public final void triggerMouseDown(JavaScriptObject... varargs)
public final void triggerMouseMove(JavaScriptObject... varargs)
public final void triggerMouseOut(JavaScriptObject... varargs)
public final void triggerMouseOver(JavaScriptObject... varargs)
public final void triggerMouseUp(JavaScriptObject... varargs)
public final void triggerRightClick(JavaScriptObject... varargs)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |