/** * OnLoad */ @Override protected void onYes() { LoadGraph(); }
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 void LoadGraph() { if (isProcessing) return; final File file = getFilePath(this.getContent(), "Graph File"); if (file != null) { LoadGraph(file); } }
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()); } } }
private void batchProcess(final ProductEntry[] productEntryList, final File graphFile) { final BatchGraphDialog batchDlg = new BatchGraphDialog(SnapApp.getDefault().getAppContext(), "Batch Processing", "batchProcessing", false); batchDlg.setInputFiles(productEntryList); if (graphFile != null) { batchDlg.LoadGraph(graphFile); } batchDlg.show(); } }
private void batchProcess(final ProductEntry[] productEntryList, final Map<File, File[]> slaveFileMap, final File outputFolder, final File graphFile) { final BatchGraphDialog batchDlg = new BatchGraphDialog(SnapApp.getDefault().getAppContext(), "Batch Processing", "batchProcessing", closeOnDone); batchDlg.addListener(batchListener); batchDlg.setInputFiles(productEntryList); batchDlg.setTargetFolder(outputFolder); batchDlg.setSlaveFileMap(slaveFileMap); if (graphFile != null) { batchDlg.LoadGraph(graphFile); } batchDlg.show(); if (autoApply) batchDlg.onApply(); }