de.heineken.studienarbeit

Class Timer

Implemented Interfaces:
Runnable

(package private) class Timer
extends java.lang.Object
implements Runnable

Class Timer contains a counting unit with second rhythm

Field Summary

private JTextField
anzeigeText
private int
count
(package private) DecimalFormat
fmt
private boolean
mayrun
private int
min
private int
sek

Method Summary

int
getSeconds()
returns the amount of seconds, the timer has counted since starting
void
run()
Run declares the running algorithm
void
setAnzeigeText(JTextField jtf)
sets the reference of the text field that is being updated on every tick of the Timer to display the current amount of time.
void
setMayRun(boolean newValue)
decides if the actual counter is allowed to count on

Field Details

anzeigeText

private JTextField anzeigeText

count

private int count

fmt

(package private)  DecimalFormat fmt

mayrun

private boolean mayrun

min

private int min

sek

private int sek

Method Details

getSeconds

public int getSeconds()
returns the amount of seconds, the timer has counted since starting
Parameters:

run

public void run()
Run declares the running algorithm

setAnzeigeText

public void setAnzeigeText(JTextField jtf)
sets the reference of the text field that is being updated on every tick of the Timer to display the current amount of time.

setMayRun

public void setMayRun(boolean newValue)
decides if the actual counter is allowed to count on