(this == view.getHilitedObject())
(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();	double Rscale = getRscale();	// 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);		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);		int recordSize = (int)(Constants.RECORD_HEIGHT * Rscale);		// middle line		int ox = (int) (10 * Rscale);		int ly = (int) (rry + recordSize);		g.drawLine(rrx + ox, ly, rrx + rwidth - ox, ly);		// show VAL value and timestamp		if (inDebugMode)		{			// additional middle line has to be drawn			ly += recordSize;			g.drawLine(rrx + ox, ly, rrx + rwidth - ox, ly);			Color col = g.getColor();			g.setColor(debugValueColor);			if (valueFont != null) {				g.setFont(valueFont);				g.drawString(value, rrx + valueX, rry + valueY + recordSize);			}			if (timestampFont != null) {				g.setFont(timestampFont);				g.drawString(timestamp, rrx + timestampX, rry + timestampY + recordSize);			}			// draw a nice clock			if (!debugConnected)				drawDebugTimeout(g, debugTimeoutHour, debugTimeoutMinute, rrx, rry, rwidth, rheight);			g.setColor(col);		}		if (getFont() != null) {			g.setFont(getFont());			g.drawString(getLabel(), rrx + getRlabelX(), rry + getRlabelY());		}		if (typeFont != null) {			g.setFont(typeFont);			g.drawString(label2, rrx + rtypeLabelX, rry + rtypeLabelY);		}		if (fieldFont != null) {			g.setFont(fieldFont);			FontMetrics fm = FontMetricsBuffer.getInstance().getFontMetrics(fieldFont);			String val;			VDBFieldData fd;			int px = rrx + rfieldLabelX;			int py0 = rry + rfieldLabelY;			int py = py0; int n = 0;			Enumeration e = changedFields.elements();			while (e.hasMoreElements()) {				fd = (VDBFieldData) (e.nextElement());				val = fd.getName() + "=" + fd.getValue();				while (val.length() > 1 && (fm.stringWidth(val) + ox) > rwidth)					val = val.substring(0, val.length() - 2); // !!! TODO !!!									// make monitored fields visible				if (inDebugMode && fd.getVisibility() == InspectableProperty.ALWAYS_VISIBLE)				{					Color col = g.getColor();					g.setColor(Color.YELLOW);					g.drawString(val, px, py);					g.setColor(col);				}				else					g.drawString(val, px, py);									py = py0 + (int)((++n)*rfieldRowHeight);			}		}		// fwdlink support		if (!disconnected && (outlinks.size() > 0)) {			Color recordColor = g.getColor();			Color linkColor = recordColor;			if (outlinks.firstElement() instanceof VisibleObject)				linkColor = ((VisibleObject) outlinks.firstElement()).getColor();			if (linkColor==Constants.BACKGROUND_COLOR)				if (linkColor==Color.black)					linkColor=Color.white;				else					linkColor=Color.black;			// draw link and its tail			boolean isRightSide = isRight();			int r = (int)(Constants.LINK_RADIOUS * Rscale);			int cy = (int)(Rscale*getInY()- view.getRy());			int ccx = (int)(Rscale*getInX()- view.getRx());			int cx;			if (isRightSide) {				cx = rrx + rwidth + r;				g.drawOval(cx - r, cy - r, 2 * r, 2 * r);				g.setColor(linkColor);				g.drawLine(cx + 2 * r, cy, ccx, cy);			} else {				cx = rrx - r;				g.drawOval(cx - r, cy - r, 2 * r, 2 * r);				g.setColor(linkColor);				g.drawLine(ccx, cy, cx - 2 * r, cy);			}			// !!! more intergroup inlinks?!			LinkDrawer.drawInIntergroupLink(				g,				(OutLink) outlinks.firstElement(),				this,				isRightSide);		}	}	if (!hilited)		paintSubObjects(g, hilited);}