Color c = getColor(); if (c==Constants.BACKGROUND_COLOR) if (c==Color.black) c=Color.white; else c=Color.black; g.setColor(c);
g.setColor(hilited && view.isHilitedObject(this) ? Constants.HILITE_COLOR : getVisibleColor());
protected void draw(java.awt.Graphics g, boolean hilited) {	ViewState view = ViewState.getInstance();	int rrx = getRx() - view.getRx();	int rry = getRy() - view.getRy();	int rwidth = getRwidth();	int rheight = getRheight();	boolean rightSide = isRight();	// clipping	if (!((rrx > view.getViewWidth())		|| (rry > view.getViewHeight())		|| ((rrx + rwidth) < 0)		|| ((rry + rheight) < 0))) {			Polygon poly = null;		if (rightSide)		{			poly = rightPoly;			poly.translate(rrx-rightXtranslation, rry-rightYtranslation);			rightXtranslation = rrx; rightYtranslation = rry;		}		else		{			poly = leftPoly;			poly.translate(rrx-leftXtranslation, rry-leftYtranslation);			leftXtranslation = rrx; leftYtranslation = rry;		}					if (!hilited)			g.setColor(Constants.RECORD_COLOR);		else			if (view.isPicked(this))				g.setColor(Constants.PICK_COLOR);			else				if (view.isSelected(this) || view.isBlinking(this))					g.setColor(Constants.SELECTION_COLOR);				else					g.setColor(Constants.RECORD_COLOR);			g.fillPolygon(poly);		Color drawColor;		if (!hilited)			drawColor = Constants.FRAME_COLOR;		else			drawColor =				(this == view.getHilitedObject())					? Constants.HILITE_COLOR					: Constants.FRAME_COLOR;		g.setColor(drawColor);		g.drawPolygon(poly);				if (getFont()!=null) {			//g.setColor(drawColor);			g.setFont(getFont());			g.drawString(getLabel(), rrx+getRlabelX(), rry+getRlabelY());		}	}	if (inlink!=null)	{				// draw link		Color c = getColor();		if (c==Constants.BACKGROUND_COLOR)			if (c==Color.black)				c=Color.white;			else				c=Color.black;		g.setColor(c);		LinkDrawer.drawLink(g, this, inlink, getQueueCount(), rightSide);	}		}