((LinkManagerObject)hilitedObject).setTarget((tmplink!=null));
((LinkManagerObject)hilitedObject).setTarget((tmplink!=null) && !(tmplink instanceof VDBPort));
public void mousePressed(MouseEvent e) {	ViewState view = ViewState.getInstance();	int px = e.getX()-view.getX0();	int py = e.getY()-view.getY0();	if ((px>0) && (py>0) && (px<width) && (py<height)) {		boolean leftButtonPush = (e.getModifiers() & InputEvent.BUTTON1_MASK) != 0;		boolean rightButtonPush  = (e.getModifiers() & InputEvent.BUTTON3_MASK) != 0;// 		System.out.println("mousePressed("+leftButtonPush+","+rightButtonPush+")");				VisibleObject hilitedObject = ViewState.getInstance().getHilitedObject();		if (leftButtonPush && !rightButtonPush) {			if (navigator.contains(e.getX(), e.getY())) {		// navigator//System.out.println("Pressed: NAVIGATOR_MOVE");				mouseOperation = NAVIGATOR_MOVE;				int rx = (int)((e.getX()-navigatorRect.width/2.0-navigator.x)/navigatorView.getScale()*view.getScale());				int ry = (int)((e.getY()-navigatorRect.height/2.0-navigator.y)/navigatorView.getScale()*view.getScale());				if (view.moveOrigin(rx-view.getRx(), ry-view.getRy())) {					recalculateNavigatorPosition();					repaint();					pressedX=px; pressedY=py;				}							}			else if (e.isShiftDown()) {				// drag-move//System.out.println("Pressed: ORIGIN_MOVE");				mouseOperation = ORIGIN_MOVE;				setCursor(handCursor);				pressedX=px; pressedY=py;			}			else if (hilitedObject==null) {			// object selection//System.out.println("Pressed: OBJECT_SELECTION");				mouseOperation = OBJECT_SELECTION;				pressedX=draggedX=px;				pressedY=draggedY=py;				fastDrawing=true;			}						else if (hilitedObject instanceof Movable) {  // move object//System.out.println("Pressed: OBJECT_MOVE");				mouseOperation = OBJECT_MOVE;				pressedX=draggedX=px; 				pressedY=draggedY=py;			}					}		else if (rightButtonPush && !leftButtonPush) {			if (e.isShiftDown() && 				(hilitedObject instanceof Rotatable)) {					((Rotatable)hilitedObject).rotate();					alsoDrawHilitedOnce=true;					repaint();			}			else			if (hilitedObject==null) {					// zoom selection//System.out.println("Pressed: ZOOM_SELECTION");				mouseOperation = ZOOM_SELECTION;				pressedX=draggedX=px;				pressedY=draggedY=py;				fastDrawing=true;			}						else if (hilitedObject instanceof Popupable) {				// linking support				if (hilitedObject instanceof LinkManagerObject) {					((LinkManagerObject)hilitedObject).setTarget((tmplink!=null));				}								PopUpMenu.getInstance().show(					(Popupable)hilitedObject,					getWorkspacePanel(),					e.getX(), e.getY()				);			}		}		}}