VisibleObject vo = view.getHilitedObject(); if (vo!=null && !view.getBlinkingObjects().contains(vo)) vo.paint(g, true);
LinkedHashSet objs = view.getHilitedObjects(); Iterator i = objs.iterator(); while (i.hasNext()) { VisibleObject vo = (VisibleObject)i.next(); if (vo!=null && !view.getBlinkingObjects().contains(vo)) vo.paint(g, true); }
public void draw(Graphics g) {	ViewState view = ViewState.getInstance();	// forceReadraw does not force really	if ((fastDrawing && !forceRedraw) || /*fastDrawingOnce ||*/ drawOnlyHilitedOnce || !forceRedraw) {		// copy devices buffer		copyCanvasImage(g);		//fastDrawingOnce=false;	} else {		forceRedraw=false;		redraw(g);	}		// 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);	if (!fastDrawing) {		// 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==OBJECT_MOVE && fastMove)  {  //fast move		Movable hilitedObject = (Movable)view.getHilitedObject();		g.setColor(Constants.GRID_COLOR);				if (view.isSelected(hilitedObject)) {			boolean ok = true;			int dx = draggedX-pressedX;			int dy = draggedY-pressedY;			Enumeration selected = view.getSelectedObjects().elements();			while (selected.hasMoreElements()) {				VisibleObject vo = (VisibleObject)selected.nextElement();				int rrx = vo.getRx() - view.getRx();				int rry = vo.getRy() - view.getRy();				int rwidth = vo.getRwidth();				int rheight = vo.getRheight();							g.drawRect(rrx+draggedX-pressedX, rry+draggedY-pressedY, rwidth, rheight);						}			}else {				VisibleObject vo = (VisibleObject)hilitedObject;								int rrx = vo.getRx() - view.getRx();				int rry = vo.getRy() - view.getRy();				int rwidth = vo.getRwidth();				int rheight = vo.getRheight();								g.drawRect(rrx+draggedX-pressedX, rry+draggedY-pressedY, rwidth, rheight);			}	}		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;	}	*/	// hilite object	if (!fastDrawing) {		VisibleObject vo = view.getHilitedObject();		if (vo!=null && !view.getBlinkingObjects().contains(vo)) vo.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);	}