diff --git a/AlgebraicDataflowArchitectureModel/src/application/ApplicationWindow.java b/AlgebraicDataflowArchitectureModel/src/application/ApplicationWindow.java index e3fdbe6..2651c23 100644 --- a/AlgebraicDataflowArchitectureModel/src/application/ApplicationWindow.java +++ b/AlgebraicDataflowArchitectureModel/src/application/ApplicationWindow.java @@ -16,8 +16,8 @@ import com.mxgraph.util.mxEventSource.mxIEventListener; import com.mxgraph.view.mxGraph; -import application.editor.DataFlowCellEditor; import application.editor.Editor; +import application.editor.stages.DataFlowCellEditor; import application.views.NavigationWindow; public class ApplicationWindow extends JFrame { @@ -26,15 +26,16 @@ private Editor editor; private mxGraph graph; + private mxGraphComponent graphComponent; + private ApplicationMenuBar menuBar; private NavigationWindow navigationWindow; - private mxGraphComponent graphComponent; public ApplicationWindow() { setTitle(title); setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); - graph = new mxGraph() { + this.graph = new mxGraph() { public boolean isPort(Object cell) { mxGeometry geo = getCellGeometry(cell); @@ -46,13 +47,10 @@ } }; - editor = new Editor(graph); + this.graphComponent = new mxGraphComponent(graph); - graphComponent = new mxGraphComponent(graph) { - protected mxICellEditor createCellEditor() { - return new DataFlowCellEditor(this, editor); - } - }; + this.editor = new Editor(graphComponent); + graph.getModel().addListener(mxEvent.CHANGE, new mxIEventListener() { public void invoke(Object sender, mxEventObject evt) { List terminals = new ArrayList<>();