com.mapquest
Class Primitive

java.lang.Object
  extended bycom.mapquest.MQObject
      extended bycom.mapquest.Primitive
All Implemented Interfaces:
java.lang.Cloneable
Direct Known Subclasses:
LinePrimitive, RectanglePrimitive, SymbolPrimitive, TextPrimitive

public abstract class Primitive
extends MQObject

The base class for drawing objects that can be added to the map.

See Also:
CoordinateType, DrawTrigger

Field Summary
 
Fields inherited from class com.mapquest.MQObject
CLASS_ID, CLASS_NAME, DEFAULT_ID, DEFAULT_NAME, DEFAULT_VERSION, FORMAT_NUMERIC_ID, FORMAT_TEXT_NAME, INVALID_ID, INVALID_NAME, INVALID_VERSION
 
Constructor Summary
Primitive()
          Default constructor.
 
Method Summary
 boolean equals(java.lang.Object otherObject)
          Compares this object to the specified object.
 CoordinateType getCoordinateType()
          Returns the value of the Coordinate Type member.
 DrawTrigger getDrawTrigger()
          Returns the value of the draw trigger member.
 java.lang.String getKey()
          Returns the Key member.
 long getOpacity()
          Opacity of the primitve 0-255, 0 being invisible, 255 being opaque 255 or opaque is default.
 DefaultTrigger getTriggerDT()
          Deprecated. Use getDrawTrigger() instead.
 int hashCode()
          Returns a hash code for this Primitive.
 void init()
          Initializes object.
 void setCoordinateType(CoordinateType coordinateType)
          Sets the coordinate type for this primitive.
 void setDrawTrigger(DrawTrigger drawTrigger)
          Sets the trigger for order of drawing primitives on a map.
 void setKey(java.lang.String sKey)
          Sets the key.
 void setOpacity(long lOpacity)
          Opacity of the primitve 0-255, 0 being invisible, 255 being opaque 255 or opaque is default.
 void setTriggerDT(DefaultTrigger lTriggerDT)
          Deprecated. Use setDrawTrigger(DrawTrigger) instead.
 
Methods inherited from class com.mapquest.MQObject
clone, getClassId, getClassName, getFormat, getIdWithVersion, getNameWithVersion, getObjectVersion, getTypeId, getTypeName, getVerboseConsoleOutput, setFormat, setObjectVersion, setVerboseConsoleOutput, toString
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Primitive

public Primitive()
Default constructor.

Method Detail

init

public void init()
Initializes object.

Overrides:
init in class MQObject

setKey

public void setKey(java.lang.String sKey)
Sets the key.

Parameters:
sKey - The new key to be assigned to this object.

getKey

public java.lang.String getKey()
Returns the Key member.

Returns:
The current value for the key of this object.

setDrawTrigger

public void setDrawTrigger(DrawTrigger drawTrigger)
Sets the trigger for order of drawing primitives on a map.

Parameters:
drawTrigger - The new value assigned to the draw trigger member.

setTriggerDT

public void setTriggerDT(DefaultTrigger lTriggerDT)
Deprecated. Use setDrawTrigger(DrawTrigger) instead.

Sets the Trigger DT for order of drawing primitives on a map.

Parameters:
lTriggerDT - The new value assigned to the Trigger DT member.

getDrawTrigger

public DrawTrigger getDrawTrigger()
Returns the value of the draw trigger member.

Returns:
the current value for the draw trigger member.

getTriggerDT

public DefaultTrigger getTriggerDT()
Deprecated. Use getDrawTrigger() instead.

Returns the value of the Trigger DT member.

Returns:
The current value for the Trigger DT member.

setCoordinateType

public void setCoordinateType(CoordinateType coordinateType)
Sets the coordinate type for this primitive.

Parameters:
coordinateType - The new value assigned to the Coordinate Type member.

getCoordinateType

public CoordinateType getCoordinateType()
Returns the value of the Coordinate Type member.

Returns:
The current value for the Coordinate Type member

setOpacity

public void setOpacity(long lOpacity)
Opacity of the primitve 0-255, 0 being invisible, 255 being opaque 255 or opaque is default.

Parameters:
lOpacity - The transparency value.

getOpacity

public long getOpacity()
Opacity of the primitve 0-255, 0 being invisible, 255 being opaque 255 or opaque is default.

Returns:
The transparency value.

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 Primitive object that has same attributes as this object.

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

hashCode

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

Overrides:
hashCode in class MQObject
Returns:
a hash code value for this Primitive.