public final class ScreenLocation
extends java.lang.Object
ScreenLocation
class provides a structure that holds a location on the screen.
Note that this class can not be subclassed!
Modifier and Type | Field and Description |
---|---|
int |
fX
The column of the screen location.
|
int |
fY
The row of the screen location.
|
Constructor and Description |
---|
ScreenLocation()
Constructs a
ScreenLocation object equal to (0,0). |
ScreenLocation(int x,
int y)
Constructs a
ScreenLocation object equal to the specified location. |
Modifier and Type | Method and Description |
---|---|
static void |
forcePartialOrder(ScreenLocation s1,
ScreenLocation s2)
Forces a partial order on two screen locations s1 and s2 such that (s1X,s1Y) ≤ (s2X,s2Y).
|
void |
set(int x,
int y)
Sets the value for this
ScreenLocation to a specified location. |
java.lang.String |
toString()
Returns a
String representation of this ScreenLocation |
public int fX
public int fY
public ScreenLocation()
ScreenLocation
object equal to (0,0).public ScreenLocation(int x, int y)
ScreenLocation
object equal to the specified location.x
- the column corresponding to the screen locationy
- the row corresponding to the screen locationpublic static void forcePartialOrder(ScreenLocation s1, ScreenLocation s2)
s1
- the first screen locations2
- the second screen locationpublic void set(int x, int y)
ScreenLocation
to a specified location.x
- the column corresponding to the screen locationy
- the row corresponding to the screen locationpublic java.lang.String toString()
String
representation of this ScreenLocation
toString
in class java.lang.Object
String
representation of this ScreenLocation