public void selectRenderables(DrawContext dc, Sector vs) { // Select our renderables if (this.gridElements == null) createRenderables(); int gridStep = (int) this.size / 10; boolean drawMetricLabels = getSizeInPixels(dc) > MIN_CELL_SIZE_PIXELS * 4 * 1.7; String graticuleType = getTypeFor(gridStep); for (GridElement ge : this.gridElements) { if (ge.isInView(dc, vs)) { if (drawMetricLabels) metricScaleSupport.computeMetricScaleExtremes( this.UTMZone, this.hemisphere, ge, this.size); addRenderable(ge.renderable, graticuleType); } } if (getSizeInPixels(dc) <= MIN_CELL_SIZE_PIXELS * 4 * 2) return; // Select sub grids renderables if (this.subGrids == null) createSubGrids(); for (SquareGrid sg : this.subGrids) { if (sg.isInView(dc)) { sg.selectRenderables(dc, vs); } else sg.clearRenderables(); } }