cse115.graphics
Interface Locatable

All Known Subinterfaces:
CenterLocatable, ColorableGraphic, Graphic, MovingBody, Shape
All Known Implementing Classes:
AbstractColorableGraphic, AbstractGraphic, BouncingBall, BouncingSquare, BouncingTriangle, CompoundGraphic, Ellipse, Eye, Fish, Fish, FramedEllipse, FramedRectangle, Image, Mouth, MovingBodyAdapter, Oval, Painter, Polygon, Rectangle, Rectangle, Rectangle3D, Triangle

public interface Locatable

The interface that defines the capabilties for an object that can have its location accessed/mutated

Author:
Michael Kozelsky Created on: Jul 29, 2006 Locatable.java

Method Summary
 Point getLocation()
          Gets the location of this Object
 void move(Vector v)
          Moves the Object from one location to another by a specific vector
 void setLocation(Point p)
          Sets the Location of this Object to be the specified point
 

Method Detail

setLocation

void setLocation(Point p)
Sets the Location of this Object to be the specified point

Parameters:
p - the point at which to locate this Object

getLocation

Point getLocation()
Gets the location of this Object

Returns:
a java.awt.Point representing the current location of the Object

move

void move(Vector v)
Moves the Object from one location to another by a specific vector

Parameters:
v - The vector representing where this should move