public CreateIEdgeDialog(Node sourceNode, Node targetNode) { super(Editor.getInstance(), "Create Interruptive Edge", true); // Init edge data mIEdge = new IEdge(); mIEdge.setTarget(targetNode.getId()); mIEdge.setSourceNode(sourceNode); mIEdge.setTargetNode(targetNode); // TODO: move to EdgeDialog mAltStartNodeManager = new AltStartNodeManager(mIEdge); // Init the GUI-Components initComponents(); }
private boolean process() { String inputString = mInputTextField.getText().trim(); try { _SFSLParser_.parseResultType = _SFSLParser_.CND; _SFSLParser_.run(inputString); Condition cnd = _SFSLParser_.cndResult; if (cnd != null && !_SFSLParser_.errorFlag) { mIEdge.setCondition(cnd); /// mAltStartNodeManager.saveAltStartNodeMap(); //// return true; } else { return false; } } catch (Exception e) { return false; } }
private void loadAltStartNodeMap() { mAltStartNodeManager.loadAltStartNodeMap(); if (mIEdge.getTargetNode() instanceof SuperNode) { Iterator it = mAltStartNodeManager.mAltStartNodeMap.entrySet().iterator(); while (it.hasNext()) { Map.Entry pairs = (Map.Entry) it.next(); TPLTuple<String, Node> startNodePair = (TPLTuple<String, Node>) pairs.getKey(); TPLTuple<String, Node> altStartNodePair = (TPLTuple<String, Node>) pairs.getValue(); ((DefaultListModel) mAltStartNodeList.getModel()) .addElement(startNodePair.getFirst() + "/" + altStartNodePair.getFirst()); //// System.err.println("loading start node "+startNodePair.getSecond()); //// System.err.println("loading alt start node "+altStartNodePair.getSecond()); } } else { mAddAltStartNodeButton.setEnabled(false); mRemoveAltStartNodeButton.setEnabled(false); mEditAltStartNodeButton.setEnabled(false); mAltStartNodeList.setEnabled(false); mAltStartNodeScrollPane.setEnabled(false); } }