diff --git a/AlgebraicDataflowArchitectureModel/src/application/ApplicationWindow.java b/AlgebraicDataflowArchitectureModel/src/application/ApplicationWindow.java index e6d16e2..8d20abc 100644 --- a/AlgebraicDataflowArchitectureModel/src/application/ApplicationWindow.java +++ b/AlgebraicDataflowArchitectureModel/src/application/ApplicationWindow.java @@ -53,25 +53,6 @@ this.editor = new Editor(graphComponent); - graph.getModel().addListener(mxEvent.CHANGE, new mxIEventListener() { - public void invoke(Object sender, mxEventObject evt) { -// List terminals = new ArrayList<>(); -// mxCell cell = null; -// for (Object change: ((List) evt.getProperties().get("changes"))) { -// if (change instanceof mxGraphModel.mxTerminalChange) { -// mxGraphModel.mxTerminalChange terminalChange = (mxGraphModel.mxTerminalChange) change; -// cell = (mxCell) terminalChange.getCell(); -// mxCell terminal = (mxCell) terminalChange.getTerminal(); -// terminals.add(terminal); -// } -// } -// if (terminals.size() == 2) { -// if (!editor.connectEdge(cell, terminals.get(0), terminals.get(1))) { -// graph.removeCells(new mxCell[] {cell}); -// } -// } - } - }); getContentPane().add(graphComponent); new mxRubberband(graphComponent); graph.setAllowDanglingEdges(false);