Beispiel #1
0
 private void removeVariableNodeContainersAndConstraints(
     final VariableNode variableNode, final ConstraintNetworkView constraintNetworkView) {
   constraintNetworkView.setStartTimeMSecs(System.currentTimeMillis());
   boolean areLinksChanged = constraintNetworkView.removeContainerToVariableLinks(variableNode);
   boolean areNodesChanged = constraintNetworkView.removeConstraintNodes(variableNode);
   if (areNodesChanged || areLinksChanged) {
     constraintNetworkView.setLayoutNeeded();
     constraintNetworkView.setFocusNode(variableNode);
     constraintNetworkView.redraw(true);
   }
   setPen(new JGoPen(JGoPen.SOLID, 1, ColorMap.getColor("black")));
 } // end removeVariableNodeTokensAndConstraints
 private void removeConstraintNodeVariables(
     ConstraintNode constraintNode, ConstraintNetworkView constraintNetworkView) {
   constraintNetworkView.setStartTimeMSecs(System.currentTimeMillis());
   boolean areLinksChanged = constraintNetworkView.removeConstraintToVariableLinks(constraintNode);
   boolean areNodesChanged = constraintNetworkView.removeVariableNodes(constraintNode);
   if (areNodesChanged || areLinksChanged) {
     constraintNetworkView.setLayoutNeeded();
     constraintNetworkView.setFocusNode(constraintNode);
     constraintNetworkView.redraw();
   }
   setPen(new JGoPen(JGoPen.SOLID, 1, ColorMap.getColor("black")));
 } // end addConstraintnodeVariablesConstraints
Beispiel #3
0
 protected void addVariableNodeContainersAndConstraints(
     final VariableNode variableNode,
     final ConstraintNetworkView constraintNetworkView,
     final boolean doRedraw) {
   constraintNetworkView.setStartTimeMSecs(System.currentTimeMillis());
   boolean areNodesChanged = constraintNetworkView.addConstraintNodes(variableNode);
   boolean areLinksChanged =
       constraintNetworkView.addContainerAndConstraintToVariableLinks(variableNode);
   if (doRedraw && (areNodesChanged || areLinksChanged)) {
     constraintNetworkView.setLayoutNeeded();
     constraintNetworkView.setFocusNode(variableNode);
     constraintNetworkView.redraw(true);
   }
   int penWidth = partialPlanView.getOpenJGoPenWidth(partialPlanView.getZoomFactor());
   setPen(new JGoPen(JGoPen.SOLID, penWidth, ColorMap.getColor("black")));
 }