com.lamatek.tags.google
Class GoogleMapPolygonTag

java.lang.Object
  extended by TagSupport
      extended by com.lamatek.tags.google.GoogleMapPolygonTag
All Implemented Interfaces:
GoogleMapEventListener, java.io.Serializable

public class GoogleMapPolygonTag
extends TagSupport
implements java.io.Serializable, GoogleMapEventListener

GoogleMapPolygonTag This class represents a <googlemaps;polygon> tag. Developers should not subclass or override this class or it's methods.

Version:
0.40
Author:
Tom Cole

Constructor Summary
GoogleMapPolygonTag()
           
 
Method Summary
 void addEvent(GoogleMapEventTag event)
          Adds an event listener to this overlay.
 int doStartTag()
          Overrides doStartTag() in TagSupport.
 java.lang.String getColor()
          Returns the color used to draw this line, in hexadecimal format.
 java.util.Vector getEvents()
          Returns the list of currently registered event listeners for this overlay.
 java.lang.String getId()
          Returns this overlays unique id.
 float getOpacity()
          Returns the current opacity level (0-1) of the line.
 java.lang.String getPoint(int p)
          Returns the point located at the given iteration.
 java.lang.String getPointlist()
          Returns a comma separated list of point ids that generate this line.
 int getWeight()
          Returns the current width (in pixels) if the line.
 int pointCount()
          Returns the number of points that make up this line or 0 if none are specified.
 void setColor(java.lang.String color)
          Sets the color used to draw this overlay.
 void setId(java.lang.String id)
          Set the unique id for this polygon.
 void setOpacity(float opacity)
          Sets the 0-1 based opacity of the line.
 void setPointlist(java.lang.String pointlist)
          Sets the list of point ids that will makeup this line.
 void setWeight(int weight)
          Sets the weight (width) of the line in pixels.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GoogleMapPolygonTag

public GoogleMapPolygonTag()
Method Detail

doStartTag

public int doStartTag()
Overrides doStartTag() in TagSupport. Developers should not override this method. If they do, they must call super.doStartTag() to ensure the tag get added to the tree properly.


setColor

public void setColor(java.lang.String color)
Sets the color used to draw this overlay. Default is #ff0000.

Parameters:
color - The color code in hexadecimal format.

setWeight

public void setWeight(int weight)
Sets the weight (width) of the line in pixels.

Parameters:
weight - An int specifying line width in pixels.

getOpacity

public float getOpacity()
Returns the current opacity level (0-1) of the line.

Returns:
A float indicating opacity level.

setOpacity

public void setOpacity(float opacity)
Sets the 0-1 based opacity of the line. 0 is invisible, 1 is fully opaque.

Parameters:
opacity - A float from 0-1.

getPointlist

public java.lang.String getPointlist()
Returns a comma separated list of point ids that generate this line.

Returns:
A comma separated list of point ids, in order.

setPointlist

public void setPointlist(java.lang.String pointlist)
Sets the list of point ids that will makeup this line. The point ids should be specified in a comma separated list, in the order the line is to render.

For example: point1, point3, point5, point7

Parameters:
pointlist - A comma separated list of point names, in order.

pointCount

public int pointCount()
Returns the number of points that make up this line or 0 if none are specified.

Returns:
Number of points in the line, or 0.

getPoint

public java.lang.String getPoint(int p)
Returns the point located at the given iteration. Points are stored in order to ensure the line is consistent between renderings.

Parameters:
int - The iteration to lookup
Returns:
The point's id

getColor

public java.lang.String getColor()
Returns the color used to draw this line, in hexadecimal format.

Returns:
A hexadecimal String representing a color.

getWeight

public int getWeight()
Returns the current width (in pixels) if the line.

Returns:
An int representing line width (in pixels).

addEvent

public void addEvent(GoogleMapEventTag event)
Adds an event listener to this overlay.

Specified by:
addEvent in interface GoogleMapEventListener
Parameters:
event - A GoogleMapEventTag

getEvents

public java.util.Vector getEvents()
Returns the list of currently registered event listeners for this overlay.

Specified by:
getEvents in interface GoogleMapEventListener
Returns:
A Vector of GoogleMapEventTags

getId

public java.lang.String getId()
Returns this overlays unique id.

Returns:
The unique id of this overlay.

setId

public void setId(java.lang.String id)
Set the unique id for this polygon.

Parameters:
id - A unique identifier for this polygon.