/** * <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"))); }
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"))); }
/** * <code>getToolTipText</code> * * @return - <code>String</code> - */ public String getToolTipText() { if (variable == null) { return null; } String operation = null; if (areNeighborsShown()) { operation = "close"; } else { operation = "open"; } StringBuffer tip = new StringBuffer("<html> "); boolean isVariableWithConstraints = (!hasZeroConstraints) && (partialPlanView instanceof ConstraintNetworkView); NodeGenerics.getVariableNodeToolTipText(variable, partialPlanView, tip); if (isDebug) { tip.append(" linkCnt ").append(String.valueOf(constraintLinkCount)); } if (partialPlanView.getZoomFactor() > 1) { tip.append("<br>key="); tip.append(variable.getId().toString()); } if (isVariableWithConstraints) { tip.append("<br> Mouse-L: ").append(operation); } return tip.append("</html>").toString(); } // end getToolTipText
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