else g.setColor((this==view.getHilitedObject()) ?
else g.setColor((view.isHilitedObject(this)) ?
	protected void draw(Graphics g, boolean hilited)	{		ViewState view = ViewState.getInstance();			int rrx = getRx()-view.getRx();		int rry = getRy()-view.getRy();		int rwidth = getRwidth();		int rheight = getRheight();					// clipping		if ((!(rrx>view.getViewWidth()) || (rry>view.getViewHeight())		    || ((rrx+rwidth)<0) || ((rry+rheight)<0))) {				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);			Color fillColor = g.getColor();								g.fillRect(rrx, rry, rwidth, rheight);			if (!hilited) g.setColor(Constants.FRAME_COLOR);			else g.setColor((this==view.getHilitedObject()) ? 							Constants.HILITE_COLOR : Constants.FRAME_COLOR);				g.drawRect(rrx, rry, rwidth, rheight);				// colors			if (invalidLinks.size()>0)			{				if (fillColor!=Color.red)					g.setColor(Color.red);				else					g.setColor(Color.black);			}			if (getFont()!=null) {				g.setFont(getFont());				g.drawString(getLabel(), rrx+getRlabelX(), rry+getRlabelY());			}			if (idFont!=null) {				g.setFont(idFont);				g.drawString(idlabel, rrx+ridLabelX, rry+ridLabelY);			}			// middle line			int ox = (int) (10 * getRscale());			//g.drawLine(rrx + ox, rry + rinitY, rrx + rwidth - ox, rry + rinitY);			//g.drawLine(rrx + ox, rry + rlinkY, rrx + rwidth - ox, rry + rlinkY);			if (fieldFont != null)			{				g.setFont(fieldFont);				FontMetrics fm = FontMetricsBuffer.getInstance().getFontMetrics(fieldFont);				String val;				int px = rrx + rfieldLabelX;				int py0 = rry + rfieldLabelY;				int py = py0; int n = 0;		 		java.util.Iterator e = templateData.getPropertiesV().iterator();				while (e.hasNext())				{									String name = e.next().toString();					val = name + "=" + templateData.getProperties().get(name).toString();					while ((fm.stringWidth(val) + ox) > rwidth)						val = val.substring(0, val.length() - 2);					g.drawString(val, px, py);					py = py0 + (int)((++n)*rfieldRowHeight);				}			}		}		paintSubObjects(g, hilited);	}