Search in sources :

Example 1 with SoftPhoneTabHandler

use of org.jivesoftware.sparkplugin.ui.call.SoftPhoneTabHandler in project Spark by igniterealtime.

the class SoftPhonePlugin method initialize.

/**
 * Called after Spark is loaded to initialize the new plugin. Load
 * Configuration from VCard and Instantiate a SoftPhoneManager
 */
public void initialize() {
    final SwingWorker initializeThread = new SwingWorker() {

        public Object construct() {
            PhoneManager.getInstance();
            softPhone = SoftPhoneManager.getInstance();
            return true;
        }

        public void finished() {
            if (softPhone.isPhoneEnabled()) {
                // Add TabHandler
                SparkManager.getChatManager().addSparkTabHandler(new SoftPhoneTabHandler());
                initializeUI();
            }
            SipCodecsPreference preference = new SipCodecsPreference();
            SparkManager.getPreferenceManager().addPreference(preference);
            preference.load();
        }
    };
    initializeThread.start();
}
Also used : SipCodecsPreference(org.jivesoftware.sparkplugin.preferences.SipCodecsPreference) SoftPhoneTabHandler(org.jivesoftware.sparkplugin.ui.call.SoftPhoneTabHandler) SwingWorker(org.jivesoftware.spark.util.SwingWorker)

Aggregations

SwingWorker (org.jivesoftware.spark.util.SwingWorker)1 SipCodecsPreference (org.jivesoftware.sparkplugin.preferences.SipCodecsPreference)1 SoftPhoneTabHandler (org.jivesoftware.sparkplugin.ui.call.SoftPhoneTabHandler)1