|
|
|
|
|
|
|
|
|
|
|
|
|
|
package EierUhrKomponente; |
|
|
package EierUhrKomponente; |
|
|
|
|
|
|
|
|
|
|
|
import java.awt.Dimension; |
|
|
import java.awt.Graphics; |
|
|
import java.awt.Graphics; |
|
|
import java.net.Socket; |
|
|
import java.net.Socket; |
|
|
import java.util.concurrent.CopyOnWriteArrayList; |
|
|
import java.util.concurrent.CopyOnWriteArrayList; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
public void paintComponent(Graphics g) |
|
|
public void paintComponent(Graphics g) |
|
|
{ |
|
|
{ |
|
|
view.paintComponent(g); |
|
|
view.paintComponent(g); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public void Start(int zahl) |
|
|
public void Start(int zahl) |
|
|
{ |
|
|
{ |
|
|
ctrl.start(zahl); |
|
|
ctrl.start(zahl); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public int getZahl() |
|
|
public int getZahl() |
|
|
{ |
|
|
{ |
|
|
return ctrl.getZahl(); |
|
|
return ctrl.getZahl(); |
|
|
|
|
|
|
|
|
{ |
|
|
{ |
|
|
listenerListe.forEach(listener -> listener.timeIsOver(evt)); |
|
|
listenerListe.forEach(listener -> listener.timeIsOver(evt)); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public synchronized void addEierUhrListener(EierUhrListener listener) |
|
|
public synchronized void addEierUhrListener(EierUhrListener listener) |
|
|
{ |
|
|
{ |
|
|
listenerListe.add(listener); |
|
|
listenerListe.add(listener); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public synchronized void removeEierUhrListener(EierUhrListener listener) |
|
|
public synchronized void removeEierUhrListener(EierUhrListener listener) |
|
|
{ |
|
|
{ |
|
|
listenerListe.remove(listener); |
|
|
listenerListe.remove(listener); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
public Dimension getMinimumSize() |
|
|
|
|
|
{ |
|
|
|
|
|
return new Dimension(200, 150); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
public Dimension getPreferredSize() |
|
|
|
|
|
{ |
|
|
|
|
|
return new Dimension(200, 150); |
|
|
|
|
|
} |
|
|
} |
|
|
} |