// Update a sound in the displayed buttons, sound list, and sound file // soundClip - An object storing information about the added or updated sound public void updateSound(SoundInfo soundClip) { // Add the sound to the project SoundInfo newSound = soundManager.addSound(soundClip); if (newSound != null) { // Add a new button to the GUI addSound(newSound); } if (soundManager.getProjectModified()) { if (newSound == null) { // An existing sound was updated // Update the button label and tooltip for (int s = 0; s < soundList.size(); s++) { BoardButton button = soundList.get(s); if (button.getKeyCode() == soundClip.getKeyCode()) { button.updateButtonText(); break; } } } // Update the GUI frame.setProjectModified(); refreshSoundBoard(); } }