diff --git a/AlgebraicDataflowArchitectureModel/src/application/ApplicationMenuBar.java b/AlgebraicDataflowArchitectureModel/src/application/ApplicationMenuBar.java index e99145e..0385b05 100644 --- a/AlgebraicDataflowArchitectureModel/src/application/ApplicationMenuBar.java +++ b/AlgebraicDataflowArchitectureModel/src/application/ApplicationMenuBar.java @@ -17,6 +17,7 @@ import application.actions.OpenAction; import application.actions.SaveAction; import application.actions.SaveAsAction; +import application.actions.ShowNavigationAction; import application.actions.TreeLayoutAction; import application.actions.ZoomInAction; import application.actions.ZoomOutAction; @@ -25,7 +26,7 @@ public class ApplicationMenuBar extends JMenuBar { private static final long serialVersionUID = 4811536194182272888L; - private ApplicationWindow graphicalModelRefactor = null; + private ApplicationWindow applicationWindow = null; private NewResourceAction newResourceAction = null; private NewChannelAction newChannelAction = null; private NewIOChannelAction newIOChannelAction = null; @@ -37,47 +38,50 @@ private TreeLayoutAction treeLayoutAction = null; private CircleLayoutAction circleLayoutAction = null; - public ApplicationMenuBar(ApplicationWindow graphicalModelRefactor) { - this.graphicalModelRefactor = graphicalModelRefactor; + public ApplicationMenuBar(ApplicationWindow applicationWindow) { + this.applicationWindow = applicationWindow; JMenu newMenu = new JMenu("New"); - newMenu.add(new NewModelAction(graphicalModelRefactor)); + newMenu.add(new NewModelAction(applicationWindow)); - newMenu.add(newResourceAction = new NewResourceAction(graphicalModelRefactor.getEditor())); - newMenu.add(newChannelAction = new NewChannelAction(graphicalModelRefactor.getEditor())); - newMenu.add(newIOChannelAction = new NewIOChannelAction(graphicalModelRefactor.getEditor())); - newMenu.add(newFormulaChannelAction = new NewFormulaChannelAction(graphicalModelRefactor.getEditor())); + newMenu.add(newResourceAction = new NewResourceAction(applicationWindow.getEditor())); + newMenu.add(newChannelAction = new NewChannelAction(applicationWindow.getEditor())); + newMenu.add(newIOChannelAction = new NewIOChannelAction(applicationWindow.getEditor())); + newMenu.add(newFormulaChannelAction = new NewFormulaChannelAction(applicationWindow.getEditor())); JMenu menu = null; menu = add(new JMenu("File")); menu.add(newMenu); - menu.add(new OpenAction(graphicalModelRefactor)); + menu.add(new OpenAction(applicationWindow)); menu.addSeparator(); - menu.add(new SaveAction(graphicalModelRefactor)); - menu.add(new SaveAsAction(graphicalModelRefactor)); + menu.add(new SaveAction(applicationWindow)); + menu.add(new SaveAsAction(applicationWindow)); menu.addSeparator(); menu.add(new ExitAction()); menu = add(new JMenu("Edit")); - menu.add(deleteAction = new DeleteAction(graphicalModelRefactor.getEditor())); + menu.add(deleteAction = new DeleteAction(applicationWindow.getEditor())); menu = add(new JMenu("Layout")); - menu.add(dagLayoutAction = new DAGLayoutAction(graphicalModelRefactor.getEditor())); - menu.add(treeLayoutAction = new TreeLayoutAction(graphicalModelRefactor.getEditor())); - menu.add(circleLayoutAction = new CircleLayoutAction(graphicalModelRefactor.getEditor())); + menu.add(dagLayoutAction = new DAGLayoutAction(applicationWindow.getEditor())); + menu.add(treeLayoutAction = new TreeLayoutAction(applicationWindow.getEditor())); + menu.add(circleLayoutAction = new CircleLayoutAction(applicationWindow.getEditor())); menu = add(new JMenu("View")); - menu.add(new ZoomInAction(graphicalModelRefactor.getGraphComponent())); - menu.add(new ZoomOutAction(graphicalModelRefactor.getGraphComponent())); + menu.add(new ZoomInAction(applicationWindow.getGraphComponent())); + menu.add(new ZoomOutAction(applicationWindow.getGraphComponent())); menu = add(new JMenu("Generate")); - menu.add(javaPrototypeGenerateAction = new JavaPrototypeGenerateAction(graphicalModelRefactor.getEditor())); - menu.add(jerseyPrototypeGenerateAction = new JerseyPrototypeGenerateAction(graphicalModelRefactor.getEditor())); + menu.add(javaPrototypeGenerateAction = new JavaPrototypeGenerateAction(applicationWindow.getEditor())); + menu.add(jerseyPrototypeGenerateAction = new JerseyPrototypeGenerateAction(applicationWindow.getEditor())); + + menu = add(new JMenu("Window")); + menu.add(new ShowNavigationAction(applicationWindow)); } public Editor getEditor() { - return graphicalModelRefactor.getEditor(); + return applicationWindow.getEditor(); } public void setEditor(Editor editor) {