|
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--java.awt.geom.Dimension2D
|
+--java.awt.Dimension
Safe:
| Field Summary | |
int |
height
Suppressed: The height dimension; negative values can be used. |
private static long |
serialVersionUID
|
int |
width
Suppressed: The width dimension; negative values can be used. |
| Constructor Summary | |
Dimension()
Enabled: Creates an instance of Dimension with a width
of zero and a height of zero. |
|
Dimension(Dimension d)
Suppressed: Creates an instance of Dimension whose width
and height are the same as for the specified dimension. |
|
Dimension(int width,
int height)
Enabled: Constructs a Dimension and initializes
it to the specified width and specified height. |
|
| Method Summary | |
boolean |
equals(Object obj)
Suppressed: Checks whether two dimension objects have equal values. |
double |
getHeight()
Enabled: Returns the height of this dimension in double precision. |
Dimension |
getSize()
Enabled: Gets the size of this Dimension object. |
double |
getWidth()
Enabled: Returns the width of this dimension in double precision. |
int |
hashCode()
Suppressed: Returns the hash code for this Dimension. |
private static void |
initIDs()
Initialize JNI field and method IDs |
void |
setSize(Dimension d)
Suppressed: Sets the size of this Dimension object to the specified size. |
void |
setSize(double width,
double height)
Enabled: Sets the size of this Dimension object to
the specified width and height in double precision. |
void |
setSize(int width,
int height)
Enabled: Sets the size of this Dimension object
to the specified width and height. |
String |
toString()
Suppressed: Returns a string representation of the values of this Dimension object's height and
width fields. |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
public int width
getSize(),
setSize(double, double)public int height
getSize(),
setSize(double, double)private static final long serialVersionUID
| Constructor Detail |
public Dimension()
Dimension with a width
of zero and a height of zero.
public Dimension(Dimension d)
Dimension whose width
and height are the same as for the specified dimension.
d - the specified dimension for the
width and
height values
public Dimension(int width,
int height)
Dimension and initializes
it to the specified width and specified height.
width - the specified widthheight - the specified height| Method Detail |
private static void initIDs()
public double getWidth()
getWidth in class java.awt.geom.Dimension2Dpublic double getHeight()
getHeight in class java.awt.geom.Dimension2D
public void setSize(double width,
double height)
Dimension object to
the specified width and height in double precision.
Note that if width or height
are larger than Integer.MAX_VALUE, they will
be reset to Integer.MAX_VALUE.
setSize in class java.awt.geom.Dimension2Dwidth - the new width for the Dimension objectheight - the new height for the Dimension objectpublic Dimension getSize()
Dimension object.
This method is included for completeness, to parallel the
getSize method defined by Component.
Dimension with the same width and heightjava.awt.Dimension#setSize,
java.awt.Component#getSizepublic void setSize(Dimension d)
Dimension object to the specified size.
This method is included for completeness, to parallel the
setSize method defined by Component.
d - the new size for this Dimension objectjava.awt.Dimension#getSize,
java.awt.Component#setSize
public void setSize(int width,
int height)
Dimension object
to the specified width and height.
This method is included for completeness, to parallel the
setSize method defined by Component.
width - the new width for this Dimension objectheight - the new height for this Dimension objectjava.awt.Dimension#getSize,
java.awt.Component#setSizepublic boolean equals(Object obj)
equals in class Objectobj - the reference object with which to compare.
true if this object is the same as the obj
argument; false otherwise.Object.hashCode(),
java.util.Hashtablepublic int hashCode()
Dimension.
hashCode in class ObjectDimensionjava.lang.Object#equals(java.lang.Object),
java.util.Hashtablepublic String toString()
Dimension object's height and
width fields. This method is intended to be used only
for debugging purposes, and the content and format of the returned
string may vary between implementations. The returned string may be
empty but may not be null.
toString in class ObjectDimension
object
|
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||