void AddOperatorAction(String name) { final GraphNode newGraphNode = graphEx.addOperator(name); newGraphNode.setPos(lastMousePos); repaint(); }
void AutoConnectGraph() { if (!graphEx.getGraphNodeList().isGraphComplete()) { graphEx.autoConnectGraph(); repaint(); } }
public void notifyConnection() { if(graphNodeList.getGraphNodes().length > 0) { notifyGraphEvent(new GraphEvent(events.CONNECT_EVENT, graphNodeList.getGraphNodes()[0])); } }
public FileTable(FileTableModel fileModel, Dimension dim) { if (fileModel == null) { fileModel = new FileModel(); } this.fileModel = fileModel; this.setModel(fileModel); setPreferredScrollableViewportSize(dim); fileModel.setColumnWidths(getColumnModel()); setColumnSelectionAllowed(true); setDropMode(DropMode.ON); setDragEnabled(true); setComponentPopupMenu(createTablePopup()); setTransferHandler(new ProductSetTransferHandler(fileModel)); }
void RemoveSourceAction(String id) { if (selectedNode != null) { final GraphNode source = graphEx.getGraphNodeList().findGraphNode(id); selectedNode.disconnectOperatorSources(source.getID()); repaint(); } }
private GraphNode findNode(Point p) { for (GraphNode n : graphEx.GetGraphNodes()) { if (isWithinRect(n.getPos(), n.getWidth(), n.getHeight(), p)) return n; } return null; }
public GraphNode addOperator(final String opName) { String id = opName; int cnt = 1; while (graphNodeList.findGraphNode(id) != null) { ++cnt; id = opName + '(' + cnt + ')'; } final GraphNode newGraphNode = createNewGraphNode(graph, opName, id); notifyGraphEvent(new GraphEvent(events.ADD_EVENT, newGraphNode)); return newGraphNode; }
/** * pass in a file list for a ProductSetReader * * @param productFileList the product files */ public void setInputFiles(final File[] productFileList) { final GraphNode productSetNode = graphEx.getGraphNodeList().findGraphNodeByOperator("ProductSet-Reader"); if (productSetNode != null) { ProductSetReaderOpUI ui = (ProductSetReaderOpUI) productSetNode.GetOperatorUI(); ui.setProductFileList(productFileList); } }
public GraphsMenu(final Component parentComponent, final GraphDialog graphDialog) { this.parentComponent = parentComponent; this.graphDialog = graphDialog; loadAction = new LoadAction(); saveAction = new SaveAction(); viewGraphXMLAction = new ViewGraphXMLAction(); }
public void switchConnections(final GraphNode oldNode, final String newNodeID) { final GraphNode[] connectedNodes = findConnectedNodes(oldNode); for (GraphNode node : connectedNodes) { node.connectOperatorSource(newNodeID); } } }
public void removeOperator(final GraphNode node) { notifyGraphEvent(new GraphEvent(events.REMOVE_EVENT, node)); removeNode(node); }
public File[] getSelectedFiles() { return table.getModel().getFilesAt(table.getSelectedRows()); }
@Override protected Graph doInBackground() throws Exception { final Graph graphFromFile = GPFProcessor.readGraph(new InputStreamReader(fileStream), null); setGraph(graphFromFile, addUI); notifyGraphEvent(new GraphEvent(events.REFRESH_EVENT, null)); return graphFromFile; } }
public Object getValueAt(final int r, final int c) { return table.getModel().getValueAt(r, c); }
public void setSelectedNode(GraphNode node) { if (node == null) return; notifyGraphEvent(new GraphEvent(events.SELECT_EVENT, node)); }
public void assignParameters(final XppDom presentationXML) throws GraphException { for (GraphNode n : nodeList) { if (n.GetOperatorUI() != null) { n.AssignParameters(presentationXML); } } }
public TableData(final ProductEntry entry) { this.file = null; this.entry = entry; updateData(); }
public void EnableInitialInstructions(final boolean flag) { if (this.allowGraphBuilding) { graphPanel.showRightClickHelp(flag); } }
public SubGraphHandler(final Graph graph, final GraphNodeList graphNodeList) throws GraphException { this.graph = graph; this.graphNodeList = graphNodeList; this.savedSubGraphList = replaceAllSubGraphs(); }
public Object getValueAt(final int r, final int c) { return productSetTable.getModel().getValueAt(r, c); }