if (drawOnlyOneSided) { drawOneSided(g, hilited); return; }
protected void draw(Graphics g, boolean hilited) {	super.draw(g, hilited);	com.cosylab.vdct.graphics.ViewState view = com.cosylab.vdct.graphics.ViewState.getInstance();	boolean isRightSide = isRight();	int rrrx = getRx()+r+getRwidth()-view.getRx();	int rrlx = getRx()-r-view.getRx();	//int rry = getRy()+getRheight()/2-view.getRy();	int rry = (int)(getRscale()*getInY()- view.getRy());		double Rscale = view.getScale();	boolean zoom = (Rscale < 1.0) && view.isZoomOnHilited() && view.isHilitedObject(this);	if (zoom) {        int rwidth = getRwidth();        int rheight = getRheight();        rrrx += (rwidth/Rscale - rwidth)/2+1;        rrlx -= (rwidth/Rscale - rwidth)/2;        if (view.getRx() < 0)            rrrx = rrrx < 0 ? 2 : rrrx;                if (view.getRx() < 0)            rrlx = rrlx < 0 ? 2 : rrlx;        Rscale = 1.0;        r = (int)(Rscale*Constants.LINK_RADIOUS);    	rtailLen = (int)(Rscale*Constants.TAIL_LENGTH);    	g.setColor(Constants.BACKGROUND_COLOR);    	g.fillRect(rrrx-r, rry-r, 2*r,2*r);    	g.fillRect(rrlx-r, rry-r, 2*r,2*r);    }	if (!hilited) g.setColor(Constants.FRAME_COLOR);	else g.setColor((view.isHilitedObject(this)) ? 					Constants.HILITE_COLOR : Constants.FRAME_COLOR);	g.drawOval(rrrx-r, rry-r, 2*r,2*r);	g.drawOval(rrlx-r, rry-r, 2*r,2*r);		if (!disconnected && (outlinks.size()>0)) {		// tail		g.setColor(hilited && view.isHilitedObject(this) ? Constants.HILITE_COLOR : getVisibleColor());		boolean hasLeftOutLink = false;		boolean hasRightOutLink = false;				// check which sides are used		int mid = (getLeftX() + getRightX())/2;		Enumeration e = outlinks.elements();		while (e.hasMoreElements() && !(hasLeftOutLink && hasRightOutLink))		{			OutLink ol = (OutLink)e.nextElement();			if (ol.getOutX() > mid)				hasRightOutLink = true;			else				hasLeftOutLink = true;		}		int linklx = (int)(getRscale()*getLeftX() - view.getRx());		int linkrx = (int)(getRscale()*getRightX() - view.getRx());		if (hasLeftOutLink) 			g.drawLine(linklx, rry, rrlx-3*r, rry);		if (hasRightOutLink)			g.drawLine(rrrx+2*r, rry, linkrx, rry);		// !!! more intergroup inlinks?!		LinkDrawer.drawInIntergroupLink(g, (OutLink)outlinks.firstElement(), this, isRightSide);			}}