else
} else {
    public void paint(Graphics g)    {	// Debug.out("SCR:paint enter " + ((Node)elem).getUUID());	long range = latest - earliest;	Dimension cellDim = getSize();	g.setFont(defaultFont);	if ( defaultFontMetrics == null ) {	    defaultFontMetrics = g.getFontMetrics();	    fontHeight = defaultFontMetrics.getHeight();	    fontDescent = defaultFontMetrics.getDescent();	}		g.setColor(Color.black);	g.fillRect(0, 0, cellDim.width - 1, cellDim.height - 1);	if ( isSelected ) {	    g.setColor(Color.yellow);	    g.drawRect(2, 2, cellDim.width - 2, cellDim.height - 2);	    g.setColor(Color.black);	}	if ( (start == 0 || end == 0)	     && (estStart == 0 || estEnd == 0) ) {	    String string;	    if ( !isTransport ) {		  if (wasQueried) {			g.setColor(TPFDDColor.TPFDDGray);			string = "No cargo in unit";		  } else {		    if (assetModel) {		      g.setColor(Color.black);		      string = "";		    } else { 			g.setColor(TPFDDColor.TPFDDDarkGray); 			string = "Not yet queried";		    }		  }	    }		else {		g.setColor(TPFDDColor.TPFDDPink);		string = "Missing schedule information";	    }	    g.fillRect(50, 2, cellDim.width - 100, cellDim.height - 5);	    g.setColor(Color.white);	    drawCenteredString(g, string, cellDim.width / 2, cellDim.height / 2, Color.white);	    return;	}	int startLoc = 0, endLoc = 0;	String startDateString = null, endDateString = null;	String minStartString = null;	int width;	boolean dataFound = false;	if ( start != 0 && end != 0 ) {	    // Debug.out("SCR:paint using start " + start + " end " + end);	  	  if (debug) 		System.out.println ("SchedulerCellRenderer.paint using start " + start + " end " + end);	    dataFound = true;	    //	    if ( end - start < (3600 * 1000 * 48) ) {		startDateString = Node.longDate(elem.getActualStart());		endDateString = Node.longDate(elem.getActualEnd());		//	    }		//	    else {		//		startDateString = Node.shortDate(elem.getActualStart());		//		endDateString = Node.shortDate(elem.getActualEnd());		//	    }	    startLoc = (int)((start - earliest) * (cellDim.width - 2*EDGEWIDTH) / range) + EDGEWIDTH;	    endLoc = (int)((end - earliest) * (cellDim.width - 2*EDGEWIDTH) / range) + EDGEWIDTH;	    // draw Actual Schedule Bar	    switch( elem.getMode() ) {		case Node.MODE_GROUND:		    g.setColor(TPFDDColor.TPFDDDullerYellow);		    break;		case Node.MODE_SEA:		    g.setColor(TPFDDColor.TPFDDGreen);		    break;		case Node.MODE_AIR:		    g.setColor(TPFDDColor.TPFDDBlue);		    break;	        case Node.MODE_ITINERARY:		    g.setColor(TPFDDColor.TPFDDBurgundy);		    break;	        case Node.MODE_AGGREGATE:		    g.setColor(TPFDDColor.TPFDDPurple);		    break;		case Node.MODE_UNKNOWN:		    g.setColor(Color.gray);		    break;		default:		    g.setColor(Color.red);		}		if (debug) {		  System.out.println ("SchedulerCellRenderer.paint width "+ (endLoc-startLoc) + 							  " start loc " + startLoc + " end " + endLoc);		  System.out.println ("SchedulerCellRenderer.paint height " + (cellDim.height - 5));		}			    g.fillRect(startLoc, 2, endLoc - startLoc, cellDim.height - 5);// 	    Following two lines did nothing because isContiguous always returned true// 	    if ( elem.getMode() == Node.MODE_ITINERARY && !elem.isContiguous() )// 		drawCenteredString(g, "DISCONTIGUOUS", cellDim.width / 2, cellDim.height / 2, Color.yellow);	}	// 	Following code segment would never be executed because estimated times never set anywhere// 	if ( estStart != 0 && estEnd != 0 ) {// 	    int estStartLoc = (int)((estStart - earliest) * (cellDim.width - 100) / range) + 50;// 	    int estEndLoc = (int)((estEnd - earliest) * (cellDim.width - 100) / range) + 50;// 	    g.setColor(TPFDDColor.TPFDDGreen);// 	    // draw Estimated Schedule Markers// 	    g.fillRect(estStartLoc, 2, 3, cellDim.height - 5);// 	    g.fillRect(estEndLoc - 3, 2, 3, cellDim.height - 5);// 	    if ( !dataFound ) { // Just estimated, but better than no string// 		dataFound = true;// 		startDateString = Node.longDate(elem.getEstimatedStart());// 		endDateString = Node.longDate(elem.getEstimatedEnd());// 		startLoc = estStartLoc;// 		endLoc = estEndLoc;// 	    }// 	}	g.setColor(Color.white);	// put start date if it fits	width = defaultFontMetrics.stringWidth(startDateString);	if ( startLoc - width - 4 >= 0 )	  g.drawString(startDateString, startLoc - width - 2, cellDim.height / 2				   + (fontHeight / 2 - fontDescent));	else if (debug)	  System.out.println ("SchedulerCellRenderer.paint not drawing startDate " + startDateString);		// put end date if it fits	width = defaultFontMetrics.stringWidth(endDateString);	if ( endLoc + width + 4 < cellDim.width )	  g.drawString(endDateString, endLoc + 2, cellDim.height / 2				   + (fontHeight / 2 - fontDescent));	else if (debug)	  System.out.println ("SchedulerCellRenderer.paint not drawing endDate " + endDateString);	if ( minStart != 0 ) {	    int minStartLoc = (int)((minStart - earliest) * (cellDim.width - 100) / range) + 50;	    if ( start >= minStart )		/* drawDiamond(g, minStartLoc, (cellDim.height / 2) - 1, Color.cyan) */;	    else		drawDiamond(g, minStartLoc, (cellDim.height / 2) - 1, Color.red);	    minStartString = Node.longDate(new Date(minStart));	    width = defaultFontMetrics.stringWidth(minStartString);	    // don't draw the string if it will overlap w/ the left edge	    if ( minStartLoc - width - 4 > startLoc ) {		g.setColor(Color.red);		g.drawString(minStartString,			     minStartLoc - width - 4, cellDim.height / 2 + (fontHeight / 2 - fontDescent));	    }	}	if ( minEnd != 0 ) {	    int minEndLoc = (int)((minEnd - earliest) * (cellDim.width - 100) / range) + 50;	    if ( end >= minEnd )		/* drawUpTriangle(g, minEndLoc, (cellDim.height / 2) - 1, Color.cyan) */;	    else		drawUpTriangle(g, minEndLoc, (cellDim.height / 2) - 1, Color.red);	}	if ( maxEnd != 0 ) {	    int maxEndLoc = (int)((maxEnd - earliest) * (cellDim.width - 100) / range) + 50;	    if ( end <= maxEnd )		/* drawDownTriangle(g, maxEndLoc, (cellDim.height / 2) + 1, Color.cyan) */;	    else		drawDownTriangle(g, maxEndLoc, (cellDim.height / 2) + 1, Color.red);	}    }