private void deleteGraphs() { for (GraphExecuter gex : graphExecutorList) { gex.ClearGraph(); } graphExecutorList.clear(); }
private void deleteGraphs() { for (GraphExecuter gex : graphExecuterList) { gex.ClearGraph(); } graphExecuterList.clear(); }
/** * Removes all tabs and clears the graph */ private void ClearGraph() { initGraphEnabled = false; tabbedPanel.removeAll(); graphEx.ClearGraph(); refreshGraph(); initGraphEnabled = true; statusLabel.setText(""); }
protected void cloneGraphs() throws Exception { final GraphExecuter graphEx = graphExecutorList.get(0); for (int graphIndex = 1; graphIndex < graphExecutorList.size(); ++graphIndex) { final GraphExecuter cloneGraphEx = graphExecutorList.get(graphIndex); cloneGraphEx.ClearGraph(); } graphExecutorList.clear(); graphExecutorList.add(graphEx); final File[] fileList = productSetPanel.getFileList(); for (int graphIndex = 1; graphIndex < fileList.length; ++graphIndex) { final GraphExecuter cloneGraphEx = new GraphExecuter(); LoadGraph(cloneGraphEx, graphFile, false); graphExecutorList.add(cloneGraphEx); // copy UI parameter to clone final GraphNode[] cloneGraphNodes = cloneGraphEx.GetGraphNodes(); for (GraphNode cloneNode : cloneGraphNodes) { final GraphNode node = graphEx.getGraphNodeList().findGraphNode(cloneNode.getID()); if (node != null) cloneNode.setOperatorUI(node.GetOperatorUI()); } } }
@Test public void testSetSelected() { GraphNode node = graphEx.addOperator("testOp"); updateValue = ""; graphEx.setSelectedNode(node); assertEquals(updateValue, "Selected"); graphEx.ClearGraph(); }
@Test public void testFindGraphNode() { GraphNode lostNode = graphEx.addOperator("lostOp"); GraphNode foundNode = graphEx.getGraphNodeList().findGraphNode(lostNode.getID()); assertTrue(foundNode.equals(lostNode)); graphEx.ClearGraph(); }
@Test public void testClear() { graphEx.addOperator("testOp"); GraphNode[] nodeList = graphEx.GetGraphNodes(); assertEquals(1, nodeList.length); graphEx.ClearGraph(); assertEquals(0, graphEx.GetGraphNodes().length); }