org.gwtopenmaps.openlayers.client.handler
Class RegularPolygonHandlerOptions

java.lang.Object
  extended by org.gwtopenmaps.openlayers.client.util.JSObjectWrapper
      extended by org.gwtopenmaps.openlayers.client.handler.HandlerOptions
          extended by org.gwtopenmaps.openlayers.client.handler.RegularPolygonHandlerOptions

public class RegularPolygonHandlerOptions
extends HandlerOptions

Options which control the behavior of the RegularPolygonHandler

Author:
rhs - Roland.Schweitzer@noaa.gov

Constructor Summary
  RegularPolygonHandlerOptions()
           
protected RegularPolygonHandlerOptions(JSObject jsObject)
           
 
Method Summary
 void setIrregular(boolean irregular)
           
 void setPersist(boolean persist)
           
 void setRadius(float radius)
           
 void setSides(int sides)
           
 void setSnapAngle(float snapAngle)
           
 void setSnapToggle(String snapToggle)
           
 
Methods inherited from class org.gwtopenmaps.openlayers.client.handler.HandlerOptions
setKeyMask
 
Methods inherited from class org.gwtopenmaps.openlayers.client.util.JSObjectWrapper
getJSObject, setJSObject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RegularPolygonHandlerOptions

protected RegularPolygonHandlerOptions(JSObject jsObject)

RegularPolygonHandlerOptions

public RegularPolygonHandlerOptions()
Method Detail

setSides

public void setSides(int sides)
Parameters:
sides - Number of sides for the regular polygon. Needs to be greater than 2. Defaults to 4.

setRadius

public void setRadius(float radius)
Parameters:
radius - Optional radius in map units of the regular polygon. If this is set to some non-zero value, a polygon with a fixed radius will be drawn and dragged with mose movements. If this property is not set, dragging changes the radius of the polygon. Set to null by default.

setSnapAngle

public void setSnapAngle(float snapAngle)
Parameters:
snapAngle - If set to a non-zero value, the handler will snap the polygon rotation to multiples of the snapAngle. Value is an angle measured in degrees counterclockwise from the positive x-axis.

setSnapToggle

public void setSnapToggle(String snapToggle)

setPersist

public void setPersist(boolean persist)
Parameters:
persist - Leave the feature rendered until clear is called. Default is false. If set to true, the feature remains rendered until clear is called, typically by deactivating the handler or starting another drawing.

setIrregular

public void setIrregular(boolean irregular)
Parameters:
irregular - Draw an irregular polygon instead of a regular polygon. Default is false. If true, the initial mouse down will represent one corner of the polygon bounds and with each mouse movement, the polygon will be stretched so the opposite corner of its bounds follows the mouse position. This property takes precedence over the radius property. If set to true, the radius property will be ignored.


Copyright © 2011 sourceforge. All Rights Reserved.