Example #1
0
 /**
  * <code>setInLayout</code>
  *
  * @param value - <code>boolean</code> -
  */
 public void setInLayout(boolean value) {
   int width = 1;
   inLayout = value;
   if (value == false) {
     setAreNeighborsShown(false);
   }
   if (hasZeroConstraints) {
     setAreNeighborsShown(true);
     width = partialPlanView.getOpenJGoPenWidth(partialPlanView.getZoomFactor());
   }
   setPen(new JGoPen(JGoPen.SOLID, width, ColorMap.getColor("black")));
 }
Example #2
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")));
 }
Example #3
0
 private final void configure(Point variableLocation, Color backgroundColor, boolean isDraggable) {
   setLabelSpot(JGoObject.Center);
   initialize(variableLocation, nodeLabel);
   setBrush(JGoBrush.makeStockBrush(backgroundColor));
   getLabel().setEditable(false);
   setDraggable(isDraggable);
   // do not allow user links
   getPort().setVisible(false);
   getLabel().setMultiline(true);
   setAreNeighborsShown(false);
   if (hasZeroConstraints) {
     setAreNeighborsShown(true);
     int penWidth = partialPlanView.getOpenJGoPenWidth(partialPlanView.getZoomFactor());
     setPen(new JGoPen(JGoPen.SOLID, penWidth, ColorMap.getColor("black")));
   }
 } // end configure