123456789101112131415161718192021222324252627282930313233343536373839 |
- /*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
- */
-
- package controller;
-
- import java.util.Observable;
- import java.util.Observer;
- import model.Model;
- import view.View;
-
- /**
- *
- * @author nobody
- */
- public class EieruhrController implements Observer
- {
- private View view;
- private Model model;
-
- public EieruhrController(View view, Model model)
- {
- this.view = view;
- this.model = model;
- }
-
- public void registerEvents()
- {
- model.addObserver(this);
- }
-
- @Override
- public void update(Observable o, Object arg)
- {
- view.getLblCounter().setText(Integer.toString(model.getZahl()));
- }
- }
|