1
0

Remove update method

This commit is contained in:
Victor 2014-03-16 13:35:33 +02:00
parent 1f273cd614
commit 480263c78f

View File

@ -28,16 +28,9 @@ public abstract class DoubleBufferedCanvas extends Canvas implements MouseListen
buffer = new BufferedImage(Constants.WIDTH, Constants.HEIGHT, BufferedImage.TYPE_INT_RGB); buffer = new BufferedImage(Constants.WIDTH, Constants.HEIGHT, BufferedImage.TYPE_INT_RGB);
G = buffer.createGraphics(); G = buffer.createGraphics();
thread = new DrawingThread(); thread = new DrawingThread();
}
public void start() {
thread.start(); thread.start();
} }
public void stop() {
thread.keepRunning = false;
}
@Override @Override
public void paint(Graphics g) { public void paint(Graphics g) {
draw(G); draw(G);
@ -51,8 +44,6 @@ public abstract class DoubleBufferedCanvas extends Canvas implements MouseListen
protected abstract void draw(Graphics2D g); protected abstract void draw(Graphics2D g);
protected abstract void update();
protected abstract void mousePressed(int x, int y); protected abstract void mousePressed(int x, int y);
protected abstract void mouseReleased(int x, int y); protected abstract void mouseReleased(int x, int y);
@ -97,7 +88,6 @@ public abstract class DoubleBufferedCanvas extends Canvas implements MouseListen
@Override @Override
public void run() { public void run() {
while (keepRunning) { while (keepRunning) {
update();
try { try {
Thread.sleep(25); Thread.sleep(25);
} catch (InterruptedException ex) {} } catch (InterruptedException ex) {}