Interface Shape

All Known Implementing Classes:
ShapeImpl, Oval, Rectangle, Triangle, Line, TextShape
public interface Shape

All shapes implement this interface.

Version:
$Id: Shape.java,v 1.5 2001/04/25 17:21:18 administrator Exp $
Author:
Ben Dugan

Method Detail

setWindow

public void setWindow(GWindow gw)
Tell the shape that it belongs to the given window.

intersects

public boolean intersects(Shape other)
Return true if and only if this shape interesects with the provided shape.

paint

public void paint(java.awt.Graphics g)
Paint this shape onto the given graphics context.

move

public void move(int deltaX,
                 int deltaY)
Change this shape's position.
Parameters:
deltaX - offset in the X direction.
deltaY - offset in the Y direction.

getBoundingBox

public Rectangle getBoundingBox()
Answer the bounding box for this shape.

getColor

public java.awt.Color getColor()
Answer the color of this shape.

setColor

public void setColor(java.awt.Color c)
Set the color of this shape.