List of usage examples for org.eclipse.jface.preference FieldEditor getPreferenceName
public String getPreferenceName()
From source file:org.xmind.cathy.internal.GeneralPrefPage.java
License:Open Source License
public void propertyChange(PropertyChangeEvent event) { super.propertyChange(event); if (event.getSource() instanceof FieldEditor) { FieldEditor fe = (FieldEditor) event.getSource(); if (event.getProperty().equals(FieldEditor.VALUE)) { String prefName = fe.getPreferenceName(); if (CathyPlugin.AUTO_SAVE_ENABLED.equals(prefName)) { autoSaveIntervalsInput.setEnabled(((Boolean) event.getNewValue()).booleanValue()); // autoSaveIntervalsField.setEnabled( // (Boolean) event.getNewValue(), // autoSaveIntervalsParent); } else if (PrefConstants.AUTO_BACKUP_ENABLE.equals(prefName)) { autoBackup = ((Boolean) event.getNewValue()).booleanValue(); }//from w ww.j a v a 2s . c o m } } }
From source file:org.xmind.ui.internal.spelling.SpellingCheckPrefPage.java
License:Open Source License
public void propertyChange(PropertyChangeEvent event) { FieldEditor field = (FieldEditor) event.getSource(); if (SpellingPlugin.SPELLING_CHECK_ENABLED.equals(field.getPreferenceName())) { updateOptions(((BooleanFieldEditor) field).getBooleanValue()); }/* w w w . j ava 2 s . c om*/ super.propertyChange(event); }