if (!isVisible()) 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 rrx;			// rrx, rry is center	if (isRightSide)		rrx = getRx()+getRwidth()-view.getRx();	else		rrx = getRx()-view.getRx();		int rry = (int)(getRscale()*getInY()- view.getRy());		if (!hilited) g.setColor(Constants.FRAME_COLOR);	else g.setColor((view.isHilitedObject(this)) ? 					Constants.HILITE_COLOR : Constants.FRAME_COLOR);	int mode = InLink.OUTPUT_MACRO_MODE;	Macro visibleMacro = ((VDBTemplateMacro)getFieldData()).getMacro().getVisibleObject();	if (visibleMacro!=null)		mode = visibleMacro.getMode();		if (mode == InLink.INPUT_MACRO_MODE)	{		// input link		int arrowLength = 2*r;				if (!isRightSide)			rrx -= arrowLength;		// draw arrow		g.drawLine(rrx, rry-r, rrx+arrowLength, rry-r);		g.drawLine(rrx, rry+r, rrx+arrowLength, rry+r);				int dr=-r; 		if (isRightSide) {			dr=-dr;			rrx+=arrowLength;		}		g.drawLine(rrx, rry-r, rrx+dr, rry);		g.drawLine(rrx, rry+r, rrx+dr, rry);	}	else if (mode == InLink.OUTPUT_MACRO_MODE)	{		// output link			int arrowLength = 3*r;		if (!isRightSide)			rrx -= arrowLength;		// draw arrow		g.drawLine(rrx, rry-r, rrx+arrowLength, rry-r);		g.drawLine(rrx, rry+r, rrx+arrowLength, rry+r);				int dr=r; 		if (isRightSide) {			dr=-dr;			rrx+=arrowLength;		}		g.drawLine(rrx, rry-r, rrx+dr, rry);		g.drawLine(rrx, rry+r, rrx+dr, rry);	}	//else 			// constant (none)	// invalid	if (lastUpdatedFullName==null)	{		rrx = getRx()-view.getRx();		rry = getRy()-view.getRy();		int rwidth = getRwidth();		int rheight = getRheight();					g.setColor(Color.red);		g.drawLine(rrx, rry, rrx+rwidth, rry+rheight);		g.drawLine(rrx+rwidth, rry, rrx, rry+rheight);	}}