ui/src/main/java/ucar/nc2/ui/point/StationRegionDateChooser.java
protected void redraw() {
    long tstart = System.currentTimeMillis();

    java.awt.Graphics2D gNP = np.getBufferedImageGraphics();
    if (gNP == null) // panel not drawn on screen yet
      return;

    // clear it
    gNP.setBackground(np.getBackgroundColor());
    java.awt.Rectangle r = gNP.getClipBounds();
    gNP.clearRect(r.x, r.y, r.width, r.height);

    if (regionSelect && geoSelectionMode) {
      if (geoSelection != null) drawBB(gNP, geoSelection, Color.cyan);
      if (geoBounds != null) drawBB(gNP, geoBounds, null);
      // System.out.println("GeoRegionChooser.redraw geoBounds= "+geoBounds);

      if (geoSelection != null) {
        // gNP.setColor( Color.orange);
        Navigation navigate = np.getNavigation();
        double handleSize = RubberbandRectangleHandles.handleSizePixels / navigate.getPixPerWorld();
        Rectangle2D rect = new Rectangle2D.Double(geoSelection.getX(), geoSelection.getY(), geoSelection.getWidth(), geoSelection.getHeight());
        RubberbandRectangleHandles.drawHandledRect(gNP, rect, handleSize);
        if (debug) System.out.println("GeoRegionChooser.drawHandledRect=" + handleSize + " = " + geoSelection);
      }
    }

    for (int i = 0; i < renderers.size(); i++) {
      ucar.nc2.ui.util.Renderer rend = (Renderer) renderers.get(i);
      rend.draw(gNP, atI);
    }
    gNP.dispose();

    if (debug) {
      long tend = System.currentTimeMillis();
      System.out.println("StationRegionDateChooser draw time = " + (tend - tstart) / 1000.0 + " secs");
    }

    // copy buffer to the screen
    np.repaint();
  }
protected void redraw() {
    long tstart = System.currentTimeMillis();

    java.awt.Graphics2D gNP = np.getBufferedImageGraphics();
    if (gNP == null) // panel not drawn on screen yet
      return;

    // clear it
    gNP.setBackground(np.getBackgroundColor());
    java.awt.Rectangle r = gNP.getClipBounds();
    gNP.clearRect(r.x, r.y, r.width, r.height);

    if (regionSelect && geoSelectionMode) {
      if (geoSelection != null) drawBB(gNP, geoSelection, Color.cyan);
      if (geoBounds != null) drawBB(gNP, geoBounds, null);
      // System.out.println("GeoRegionChooser.redraw geoBounds= "+geoBounds);

      if (geoSelection != null) {
        // gNP.setColor( Color.orange);
        Navigation navigate = np.getNavigation();
        double handleSize = RubberbandRectangleHandles.handleSizePixels / navigate.getPixPerWorld();
        Rectangle2D rect = new Rectangle2D.Double(geoSelection.getX(), geoSelection.getY(), geoSelection.getWidth(), geoSelection.getHeight());
        RubberbandRectangleHandles.drawHandledRect(gNP, rect, handleSize);
        if (debug) System.out.println("GeoRegionChooser.drawHandledRect=" + handleSize + " = " + geoSelection);
      }
    }

    for (int i = 0; i < renderers.size(); i++) {
      ucar.nc2.ui.util.Renderer rend = (Renderer) renderers.get(i);
      rend.draw(gNP, atI);
    }
    gNP.dispose();

    if (debug) {
      long tend = System.currentTimeMillis();
      System.out.println("StationRegionDateChooser draw time = " + (tend - tstart) / 1000.0 + " secs");
    }

    // copy buffer to the screen
    np.repaint();
  }
protected void redraw ( ) { long tstart = System . currentTimeMillis ( ) ; java . awt . Graphics2D gNP = np . getBufferedImageGraphics ( ) ; if ( gNP == null ) // panel not drawn on screen yet return ; // clear it gNP . setBackground ( np . getBackgroundColor ( ) ) ; java . awt . Rectangle r = gNP . getClipBounds ( ) ; gNP . clearRect ( r . x , r . y , r . width , r . height ) ; if ( regionSelect && geoSelectionMode ) { if ( geoSelection != null ) drawBB ( gNP , geoSelection , Color . cyan ) ; if ( geoBounds != null ) drawBB ( gNP , geoBounds , null ) ; // System.out.println("GeoRegionChooser.redraw geoBounds= "+geoBounds); if ( geoSelection != null ) { // gNP.setColor( Color.orange); Navigation navigate = np . getNavigation ( ) ; double handleSize = RubberbandRectangleHandles . handleSizePixels / navigate . getPixPerWorld ( ) ; Rectangle2D rect = new Rectangle2D . Double ( geoSelection . getX ( ) , geoSelection . getY ( ) , geoSelection . getWidth ( ) , geoSelection . getHeight ( ) ) ; RubberbandRectangleHandles . drawHandledRect ( gNP , rect , handleSize ) ; if ( debug ) System . out . println ( "GeoRegionChooser.drawHandledRect=" + handleSize + " = " + geoSelection ) ; } } for ( int i = 0 ; i < renderers . size ( ) ; i ++ ) { ucar . nc2 . ui . util . Renderer rend = ( Renderer ) renderers . get ( i ) ; rend . draw ( gNP , atI ) ; } gNP . dispose ( ) ; if ( debug ) { long tend = System . currentTimeMillis ( ) ; System . out . println ( "StationRegionDateChooser draw time = " + ( tend - tstart ) / 1000.0 + " secs" ) ; } // copy buffer to the screen np . repaint ( ) ; }
Redraw the graphics on the screen.
Redraw the graphics on the screen .