private void mergeSortMenuClicked(object sender, EventArgs e) { clearOldStuff(); NumberSwapListener old = theAlgorithm.getNumberSwapListener(); theAlgorithm = new MergeSort(); theAlgorithm.setNumberSwapListener(old); initializeGUI(); }
public void setNumberSwapListener(NumberSwapListener n) { this.numberSwapListener = n; }