Package totalcross.ui.gfx
Class Coord
- java.lang.Object
-
- totalcross.ui.gfx.Coord
-
public class Coord extends java.lang.ObjectCoord is a coordinate with x and y values.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object other)Returns true if the coordinates of this Coord and the given one are the sameinthashCode()Returns the hashcode: x<<16 | yintheight()return's y.java.lang.StringtoString()voidtranslate(int dx, int dy)Translates the current coordinate making x += dx and y += dyintwidth()return's x.
-
-
-
Method Detail
-
translate
public void translate(int dx, int dy)Translates the current coordinate making x += dx and y += dy
-
width
public int width()
return's x. just to make sense in getSize like methods
-
height
public int height()
return's y. just to make sense in getSize like methods
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
equals
public boolean equals(java.lang.Object other)
Returns true if the coordinates of this Coord and the given one are the same- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
Returns the hashcode: x<<16 | y- Overrides:
hashCodein classjava.lang.Object
-
-