ui/src/main/java/ucar/nc2/ui/simplegeom/SimpleGeomController.java
boolean showDataset() {

      // temp kludge for initialization
    java.util.List grids = gridDataset.getGrids();
    if ((grids == null) || grids.size() == 0) {
      javax.swing.JOptionPane.showMessageDialog(null, "No gridded fields in file "+gridDataset.getTitle());
      return false;
    }

    currentField = (GridDatatype) grids.get(0);
    currentSlice = 0;
    currentLevel = 0;
    currentTime = 0;
    currentEnsemble = 0;
    currentRunTime = 0;

    eventsOK = false; // dont let this trigger redraw
    renderGrid.setGeoGrid( currentField);
    ui.setFields( gridDataset.getGrids());
    setField( currentField);

    // if possible, change the projection and the map area to one that fits this
    // dataset
    ProjectionImpl dataProjection = currentField.getProjection();
    if (dataProjection != null)
       setProjection(dataProjection);

    // ready to draw
    //draw(true);

    // events now ok
    eventsOK = true;
    return true;
  }
boolean showDataset() {

      // temp kludge for initialization
    java.util.List grids = gridDataset.getGrids();
    if ((grids == null) || grids.size() == 0) {
      javax.swing.JOptionPane.showMessageDialog(null, "No gridded fields in file "+gridDataset.getTitle());
      return false;
    }

    currentField = (GridDatatype) grids.get(0);
    currentSlice = 0;
    currentLevel = 0;
    currentTime = 0;
    currentEnsemble = 0;
    currentRunTime = 0;

    eventsOK = false; // dont let this trigger redraw
    renderGrid.setGeoGrid( currentField);
    ui.setFields( gridDataset.getGrids());
    setField( currentField);

    // if possible, change the projection and the map area to one that fits this
    // dataset
    ProjectionImpl dataProjection = currentField.getProjection();
    if (dataProjection != null)
       setProjection(dataProjection);

    // ready to draw
    //draw(true);

    // events now ok
    eventsOK = true;
    return true;
  }
boolean showDataset ( ) { // temp kludge for initialization
 java . util . List grids = gridDataset . getGrids ( ) ; if ( ( grids == null ) || grids . size ( ) == 0 ) { javax . swing . JOptionPane . showMessageDialog ( null , "No gridded fields in file " + gridDataset . getTitle ( ) ) ; return false ; } currentField = ( GridDatatype ) grids . get ( 0 ) ; currentSlice = 0 ; currentLevel = 0 ; currentTime = 0 ; currentEnsemble = 0 ; currentRunTime = 0 ; eventsOK = false ; // dont let this trigger redraw
 renderGrid . setGeoGrid ( currentField ) ; ui . setFields ( gridDataset . getGrids ( ) ) ; setField ( currentField ) ; // if possible, change the projection and the map area to one that fits this
 // dataset
 ProjectionImpl dataProjection = currentField . getProjection ( ) ; if ( dataProjection != null ) setProjection ( dataProjection ) ; // ready to draw
 //draw(true);
 // events now ok
 eventsOK = true ; return true ; }
assume that its done in the event thread
assume that its done in the event thread