Iterator it = iterator(); OMGraphic graphic; while (it.hasNext()) { graphic = (OMGraphic)it.next(); if (graphic instanceof OMGrid) { ((OMGrid)graphic).setGenerator(generator); if (proj != null) { graphic.generate(proj);
synchronized (graphics) { Iterator it = iterator(); OMGraphic graphic; while (it.hasNext()) { graphic = (OMGraphic)it.next(); if (graphic instanceof OMGrid) { ((OMGrid)graphic).setGenerator(generator); if (proj != null) { graphic.generate(proj); }
    public void setGridGenerator(OMGridGenerator generator, Projection proj) {	Iterator it = iterator();	OMGraphic graphic;	while (it.hasNext()) {	    graphic = (OMGraphic)it.next();	    if (graphic instanceof OMGrid) {		((OMGrid)graphic).setGenerator(generator);		if (proj != null) {		    graphic.generate(proj);		}	    }	}    }