updateWorkspaceScale();
public void mouseClicked(MouseEvent e) {	ViewState view = ViewState.getInstance();	// check for drags!	int cx = e.getX()-view.getX0();	int cy = e.getY()-view.getY0();	if ((cx>0) && (cy>0) && (cx<width) && (cy<height)) {//		System.out.println("mouseClicked ("+cx+", "+cy+")");		VisibleObject hilited = view.getHilitedObject();		if (hilited!=null) {						// linking support			if (tmplink!=null) {				if (hilited instanceof Record) {					linkCommand((Record)hilited, null);					return;				}				else if (hilited instanceof EPICSVarLink) {					EPICSVarLink varlink = (EPICSVarLink)hilited;					if ((tmplink.getType()!=DBDConstants.DBF_FWDLINK) ||		// !!! proc						varlink.getFieldData().getName().equalsIgnoreCase("PROC")) {						linkCommand((Record)varlink.getParent(), varlink.getFieldData());						return;					}				}			}						if (e.isControlDown() || (e.getClickCount()==1)) {				if (!e.isControlDown()) view.deselectAll();			// deselect all				if (hilited instanceof Selectable) {				// invert selection					if (view.isSelected(hilited))						view.deselectObject(hilited);					else						view.setAsSelected(hilited);					repaint();				}			}			else if (e.getClickCount()>=2) {				if (hilited instanceof Selectable) {				// invert selection					if (view.isSelected(hilited))						view.deselectObject(hilited);					else						view.setAsSelected(hilited);				}								if (hilited instanceof Inspectable) 					InspectorManager.getInstance().requestInspectorFor((Inspectable)hilited);				else {					if (hilited instanceof Group) {						viewGroup = (Group)hilited;						ViewState.getInstance().set(viewGroup);						//createNavigatorImage();						viewGroup.unconditionalValidateSubObjects(isFlat());						SetWorkspaceGroup cmd = (SetWorkspaceGroup)CommandManager.getInstance().getCommand("SetGroup");						cmd.setGroup(viewGroup.getAbsoluteName());						cmd.execute();												forceRedraw = true;						repaint();					}				}			}		}		else {			if (e.getClickCount()>=2) {				pressedX=cx; pressedY=cy;				CommandManager.getInstance().execute("ShowNewDialog");			}			else if (view.deselectAll()) 				repaint();					// deselect all		}				stopLinking();				}}