1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- /*
- * 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 commands.CommandInvoker;
- import java.awt.event.ActionEvent;
- import java.awt.event.ActionListener;
- import java.util.prefs.Preferences;
- import model.model;
- import view.gui;
-
- /**
- * Command Controller undo
- * @author matthias
- */
- public class C_MenuListener_undo implements ActionListener{
- private gui view;
- private CommandInvoker invoker;
- private String PathID;
- private String FildID;
- private Preferences prfs;
- private model mdl;
-
- public C_MenuListener_undo(gui g, String pid, String fid, Preferences p, model m, CommandInvoker inv)
- {
- this.view = g;
- this.invoker = inv;
- this.PathID = pid;
- this.FildID = fid;
- this.prfs = p;
- this.mdl = m;
-
- this.view.getContentTable1().getjTable().setModel(this.mdl);
- }
-
- /**
- * registriert undo event
- */
- public void registerEvents()
- {
- this.view.getBtnUndo().addActionListener(this);
-
- }
-
- public void registerCommands()
- {
- //this.invoker.addCommand(this.view.getBtnUndo(), );
- }
-
- /**
- * führt undoCommand vom Invoker aus
- * @param ae (AktionEvent)
- */
- @Override
- public void actionPerformed(ActionEvent ae) {
- this.invoker.undoCommand();
- }
-
- }
|