Follow us on GitHub

com.google.gwt.maps.client.overlays
Class Rectangle

java.lang.Object
  extended by com.google.gwt.core.client.JavaScriptObject
      extended by com.google.gwt.maps.client.mvc.MVCObject<Rectangle>
          extended by com.google.gwt.maps.client.overlays.Rectangle

public class Rectangle
extends MVCObject<Rectangle>

A rectangle overlay. This class extends MVCObject.

See Rectangle API Doc


Constructor Summary
protected Rectangle()
          use newInstance();
 
Method Summary
 HandlerRegistration addBoundsChangeHandler(BoundsChangeMapHandler handler)
           
 HandlerRegistration addClickHandler(ClickMapHandler handler)
          This event is fired when the DOM click event is fired on the Rectangle.
 HandlerRegistration addDblClickHandler(DblClickMapHandler handler)
          This event is fired when the DOM dblclick event is fired on the Rectangle.
 HandlerRegistration addMouseDownHandler(MouseDownMapHandler handler)
          This event is fired when the DOM mousedown event is fired on the Rectangle.
 HandlerRegistration addMouseMoveHandler(MouseMoveMapHandler handler)
          This event is fired when the DOM mousemove event is fired on the Rectangle.
 HandlerRegistration addMouseOutMoveHandler(MouseOutMapHandler handler)
          This event is fired on Rectangle mouseout.
 HandlerRegistration addMouseOverHandler(MouseOverMapHandler handler)
          This event is fired on Rectangle mouseover.
 HandlerRegistration addMouseUpHandler(MouseUpMapHandler handler)
          This event is fired when the DOM mouseup event is fired on the Rectangle.
 HandlerRegistration addRightClickHandler(RightClickMapHandler handler)
          This event is fired when the Rectangle is right-clicked on.
 LatLngBounds getBounds()
          Returns the bounds of this rectangle.
 boolean getEditable()
          Returns whether this rectangle can be edited by the user.
 MapWidget getMap()
          Returns the map on which this rectangle is displayed.
static Rectangle newInstance(RectangleOptions options)
          Create a rectangle using the passed RectangleOptions, which specify the bounds and style.
 void setEditable(boolean editable)
          If set to true, the user can edit this rectangle by dragging the control points shown at the corners and on each edge.
 void setMap(MapWidget mapWidget)
          Renders the rectangle on the specified map.
 void setOptions(RectangleOptions options)
          sets the Rectangle options
 
Methods inherited from class com.google.gwt.maps.client.mvc.MVCObject
bindTo, bindTo, bindTo, changed, createInstanceOfMVCObject, get, notify, set, setValues, unbind, unbindAll
 
Methods inherited from class com.google.gwt.core.client.JavaScriptObject
cast, createArray, createFunction, createObject, equals, hashCode, toSource, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Rectangle

protected Rectangle()
use newInstance();

Method Detail

newInstance

public static final Rectangle newInstance(RectangleOptions options)
Create a rectangle using the passed RectangleOptions, which specify the bounds and style.

Parameters:
options -

getBounds

public final LatLngBounds getBounds()
Returns the bounds of this rectangle.


getEditable

public final boolean getEditable()
Returns whether this rectangle can be edited by the user.


setMap

public final void setMap(MapWidget mapWidget)
Renders the rectangle on the specified map. If map is set to null, the rectangle will be removed.

Parameters:
mapWidget -

getMap

public final MapWidget getMap()
Returns the map on which this rectangle is displayed.


setEditable

public final void setEditable(boolean editable)
If set to true, the user can edit this rectangle by dragging the control points shown at the corners and on each edge.

Parameters:
editable -

setOptions

public final void setOptions(RectangleOptions options)
sets the Rectangle options

Parameters:
options -

addBoundsChangeHandler

public final HandlerRegistration addBoundsChangeHandler(BoundsChangeMapHandler handler)

addClickHandler

public final HandlerRegistration addClickHandler(ClickMapHandler handler)
This event is fired when the DOM click event is fired on the Rectangle.

Parameters:
handler -

addDblClickHandler

public final HandlerRegistration addDblClickHandler(DblClickMapHandler handler)
This event is fired when the DOM dblclick event is fired on the Rectangle.

Parameters:
handler -

addMouseDownHandler

public final HandlerRegistration addMouseDownHandler(MouseDownMapHandler handler)
This event is fired when the DOM mousedown event is fired on the Rectangle.

Parameters:
handler -

addMouseMoveHandler

public final HandlerRegistration addMouseMoveHandler(MouseMoveMapHandler handler)
This event is fired when the DOM mousemove event is fired on the Rectangle.

Parameters:
handler -

addMouseOutMoveHandler

public final HandlerRegistration addMouseOutMoveHandler(MouseOutMapHandler handler)
This event is fired on Rectangle mouseout.

Parameters:
handler -

addMouseOverHandler

public final HandlerRegistration addMouseOverHandler(MouseOverMapHandler handler)
This event is fired on Rectangle mouseover.

Parameters:
handler -

addMouseUpHandler

public final HandlerRegistration addMouseUpHandler(MouseUpMapHandler handler)
This event is fired when the DOM mouseup event is fired on the Rectangle.

Parameters:
handler -

addRightClickHandler

public final HandlerRegistration addRightClickHandler(RightClickMapHandler handler)
This event is fired when the Rectangle is right-clicked on.

Parameters:
handler -


Follow us on GitHub

Copyright © 2011-2012 Gone Vertical LLC. All Rights Reserved.