123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- /*
- * 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 subscriber;
-
- import java.awt.event.ActionEvent;
- import java.awt.event.ActionListener;
-
- /**
- *
- * @author le
- */
- public class StartStopController implements ActionListener
- {
- private SubscriberView view;
- private Datenmodell3 model;
-
- public StartStopController(SubscriberView view, Datenmodell3 model)
- {
- this.view = view;
- this.model = model;
- }
-
- public void registerEvents()
- {
- view.getBtnStart().addActionListener(this);
- view.getBtnStop().addActionListener(this);
- }
-
- @Override
- public void actionPerformed(ActionEvent evt)
- {
- if (evt.getSource() == view.getBtnStart())
- {
- model.start();
- }
- else
- {
- model.stop();
- }
- }
- }
|