transformation

Class TransformationPanel

Implemented Interfaces:
ActionListener
Known Direct Subclasses:
AnalysePanel, SynthesisPanel

public abstract class TransformationPanel
extends JPanel
implements ActionListener

A TransformationPanel is a JPanel on which the multiresolution-animation is painted

Field Summary

static int
FAST
static int
MEDIUM
static int
SLOW
protected AnimatedGrid[]
animGrid
protected boolean
animateGrid
protected AnimatedArrow[]
arrow
protected boolean[]
arrowCheckTime
protected Color
backGreen
protected Color
backRed
protected int
counter
protected int
depth
protected Filter
filter
protected boolean[]
filterCheckTime
protected FontMetrics
fm
protected Font
font
protected boolean[]
gridCheckTime
protected int
height
protected Grid
signal
protected boolean
startTransform
protected Timer
timer
protected Grid[]
transformed
protected boolean[]
transformedCheckTime
protected int
width

Constructor Summary

TransformationPanel()

Method Summary

abstract void
drawAnimGrid(Graphics g)
draws an animated Grid
abstract void
drawNecessaryGrids(Graphics g)
void
paintComponent(Graphics g)
painting the Component
void
reset()
this method resets all variables to its standard value causing the beginning state
void
restartTimer(int[] counter)
void
setColors(Color backRed, Color backGreen, Color gridRed, Color gridGreen, Color signalRed)
this method sets the transformation colors
void
setFilter(Filter f)
this method sets a new Filter
void
setSpeed(int speed)
this method sets the speed of the transformation
void
startTimer()
void
startTransform(boolean b)
abstract void
startTransformation(Graphics g)
int[]
stopTimer()

Field Details

FAST

public static final int FAST
Field Value:
1

MEDIUM

public static final int MEDIUM
Field Value:
1000

SLOW

public static final int SLOW
Field Value:
2000

animGrid

protected AnimatedGrid[] animGrid

animateGrid

protected boolean animateGrid

arrow

protected AnimatedArrow[] arrow

arrowCheckTime

protected boolean[] arrowCheckTime

backGreen

protected Color backGreen

backRed

protected Color backRed

counter

protected int counter

depth

protected int depth

filter

protected Filter filter

filterCheckTime

protected boolean[] filterCheckTime

fm

protected FontMetrics fm

font

protected Font font

gridCheckTime

protected boolean[] gridCheckTime

height

protected int height

signal

protected Grid signal

startTransform

protected boolean startTransform

timer

protected Timer timer

transformed

protected Grid[] transformed

transformedCheckTime

protected boolean[] transformedCheckTime

width

protected int width

Constructor Details

TransformationPanel

public TransformationPanel()

Method Details

drawAnimGrid

public abstract void drawAnimGrid(Graphics g)
draws an animated Grid

drawNecessaryGrids

public abstract void drawNecessaryGrids(Graphics g)

paintComponent

public void paintComponent(Graphics g)
painting the Component

reset

public void reset()
this method resets all variables to its standard value causing the beginning state

restartTimer

public void restartTimer(int[] counter)

setColors

public void setColors(Color backRed,
                      Color backGreen,
                      Color gridRed,
                      Color gridGreen,
                      Color signalRed)
this method sets the transformation colors

setFilter

public void setFilter(Filter f)
this method sets a new Filter
Parameters:
f - new Filter-object which is to be set

setSpeed

public void setSpeed(int speed)
this method sets the speed of the transformation
Parameters:
speed - choose SLOW, MEDIUM or FAST to determin the speed

startTimer

public void startTimer()

startTransform

public void startTransform(boolean b)

startTransformation

public abstract void startTransformation(Graphics g)

stopTimer

public int[] stopTimer()