private model mdl; | private model mdl; | ||||
private Preferences prfs; | private Preferences prfs; | ||||
private String pid; | private String pid; | ||||
private Stack adressEintraegeDaten; | |||||
private Stack adressEintraegeDaten; //stack immer mit Typ | |||||
private Stack pos; | private Stack pos; | ||||
public interface CommandInterface { | public interface CommandInterface { | ||||
public void execute(); | public void execute(); | ||||
public void undo(); | public void undo(); | ||||
//public boolean isUndoAble(); | |||||
//public void redo | //public void redo | ||||
} | } |
JFileChooser fc = this.g.getFileChooser(); | JFileChooser fc = this.g.getFileChooser(); | ||||
try | 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) | catch(Exception ex) | ||||
{ | { |
* Command Controller undo | * Command Controller undo | ||||
* @author matthias | * @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 gui view; | ||||
private CommandInvoker invoker; | private CommandInvoker invoker; | ||||
private String PathID; | private String PathID; |
<SubComponents> | <SubComponents> | ||||
<Menu class="javax.swing.JMenu" name="jmFile"> | <Menu class="javax.swing.JMenu" name="jmFile"> | ||||
<Properties> | <Properties> | ||||
<Property name="mnemonic" type="int" value="70"/> | |||||
<Property name="text" type="java.lang.String" value="File"/> | <Property name="text" type="java.lang.String" value="File"/> | ||||
</Properties> | </Properties> | ||||
<SubComponents> | <SubComponents> | ||||
</Menu> | </Menu> | ||||
<Menu class="javax.swing.JMenu" name="jmEdit"> | <Menu class="javax.swing.JMenu" name="jmEdit"> | ||||
<Properties> | <Properties> | ||||
<Property name="mnemonic" type="int" value="69"/> | |||||
<Property name="text" type="java.lang.String" value="Edit"/> | <Property name="text" type="java.lang.String" value="Edit"/> | ||||
</Properties> | </Properties> | ||||
</Menu> | </Menu> |
contentTable1.setComponentPopupMenu(jPopupMenu1); | contentTable1.setComponentPopupMenu(jPopupMenu1); | ||||
getContentPane().add(contentTable1, java.awt.BorderLayout.CENTER); | getContentPane().add(contentTable1, java.awt.BorderLayout.CENTER); | ||||
jmFile.setMnemonic('F'); | |||||
jmFile.setText("File"); | jmFile.setText("File"); | ||||
miSave.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_S, java.awt.event.InputEvent.CTRL_MASK)); | miSave.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_S, java.awt.event.InputEvent.CTRL_MASK)); | ||||
jMenuBar1.add(jmFile); | jMenuBar1.add(jmFile); | ||||
jmEdit.setMnemonic('E'); | |||||
jmEdit.setText("Edit"); | jmEdit.setText("Edit"); | ||||
jMenuBar1.add(jmEdit); | jMenuBar1.add(jmEdit); | ||||