|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.rim.device.api.ui.XYDimension
public final class XYDimension
Represents a dimension on a two dimensional, cartesian plane.
Typically, these objects are used to represent drawing positions or corners of drawing fields. In these cases, it's handy to remember that the point (0,0) represents the top, left-hand corner of a graphics extent, with increasing positive values describing the plane downwards and to the right.
XYRect
Field Summary | ||
---|---|---|
int |
height
Distance of point along vertical axis. |
|
int |
width
Distance of point along horizontal axis. |
Constructor Summary | ||
---|---|---|
XYDimension()
Creates a new XYDimension instance, but does not initialize it. |
||
XYDimension(int width,
int height)
Creates a new XYDimension instance with provided width and height. |
||
XYDimension(XYDimension dimension)
Creates a new XYDemension based on an existing dimension object. |
Method Summary | ||
---|---|---|
void |
reset()
Resets the Dimensions to (0,0). |
|
void |
set(int width,
int height)
Sets width and height for this dimension object. |
|
void |
set(XYDimension dimension)
Sets new data for this dimension object from provided dimension object. |
|
String |
toString()
Retrieves string version of this object's dimensions. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public int width
public int height
Constructor Detail |
---|
public XYDimension()
public XYDimension(int width, int height)
width
- Width for this new dimension object.height
- Height for this new dimension object.public XYDimension(XYDimension dimension)
width
- Width for this new dimension object.height
- Height for this new dimension object.Method Detail |
---|
public void set(int width, int height)
width
- New width for this dimension object.height
- New height for this dimension object.public void set(XYDimension dimension)
dimension
- Dimension object from which to clone width and height.public void reset()
public String toString()
Use this method to retrieve a string of this form:
+(width,height)
toString
in class Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright 1999-2011 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Java is a trademark of Oracle America Inc. in the US and other countries.
Legal