if (forceRedraw || (!fastDrawing && !fastDrawingOnce && !drawOnlyHilitedOnce)) { forceRedraw=false; redraw(g); } else {
if (fastDrawing || fastDrawingOnce || drawOnlyHilitedOnce || !forceRedraw) {
public void draw(Graphics g) {	// better solution?	FontMetricsBuffer.createInstance(g);		ViewState view = ViewState.getInstance();			if (forceRedraw || (!fastDrawing && !fastDrawingOnce && !drawOnlyHilitedOnce)) {		forceRedraw=false;		redraw(g);	} else {		// copy devices buffer		copyCanvasImage(g);		fastDrawingOnce=false;	}		// fix offset/*	int prevRX = view.getRx(); int prevRY = view.getRy();	view.setRx(prevRX-x0); view.setRy(prevRY-y0);*/	double prevDRX = view.getDrx(); double prevDRY = view.getDry();	view.setDrx(prevDRX-x0); view.setDry(prevDRY-y0);	// draw selected	Enumeration selected = view.getSelectedObjects().elements();	while (selected.hasMoreElements())		((VisibleObject)selected.nextElement()).paint(g, true);		// draw selected	if (view.isBlinkState()) {		Enumeration blinking = view.getBlinkingObjects().elements();		while (blinking.hasMoreElements())			((VisibleObject)blinking.nextElement()).paint(g, true);		}				if ((mouseOperation==ZOOM_SELECTION) ||		(mouseOperation==OBJECT_SELECTION)) {		int px = Math.min(pressedX, draggedX);		int py = Math.min(pressedY, draggedY);		int w = Math.abs(pressedX-draggedX);		int h = Math.abs(pressedY-draggedY);				g.setColor(Color.red);		g.drawRect(px+view.getX0(), py+view.getY0(), w, h);	}	else if (mouseOperation==LINK_OPERATION) {	}	else if (drawOnlyHilitedOnce || alsoDrawHilitedOnce) {				// hilite object		if (view.getHilitedObject()!=null) view.getHilitedObject().paint(g, true);		drawOnlyHilitedOnce=alsoDrawHilitedOnce=false;	}	// restore offset	view.setDrx(prevDRX); view.setDry(prevDRY);	//view.setRx(prevRX); view.setRy(prevRY);	if (Settings.getInstance().getNavigator())		drawNavigator(g);	}