com.mapquest
Class PolygonPrimitive

java.lang.Object
  extended bycom.mapquest.MQObject
      extended bycom.mapquest.Primitive
          extended bycom.mapquest.LinePrimitive
              extended bycom.mapquest.PolygonPrimitive
All Implemented Interfaces:
java.lang.Cloneable

public class PolygonPrimitive
extends LinePrimitive

Describes polygons to be placed on a map. The polygon is initially defined with a collection of points. These points are the X,Y coordinates of the vertices of the polygon. The coordinates are converted into a latitude/longitude points so the annotation can be placed in the same geographical location after the map is manipulated.

See Also:
ColorStyle, FillStyle

Field Summary
static int CLASS_ID
           
static java.lang.String CLASS_NAME
           
 
Fields inherited from class com.mapquest.MQObject
DEFAULT_ID, DEFAULT_NAME, DEFAULT_VERSION, FORMAT_NUMERIC_ID, FORMAT_TEXT_NAME, INVALID_ID, INVALID_NAME, INVALID_VERSION
 
Constructor Summary
PolygonPrimitive()
          Default constructor.
 
Method Summary
 boolean equals(java.lang.Object otherObject)
          Compares this object to the specified object.
 int getClassId()
          Returns the numeric id of this class.
 java.lang.String getClassName()
          Returns the text name of this class.
 ColorStyle getFillColor()
          Returns the current ColorStyle value of the fill color of the polygon.
 FillStyle getFillStyle()
          Returns the current value of the fill style of the polygon.
 int hashCode()
          Returns a hash code for this PolygonPrimitive.
 void init()
          Initializes object.
 void setFillColor(ColorStyle lColor)
          Sets the fill color of the polygon.
 void setFillStyle(FillStyle sStyle)
          Sets the fill style of the polygon.
 
Methods inherited from class com.mapquest.LinePrimitive
getColor, getLatLngs, getPoints, getStyle, getWidth, setColor, setLatLngs, setStyle, setWidth
 
Methods inherited from class com.mapquest.Primitive
getCoordinateType, getDrawTrigger, getKey, getOpacity, getTriggerDT, setCoordinateType, setDrawTrigger, setKey, setOpacity, setTriggerDT
 
Methods inherited from class com.mapquest.MQObject
clone, getFormat, getIdWithVersion, getNameWithVersion, getObjectVersion, getTypeId, getTypeName, getVerboseConsoleOutput, setFormat, setObjectVersion, setVerboseConsoleOutput, toString
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

CLASS_ID

public static final int CLASS_ID
See Also:
Constant Field Values

CLASS_NAME

public static final java.lang.String CLASS_NAME
See Also:
Constant Field Values
Constructor Detail

PolygonPrimitive

public PolygonPrimitive()
Default constructor.

Method Detail

init

public void init()
Initializes object.

Overrides:
init in class LinePrimitive

getClassId

public int getClassId()
Returns the numeric id of this class.

Overrides:
getClassId in class LinePrimitive
Returns:
the numeric id of this class.

getClassName

public java.lang.String getClassName()
Returns the text name of this class.

Overrides:
getClassName in class LinePrimitive
Returns:
the text name of this class.

setFillColor

public void setFillColor(ColorStyle lColor)
Sets the fill color of the polygon.

Parameters:
lColor - The ColorStyle value that the polygon fill color is to be set to

getFillColor

public ColorStyle getFillColor()
Returns the current ColorStyle value of the fill color of the polygon.

Returns:
The ColorStyle value of the data member representing the fill color of the polygon

setFillStyle

public void setFillStyle(FillStyle sStyle)
Sets the fill style of the polygon.

Parameters:
sStyle - The value that the polygon fill style is to be set to.

getFillStyle

public FillStyle getFillStyle()
Returns the current value of the fill style of the polygon.

Returns:
The value of the data member representing the fill style of the polygon

equals

public boolean equals(java.lang.Object otherObject)
Compares this object to the specified object. The result is true if and only if the argument is not null and is a PolygonPrimitive object that has same attributes as this object.

Overrides:
equals in class LinePrimitive
Parameters:
otherObject - the object to compare this PolygonPrimitive against.
Returns:
true if the PolygonPrimitive objects are equal; false otherwise.

hashCode

public int hashCode()
Returns a hash code for this PolygonPrimitive.

Overrides:
hashCode in class LinePrimitive
Returns:
a hash code value for this PolygonPrimitive.