You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

DatenHinzufuegen.java 981B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /*
  2. * To change this license header, choose License Headers in Project Properties.
  3. * To change this template file, choose Tools | Templates
  4. * and open the template in the editor.
  5. */
  6. package gui_adressverwaltung.Controller;
  7. import gui_adressverwaltung.Controller.Interface.CommandInterface;
  8. import gui_adressverwaltung.model.AdressverwaltungModel;
  9. import gui_adressverwaltung.view.Hauptfenster;
  10. /**
  11. *
  12. * @author nobody
  13. */
  14. public class DatenHinzufuegen implements CommandInterface
  15. {
  16. private AdressverwaltungModel model;
  17. private Hauptfenster view;
  18. public DatenHinzufuegen(AdressverwaltungModel model, Hauptfenster view)
  19. {
  20. this.model = model;
  21. this.view = view;
  22. }
  23. /**
  24. * Fühhrt den Befehl aus
  25. */
  26. @Override
  27. public void execute()
  28. {
  29. view.getLblStatus().setText("Zeile hinzugefügt");
  30. model.eintragHinzufuegen();
  31. }
  32. @Override
  33. public void undo()
  34. {
  35. }
  36. @Override
  37. public boolean isUndoable()
  38. {
  39. return false;
  40. }
  41. }