Class DrawingPanel

java.lang.Object
  extended by DrawingPanel
All Implemented Interfaces:
java.awt.event.ActionListener, java.util.EventListener

public class DrawingPanel
extends java.lang.Object
implements java.awt.event.ActionListener


Constructor Summary
DrawingPanel(int width, int height)
           
DrawingPanel(int width, int height, java.lang.String panelTitle)
           
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
           
 void addKeyListener(java.awt.event.KeyListener listener)
           
 void close()
           
 int getClickX()
           
 int getClickY()
           
 java.awt.Graphics2D getGraphics()
           
 int getHeight()
           
 int getMouseX()
           
 int getMouseY()
           
 int getWidth()
           
 boolean mousePressed()
           
 void setBackground(java.awt.Color c)
           
 void setVisible(boolean visible)
           
 void sleep(int millis)
           
 void toFront()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DrawingPanel

public DrawingPanel(int width,
                    int height)

DrawingPanel

public DrawingPanel(int width,
                    int height,
                    java.lang.String panelTitle)
Method Detail

addKeyListener

public void addKeyListener(java.awt.event.KeyListener listener)

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
Specified by:
actionPerformed in interface java.awt.event.ActionListener

getGraphics

public java.awt.Graphics2D getGraphics()

setBackground

public void setBackground(java.awt.Color c)

setVisible

public void setVisible(boolean visible)

sleep

public void sleep(int millis)

close

public void close()

toFront

public void toFront()

getWidth

public int getWidth()

getHeight

public int getHeight()

getMouseX

public int getMouseX()

getMouseY

public int getMouseY()

getClickX

public int getClickX()

getClickY

public int getClickY()

mousePressed

public boolean mousePressed()