if (ChainBuilderAgent.DEBUG) { System.err.println("zooming in on node..."+node); System.err.println("camera view scale was "+camera.getViewScale()); }
	public void doMouseClicked(PInputEvent e) {		if (postLinkCompletion == true)			return;		// we only scale if we're not drawing a link.	//	System.err.println("mouse clicked.."+e);		//System.err.println("link state is "+linkState);		if (linkState != NOT_LINKING) {			if (linkState == LINKING_CANCELLATION) {				//System.err.println("cancelled link. set to not linking");				linkState = NOT_LINKING;			}			//System.err.println("linking...");			e.setHandled(true);			return;		}				if (postPopup == true) {			//System.err.println("post popup");			postPopup = false;			e.setHandled(true);			return;		}				PNode node = e.getPickedNode();		//System.err.println("mouse clicked on .."+node);		int mask = e.getModifiers() & allButtonMask;				// if it's a buffered object that is not a chain.		if (node instanceof BufferedObject && !(node instanceof ChainView)) {			BufferedObject mod = (BufferedObject) node;			PCamera camera = canvas.getCamera();			if (mask == MouseEvent.BUTTON1_MASK && e.getClickCount()==1) {				//System.err.println("zooming in on node..."+node);				PBounds b = mod.getBufferedBounds();				//System.err.println("camera view scale was "+camera.getViewScale());				PActivity activity = camera.animateViewToCenterBounds(b,true,							Constants.ANIMATION_DELAY);				activity.setDelegate(new PActivityDelegate() {					public void activityStarted(PActivity activity) {									}					public void activityStepped(PActivity activity) {									}					public void activityFinished(PActivity activity) {						setModulesDisplayMode();					}				});							}			else if (e.isControlDown() || (mask & MouseEvent.BUTTON3_MASK)==1) {				//System.err.println("canvas right click..");				evaluatePopup(e);								}		}				// otherwise, must be a camera, or a chain. either way, zoom in/out		//if (! (node instanceof PCamera))		//	return;		else if (e.isShiftDown()) {			//System.err.println("zoomed with shhift..");			PBounds b = canvas.getBufferedBounds();			canvas.getCamera().animateViewToCenterBounds(b,true,Constants.ANIMATION_DELAY);			setModulesDisplayMode();			e.setHandled(true);		}		else {			//System.err.println("zoomed witout shift...");			double scaleFactor = Constants.SCALE_FACTOR;			if (e.isControlDown() || ((mask & MouseEvent.BUTTON3_MASK)==1)) {				//System.err.println("but wit control...");				scaleFactor = 1/scaleFactor;			}			zoom(scaleFactor,e);			e.setHandled(true);		}  	} 