use of org.talend.commons.ui.swt.preferences.CheckBoxFieldEditor in project tdi-studio-se by Talend.
the class SpagoBiPreferencePage method createFieldEditors.
/*
* @Override protected IPreferenceStore doGetPreferenceStore() { // SpagoPreferenceStore preferenceStore = new
* SpagoPreferenceStore(ProxyRepositoryFactory.getInstance()); // try { // preferenceStore.load(); // } catch
* (PersistenceException e) { // String detailError = e.getMessage(); // new ErrorDialogWidthDetailArea(new Shell(),
* RepositoryPlugin.PLUGIN_ID, Messages // .getString("CommonWizard.persistenceException"), detailError);
* //$NON-NLS-1$ // log.error(Messages.getString("CommonWizard.persistenceException") + "\n" + detailError);
* //$NON-NLS-1$ // //$NON-NLS-2$ // } // return preferenceStore; return
* Activator.getDefault().getPreferenceStore(); }
*/
@Override
protected void createFieldEditors() {
parent = getFieldEditorParent();
spagoBiCheckButton = new CheckBoxFieldEditor(SpagoPreferenceInitializer.SPAGO_STATUS, Messages.getString("SpagoBiPreferencePage.spagoBiCheckButton"), //$NON-NLS-1$
parent);
editor = new SpagoBiServerEditor(SpagoBiServer.SPAGOBI_SERVER, Messages.getString("SpagoBiPreferencePage.technicalStatusLabel"), //$NON-NLS-1$
parent);
addField(editor);
updateEnableStateFromPreferences();
SelectionListener listener = new SelectionListener() {
public void widgetDefaultSelected(SelectionEvent e) {
}
public void widgetSelected(SelectionEvent e) {
IPreferenceStore preferenceStore = getPreferenceStore();
preferenceStore.setValue(SpagoPreferenceInitializer.SPAGO_STATUS, ((Button) e.getSource()).getSelection());
updateEnableStateFromDisplay();
}
};
spagoBiCheckButton.getButton().addSelectionListener(listener);
}
Aggregations