Class InsectFace

java.lang.Object
  extended byInsectFace
All Implemented Interfaces:
CritterFace

public class InsectFace
extends java.lang.Object
implements CritterFace


Constructor Summary
InsectFace(int w, int h)
          Initialize the variables needed for this PatternElement.
 
Method Summary
 void addTo(uwcse.graphics.GWindow gw)
          Add this pattern to a graphics window.
 void moveTo(int x, int y)
          Change this pattern's position.
 void removeFromWindow()
          Remove this pattern from the window it is shown in.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InsectFace

public InsectFace(int w,
                  int h)
Initialize the variables needed for this PatternElement.

Parameters:
w - width in pixels of the space available
h - height in pixels of the space available
Method Detail

addTo

public void addTo(uwcse.graphics.GWindow gw)
Description copied from interface: CritterFace
Add this pattern to a graphics window. The implementing class must go through all the Shape objects it controls and add them to the window using the Shape method addTo(GWindow gw).

Specified by:
addTo in interface CritterFace
Parameters:
gw - the graphics window to add this image to
See Also:
CritterFace.addTo(uwcse.graphics.GWindow)

removeFromWindow

public void removeFromWindow()
Description copied from interface: CritterFace
Remove this pattern from the window it is shown in. The implementing class must go through all the Shape objects it controls and remove them from the window using the Shape method removeFromWindow().

Specified by:
removeFromWindow in interface CritterFace
See Also:
CritterFace.removeFromWindow()

moveTo

public void moveTo(int x,
                   int y)
Description copied from interface: CritterFace
Change this pattern's position. x and y give the new position in pixels of the upper left corner of this pattern's bounding box.

Specified by:
moveTo in interface CritterFace
Parameters:
x - new X coordinate
y - new Y coordinate
See Also:
CritterFace.moveTo(int, int)