blob: 3b321b97cbcbb8d32ef8c40bbf2f757e1546753c [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2007, 2012 IBM Corporation and Others
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Takashi ITOH - initial API and implementation
* Kentarou FUKUDA - initial API and implementation
*******************************************************************************/
package org.eclipse.actf.ai.tts.msp.preferences;
import org.eclipse.actf.ai.tts.msp.MspPlugin;
import org.eclipse.actf.ai.tts.msp.engine.MspVoice;
import org.eclipse.actf.ai.voice.preferences.util.ComboFieldEditor;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.swt.widgets.Composite;
public class MspVoiceFieldEditor extends ComboFieldEditor {
private static IPreferenceStore preferenceStore = MspPlugin.getDefault()
.getPreferenceStore();
public MspVoiceFieldEditor(String labelText, Composite parent) {
super(MspVoice.ID, labelText, null, parent);
}
protected void initLabelsAndValues(String[][] labelsAndValues) {
super
.initLabelsAndValues(MspTestManager.getInstance()
.getVoiceNames());
}
@Override
protected void fireValueChanged(String property, Object oldValue,
Object newValue) {
preferenceStore.setValue(MspVoice.ID, newValue.toString());
super.fireValueChanged(property, oldValue, newValue);
}
}