// zoomIn is called after the parts before and after have
 // already been detached from the Phrase.  They are
 // re-attached when we zoom out
 public void zoomIn(Phrase before, Phrase thePhrase, Phrase after) {
   phrase = thePhrase;
   beforeZoom = before;
   afterZoom = after;
   beforeZoom.empty();
   afterZoom.empty();
   setLocation(20, 20);
   show();
 }
  // Zoom in on the selected measures
  private void zoom() {
    int n = getIntegerValue(startMeasureEdit) - 1;
    int m = getIntegerValue(measureCountEdit);

    beforeZoom.empty();
    afterZoom.empty();

    moveMeasures(phrase, beforeZoom, n);
    moveAll(phrase, afterZoom);
    moveMeasures(afterZoom, phrase, n + m - countMeasures(beforeZoom));
  }
  // Recombine before, Phrase and after into longer Phrase
  public static void zoomOut(Phrase before, Phrase thePhrase, Phrase after) {
    for (int i = 0; i < thePhrase.size(); ++i) {
      before.addNote(thePhrase.getNote(i));
    }

    for (int i = 0; i < after.size(); ++i) {
      before.addNote(after.getNote(i));
    }

    thePhrase.empty();
    for (int i = 0; i < before.size(); ++i) {
      thePhrase.addNote(before.getNote(i));
    }

    before.empty();
    after.empty();
  }