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.

CommandNewKontaktCancel.java 765B

12345678910111213141516171819202122232425262728293031323334353637383940
  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 kontakte.controller;
  7. import kontakte.model.Model;
  8. import kontakte.view.View;
  9. /**
  10. *
  11. * @author nobody
  12. */
  13. public class CommandNewKontaktCancel implements CommandInterface
  14. {
  15. private View view;
  16. private Model model;
  17. public CommandNewKontaktCancel(View view, Model model)
  18. {
  19. this.view = view;
  20. this.model = model;
  21. }
  22. @Override
  23. public void execute()
  24. {
  25. view.getTextName().setText("");
  26. view.getTextCity().setText("");
  27. view.getTextStreet().setText("");
  28. view.getAddEntryFrame().dispose();
  29. }
  30. @Override
  31. public void undo()
  32. {
  33. }
  34. }