Color c = getColor(); if (c==Constants.BACKGROUND_COLOR) if (c==Color.black) c=Color.white; else c=Color.black; g.setColor(c);
g.setColor(getVisibleColor());
protected void draw(Graphics g, boolean hilited){	ViewState view = ViewState.getInstance();	int posX = getRx() - view.getRx();	int posY = getRy() - view.getRy();	int rwidth = getRwidth();	int rheight = getRheight();	if(!((posX > view.getViewWidth()) || (posY > view.getViewHeight())		|| ((posX + rwidth) < 0) || ((posY + rheight) < 0)))	{		if(view.isSelected(this))		{			g.setColor(Constants.HILITE_COLOR);			g.drawRect(posX - 2, posY - 2, rwidth + 4, rheight + 4);		}				//int size = (int)(getFont().getSize()*getRscale());		//Font f = FontMetricsBuffer.getInstance().getFont(getFont().getFamily(), size, getFont().getStyle());				if (htmlMode)		{			Color tmp = label.getForeground();			Color c = tmp;			if (c==Constants.BACKGROUND_COLOR)				if (c==Color.black)					c=Color.white;				else					c=Color.black;			label.setForeground(c);			label.setBounds(posX + 2, posY + 2, rwidth - 4, rheight - 4);			label.paint(g);			label.setForeground(tmp);		}		else		{			Shape clip = g.getClip();			g.setClip(posX, posY, rwidth, rheight);			Color c = getColor();			if (c==Constants.BACKGROUND_COLOR)				if (c==Color.black)					c=Color.white;				else					c=Color.black;			g.setColor(c);			drawMultiLineText(g, posX+2, posY+2, rwidth-4);				g.setClip(clip);		}			if(border || hilited)			drawDashedBorder(g, hilited, view, posX, posY, rwidth, rheight);				}	}