123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- /*
- * 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 commands;
-
- import java.io.File;
- import java.util.prefs.Preferences;
- import model.model;
- import view.gui;
-
- /**
- * Add Command
- * @author matthias
- */
- public class CommandAdd implements CommandInterface {
- private File data;
- private gui g;
- private model mdl;
- private Preferences prfs;
- private String pid;
-
-
- public CommandAdd(gui G, Preferences p, model mdl, String pid)
- {
- this.g = G;
- this.mdl = mdl;
- this.prfs = p;
- this.pid = pid;
- this.data = null;
- }
-
- /**
- * overrides execute vom CommandInterface
- * hier wird eintragHinzufügen vom Model aufgerufen
- */
- @Override
- public void execute() {
- try
- {
- this.mdl.eintragHinzufuegen();
- }
- catch(Exception ex)
- {
- System.err.println(ex);
- }
- //System.out.println(this.pref.get(PATH_ID, "xyz"));
-
-
- }
-
- @Override
- public void undo() {
- }
-
- }
|