com.mapquest
Class Pan

java.lang.Object
  extended bycom.mapquest.MQObject
      extended bycom.mapquest.MapCommand
          extended bycom.mapquest.Pan
All Implemented Interfaces:
java.lang.Cloneable

public class Pan
extends MapCommand

Stores data to center the map on a given point without changing its scale. Setting the X,Y coordinates moves the map viewport that number of pixels left or right and up or down.

See Also:
Point

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
Pan()
          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.
 int hashCode()
          Returns a hash code for this Pan.
 void init()
          Initializes object.
 void setDeltaX(int x)
          Sets the Delta X variable, which is the number of pixels that the map viewport is to be moved in the horizontal direction.
 void setDeltaXY(int x, int y)
          Sets the Delta X and Delta Y variables, which are the number of pixels that the map viewport is to be moved in the horizontal and vertical direction respectively.
 void setDeltaY(int y)
          Sets the Delta Y variable, which is the number of pixels that the map viewport is to be moved in the vertical direction.
 
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

Pan

public Pan()
Default constructor.

Method Detail

init

public void init()
Initializes object.

Overrides:
init in class MapCommand

getClassId

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

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

getClassName

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

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

setDeltaX

public void setDeltaX(int x)
Sets the Delta X variable, which is the number of pixels that the map viewport is to be moved in the horizontal direction.

Parameters:
x - The number of pixels that the map viewport is to be moved in the horizontal direction. Negative indicates movement to the left, positive to the right.

setDeltaY

public void setDeltaY(int y)
Sets the Delta Y variable, which is the number of pixels that the map viewport is to be moved in the vertical direction.

Parameters:
y - The number of pixels that the map viewport is to be moved in the vertical direction. Negative indicates movement upward, positive downward.

setDeltaXY

public void setDeltaXY(int x,
                       int y)
Sets the Delta X and Delta Y variables, which are the number of pixels that the map viewport is to be moved in the horizontal and vertical direction respectively.

Parameters:
x - The number of pixels that the map viewport is to be moved in the horizontal direction. Negative indicates movement to the left, positive to the right.
y - The number of pixels that the map viewport is to be moved in the vertical direction. Negative indicates movement upward, positive downward.

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

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

hashCode

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

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