com.lamatek.tags.google
Class GoogleMapPolylineTag

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

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

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

Version:
0.40
Author:
Tom Cole

Constructor Summary
GoogleMapPolylineTag()
           
 
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 polyline.
 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

GoogleMapPolylineTag

public GoogleMapPolylineTag()
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.

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.

setWeight

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

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

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

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 polyline.

Parameters:
id - A unique identifier for this polyline.

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.

getColor

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

Returns:
A hexadecimal String representing a color.

getOpacity

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

Returns:
A float indicating opacity level.

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