/** * Center all of the MapViewManager-s at the given point * * @param mp new projection * @param viewManagers ViewManagers to center * @throws RemoteException On badness * @throws VisADException On badness */ public void center(MapProjection mp, List viewManagers) throws VisADException, RemoteException { for (int i = 0; i < viewManagers.size(); i++) { ViewManager viewManager = (ViewManager) viewManagers.get(i); if (!(viewManager instanceof MapViewManager)) { continue; } MapViewManager mvm = (MapViewManager) viewManager; mvm.setMapProjection(mp, false); } }
/** * Set the projection on all MapViewManagers to be the projection of the first display. * * @param viewManagers ViewManagers to center * @throws RemoteException On badness * @throws VisADException On badness */ public void center(List viewManagers) throws VisADException, RemoteException { for (int i = 0; i < viewManagers.size(); i++) { ViewManager viewManager = (ViewManager) viewManagers.get(i); if (!(viewManager instanceof MapViewManager)) { continue; } ((MapViewManager) viewManager).setProjectionFromFirstDisplay(); } }
/** * Find the first {@link ViewManager} in the list and have it show its @[link * ucar.unidata.view.geoloc.ProjectionManager}. */ public void showProjectionManager() { for (int i = 0; i < viewManagers.size(); i++) { ViewManager vm = (ViewManager) viewManagers.get(i); if (vm instanceof MapViewManager) { ((MapViewManager) vm).showProjectionManager(); break; } } }