org.gwtopenmaps.openlayers.client.handler
Class RegularPolygonHandlerOptions
java.lang.Object
org.gwtopenmaps.openlayers.client.util.JSObjectWrapper
org.gwtopenmaps.openlayers.client.handler.HandlerOptions
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
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RegularPolygonHandlerOptions
protected RegularPolygonHandlerOptions(JSObject jsObject)
RegularPolygonHandlerOptions
public RegularPolygonHandlerOptions()
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.