Class Dimension
java.lang.Object
com.codename1.ui.geom.Dimension
public class Dimension
extends java.lang.Object
Utility class that holds a width and height that represents a dimension of
a component or element
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanequals(java.lang.Object arg0) intReturn the height of the dimensionintgetWidth()Returns the width of the dimensioninthashCode()voidsetHeight(int height) Set the height of the dimensionvoidsetWidth(int width) Set the width of the dimensiontoString()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Constructor Details
-
Dimension
public Dimension()Creates a new instance of Dimension -
Dimension
Creates a new instance of Dimension with a predefine dimension
Parameters
d: Dimension to copy
-
Dimension
public Dimension(int width, int height) CCreates a new instance of Dimension with width and height
Parameters
-
width: the dimention width -
height: the dimention height
-
-
-
Method Details
-
getWidth
public int getWidth()Returns the width of the dimension
Returns
width of the dimension
-
setWidth
public void setWidth(int width) Set the width of the dimension
Parameters
width: the dimention width
-
getHeight
public int getHeight()Return the height of the dimension
Returns
height of the dimension
-
setHeight
public void setHeight(int height) Set the height of the dimension
Parameters
height: the dimention height
-
toString
- Overrides:
toStringin classjava.lang.Object
-
hashCode
public int hashCode()- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object arg0) - Overrides:
equalsin classjava.lang.Object
-