wheels
Interface Locatable

All Known Implementing Classes:
Image, RectangularShape

public interface Locatable

Interface for objects that can have their location set and queried.

Author:
Sanders & van Dam. Object-Oriented Programming in Java.

Method Summary
 Point getLocation()
          Returns the object's location.
 int getXLocation()
          Returns the object's x location.
 int getYLocation()
          Returns the object's y location.
 void setLocation(int x, int y)
          Set object's location to given coordinates.
 void setLocation(Point p)
          Set object's location to given point.
 

Method Detail

setLocation

public void setLocation(int x,
                        int y)
Set object's location to given coordinates.


setLocation

public void setLocation(Point p)
Set object's location to given point.


getLocation

public Point getLocation()
Returns the object's location.


getXLocation

public int getXLocation()
Returns the object's x location.


getYLocation

public int getYLocation()
Returns the object's y location.