src/net/java/sip/communicator/impl/neomedia/MediaConfigurationImpl.java
/**
     * Indicates that one of the contained in this panel buttons has been
     * clicked.
     * @param e the <tt>ActionEvent</tt> that notified us
     */
Indicates that one of the contained in this panel buttons has been
clicked.
@param e the ActionEvent that notified us
Indicates that one of the contained in this panel buttons has been clicked . @param e the ActionEvent that notified us
public void actionPerformed(ActionEvent e)
    {
        boolean isPlaybackEvent = (e.getSource() == playbackPlaySoundButton);
        if(isPlaybackEvent
                || e.getSource() == notificationPlaySoundButton)
        {
            AudioNotifierService audioNotifServ
                = NeomediaActivator.getAudioNotifierService();
            String testSoundFilename
                = NeomediaActivator.getConfigurationService()
                    .getString(
                            TEST_SOUND_FILENAME_PROP,
                            NeomediaActivator.getResources().getSoundPath(
                                "TEST_SOUND")
                            );
            SCAudioClip sound = audioNotifServ.createAudio(
                    testSoundFilename,
                    isPlaybackEvent);
            sound.play();
        }
        else if(e.getSource() == playbackCombo
                || e.getSource() == notifyCombo)
        {
            DeviceConfigurationComboBoxModel.CaptureDevice device
                = (DeviceConfigurationComboBoxModel.CaptureDevice)
                    ((JComboBox) e.getSource()).getSelectedItem();
            boolean isEnabled = (device.info != null);
            if(e.getSource() == playbackCombo)
            {
                playbackPlaySoundButton.setEnabled(isEnabled);
            }
            else
            {
                notificationPlaySoundButton.setEnabled(isEnabled);
            }
        }
    }
public void actionPerformed ( ActionEvent e ) { boolean isPlaybackEvent = ( e . getSource ( ) == playbackPlaySoundButton ) ; if ( isPlaybackEvent || e . getSource ( ) == notificationPlaySoundButton ) { AudioNotifierService audioNotifServ = NeomediaActivator . getAudioNotifierService ( ) ; String testSoundFilename = NeomediaActivator . getConfigurationService ( ) . getString ( TEST_SOUND_FILENAME_PROP , NeomediaActivator . getResources ( ) . getSoundPath ( "TEST_SOUND" ) ) ; SCAudioClip sound = audioNotifServ . createAudio ( testSoundFilename , isPlaybackEvent ) ; sound . play ( ) ; } else if ( e . getSource ( ) == playbackCombo || e . getSource ( ) == notifyCombo ) { DeviceConfigurationComboBoxModel . CaptureDevice device = ( DeviceConfigurationComboBoxModel . CaptureDevice ) ( ( JComboBox ) e . getSource ( ) ) . getSelectedItem ( ) ; boolean isEnabled = ( device . info != null ) ; if ( e . getSource ( ) == playbackCombo ) { playbackPlaySoundButton . setEnabled ( isEnabled ) ; } else { notificationPlaySoundButton . setEnabled ( isEnabled ) ; } } }
Indicates that one of the contained in this panel buttons has been
 clicked.
Indicates that one of the contained in this panel buttons has been clicked .
// If the user clicked on one pley sound button. // If the selected item of the playback or notify combobox has changed.