void createGraphs() throws GraphException { try { final GraphExecuter graphEx = new GraphExecuter(); LoadGraph(graphEx, graphFile, true); graphExecutorList.add(graphEx); } catch (Exception e) { throw new GraphException(e.getMessage()); } }
public GraphBuilderDialog(final AppContext theAppContext, final String title, final String helpID, final boolean allowGraphBuilding) { super(theAppContext.getApplicationWindow(), title, 0, helpID); this.allowGraphBuilding = allowGraphBuilding; appContext = theAppContext; graphEx = new GraphExecuter(); graphEx.addObserver(this); String lastDir = SnapApp.getDefault().getPreferences().get(LAST_GRAPH_PATH, ResourceUtils.getGraphFolder("").toFile().getAbsolutePath()); if (new File(lastDir).exists()) { SnapApp.getDefault().getPreferences().put(LAST_GRAPH_PATH, lastDir); } initUI(); }
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()); } } }
@Before public void setUp() throws Exception { //TestUtils.initTestEnvironment(); graphEx = new GraphExecuter(); graphEx.addObserver(this); }