transformation

Class AnimatedGrid

Implemented Interfaces:
ActionListener

public class AnimatedGrid
extends java.lang.Object
implements ActionListener

Field Summary

private int
counter
private boolean
finished
private boolean
firstTime
private Grid
grid
private Point
p1
private JPanel
panel
private Timer
t
private int
yEnd

Constructor Summary

AnimatedGrid(Grid g, JPanel p)

Method Summary

void
actionPerformed(ActionEvent e)
void
drawAnimatedGrid(Graphics g, Point p1, int yEnd)
void
drawAnimatedGrid(Graphics g, int yEnd)
boolean
finished()
boolean
isRunning()
void
reset()
void
restartTimer()
void
stopTimer()

Field Details

counter

private int counter

finished

private boolean finished

firstTime

private boolean firstTime

grid

private Grid grid

p1

private Point p1

panel

private JPanel panel

t

private Timer t

yEnd

private int yEnd

Constructor Details

AnimatedGrid

public AnimatedGrid(Grid g,
                    JPanel p)

Method Details

actionPerformed

public void actionPerformed(ActionEvent e)

drawAnimatedGrid

public void drawAnimatedGrid(Graphics g,
                             Point p1,
                             int yEnd)

drawAnimatedGrid

public void drawAnimatedGrid(Graphics g,
                             int yEnd)

finished

public boolean finished()

isRunning

public boolean isRunning()

reset

public void reset()

restartTimer

public void restartTimer()

stopTimer

public void stopTimer()