Example #1
0
 /**
  * Check if we need to show/hide the max data distance box
  *
  * @throws RemoteException On badness
  * @throws VisADException On badness
  */
 public void checkBoxVisibility() throws VisADException, RemoteException {
   if (maxDistanceBox == null) {
     return;
   }
   if ((maxDataDistance == null) || !super.isVisible()) {
     maxDistanceBox.setVisible(false);
   } else {
     double km = maxDataDistance.getValue(CommonUnit.meter) / 1000.0;
     if (km > 2000) {
       maxDistanceBox.setVisible(false);
     } else {
       if (control != null) {
         maxDistanceBox.setVisible(control.shouldBeVisible(this));
       }
     }
   }
 }