org.opensourcephysics.sip.ch03
Class PixelRectangle

java.lang.Object
  extended by org.opensourcephysics.sip.ch03.PixelRectangle
All Implemented Interfaces:
Drawable

public class PixelRectangle
extends java.lang.Object
implements Drawable

PixelRectangle demonstrates how to draw an object using the AWT drawing API.


Method Summary
 void draw(DrawingPanel panel, java.awt.Graphics g)
          Draws this rectangle using the AWT drawing API.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

draw

public void draw(DrawingPanel panel,
                 java.awt.Graphics g)
Draws this rectangle using the AWT drawing API. Required to implement the Drawable interface.

Specified by:
draw in interface Drawable
Parameters:
panel - DrawingPanel
g - Graphics