public void displayChanged(final DisplayEvent e) throws VisADException, RemoteException {
   // TODO: write a method like isChannelUpdate(EVENT_ID)? or maybe just
   // deal with a super long if-statement and put an "OR MOUSE_RELEASED"
   // up here?
   if (e.getId() == DisplayEvent.MOUSE_RELEASED_CENTER) {
     float val = (float) display.getDisplayRenderer().getDirectAxisValue(domainType);
     setWaveNumber(val);
     if (displayControl != null) displayControl.handleChannelChange(val);
   } else if (e.getId() == DisplayEvent.MOUSE_PRESSED_LEFT) {
     if (e.getInputEvent().isControlDown()) {
       xmap.setRange(initialRangeX[0], initialRangeX[1]);
       ymap.setRange(initialRangeY[0], initialRangeY[1]);
     }
   } else if (e.getId() == DisplayEvent.MOUSE_RELEASED) {
     float val = getSelectorValue(channelSelector);
     if (val != waveNumber) {
       // TODO: setWaveNumber needs to be rethought, as it calls
       // setSelectorValue which is redundant in the cases of dragging
       // or clicking
       setWaveNumber(val);
       if (displayControl != null) displayControl.handleChannelChange(val);
     }
   }
 }
 public float getSelectedValue() {
   float val = (float) display.getDisplayRenderer().getDirectAxisValue(domainType);
   if (Float.isNaN(val)) val = lastSelectedValue;
   return val;
 }