From 9b1765b4b64864308939df274850a306684ef84a Mon Sep 17 00:00:00 2001 From: weberni69795 Date: Tue, 12 Nov 2019 10:29:13 +0100 Subject: [PATCH] Version 1.0 fertige Aufgabe --- src/commands/CommandDelete.java | 2 +- src/commands/CommandInterface.java | 1 + src/commands/CommandOpen.java | 2 +- src/controller/C_MenuListener_undo.java | 2 +- src/view/gui.form | 2 ++ src/view/gui.java | 2 ++ 6 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/commands/CommandDelete.java b/src/commands/CommandDelete.java index ecdd913..720f722 100644 --- a/src/commands/CommandDelete.java +++ b/src/commands/CommandDelete.java @@ -21,7 +21,7 @@ public class CommandDelete implements CommandInterface { private model mdl; private Preferences prfs; private String pid; - private Stack adressEintraegeDaten; + private Stack adressEintraegeDaten; //stack immer mit Typ private Stack pos; diff --git a/src/commands/CommandInterface.java b/src/commands/CommandInterface.java index 8a2feaa..c351c90 100644 --- a/src/commands/CommandInterface.java +++ b/src/commands/CommandInterface.java @@ -13,5 +13,6 @@ package commands; public interface CommandInterface { public void execute(); public void undo(); + //public boolean isUndoAble(); //public void redo } diff --git a/src/commands/CommandOpen.java b/src/commands/CommandOpen.java index 265c714..5998645 100644 --- a/src/commands/CommandOpen.java +++ b/src/commands/CommandOpen.java @@ -45,7 +45,7 @@ public class CommandOpen implements CommandInterface { JFileChooser fc = this.g.getFileChooser(); try { - fc.setCurrentDirectory(new File(this.pref.get(PATH_ID, ""))); + fc.setCurrentDirectory(new File(this.pref.get(PATH_ID, "."))); //Pref ins Model } catch(Exception ex) { diff --git a/src/controller/C_MenuListener_undo.java b/src/controller/C_MenuListener_undo.java index 44d55ec..7a7f9f9 100644 --- a/src/controller/C_MenuListener_undo.java +++ b/src/controller/C_MenuListener_undo.java @@ -16,7 +16,7 @@ import view.gui; * Command Controller undo * @author matthias */ -public class C_MenuListener_undo implements ActionListener{ +public class C_MenuListener_undo implements ActionListener{ //keine unterstriche in Klassen und Objektnamen private gui view; private CommandInvoker invoker; private String PathID; diff --git a/src/view/gui.form b/src/view/gui.form index cc59c6f..54816cd 100644 --- a/src/view/gui.form +++ b/src/view/gui.form @@ -97,6 +97,7 @@ + @@ -148,6 +149,7 @@ + diff --git a/src/view/gui.java b/src/view/gui.java index 696a308..ec42e94 100644 --- a/src/view/gui.java +++ b/src/view/gui.java @@ -230,6 +230,7 @@ public class gui extends javax.swing.JFrame { contentTable1.setComponentPopupMenu(jPopupMenu1); getContentPane().add(contentTable1, java.awt.BorderLayout.CENTER); + jmFile.setMnemonic('F'); jmFile.setText("File"); miSave.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_S, java.awt.event.InputEvent.CTRL_MASK)); @@ -259,6 +260,7 @@ public class gui extends javax.swing.JFrame { jMenuBar1.add(jmFile); + jmEdit.setMnemonic('E'); jmEdit.setText("Edit"); jMenuBar1.add(jmEdit);