com.mapquest
Class ZoomToRect

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

public class ZoomToRect
extends MapCommand

Stores data to zoom to a rectangle specified with pixel coordinates.

See Also:
Point, ZoomToRectLatLng, ZoomToRect

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
ZoomToRect()
          Default constructor.
ZoomToRect(ZoomToRect copy)
          Copy 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.
 void getRect(Point UL, Point LR)
          Returns the upper left and lower right corners of this rectangle.
 int hashCode()
          Returns a hash code for this ZoomToRect.
 void init()
          Initializes object.
 void setRect(Point UpperLeft, Point LowerRight)
          Sets the upper left and lower right corners of the rectangle that is to be zoomed to.
 
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

ZoomToRect

public ZoomToRect()
Default constructor.


ZoomToRect

public ZoomToRect(ZoomToRect copy)
Copy constructor.

Parameters:
copy - The ZoomToRect object that is to be copied into this ZoomToRect object.
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.

setRect

public void setRect(Point UpperLeft,
                    Point LowerRight)
Sets the upper left and lower right corners of the rectangle that is to be zoomed to.

Parameters:
UpperLeft - The X,Y coordinates of the upper left corner of this rectangular zoom area.
LowerRight - The X,Y coordinates of the lower right corner of this rectangular zoom area.

getRect

public void getRect(Point UL,
                    Point LR)
Returns the upper left and lower right corners of this rectangle.

Parameters:
UL - The upper left corner of this rectangular zoom area.
LR - The lower right corner of this rectangular zoom area.

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

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

hashCode

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

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