Revision e98bd118
Added by Katja Luther over 6 years ago
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/databaseAdmin/wizard/DatabasePreferencesPage.java | ||
---|---|---|
14 | 14 |
import org.eclipse.jface.wizard.IWizard; |
15 | 15 |
import org.eclipse.jface.wizard.IWizardPage; |
16 | 16 |
import org.eclipse.swt.SWT; |
17 |
import org.eclipse.swt.custom.ScrolledComposite; |
|
17 | 18 |
import org.eclipse.swt.events.SelectionAdapter; |
18 | 19 |
import org.eclipse.swt.events.SelectionEvent; |
19 | 20 |
import org.eclipse.swt.layout.GridLayout; |
... | ... | |
215 | 216 |
PreferencesUtil.getPreferenceStore().setValue(IPreferenceKeys.SHOW_TAXON_ASSOCIATIONS, isShowTaxonAssociation); |
216 | 217 |
} |
217 | 218 |
}); |
219 |
|
|
220 |
final Button showLifeFormButton = new Button(composite, SWT.CHECK); |
|
221 |
boolean isShowLifeForm = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_LIFE_FORM); |
|
222 |
showLifeFormButton.setText(Messages.DatabasePreferncesPage_Life_Form); |
|
223 |
showLifeFormButton.setSelection(isShowLifeForm); |
|
224 |
showLifeFormButton.addSelectionListener(new SelectionAdapter(){ |
|
225 |
@Override |
|
226 |
public void widgetSelected(SelectionEvent e) { |
|
227 |
boolean isShowLifeForm = showLifeFormButton.getSelection(); |
|
228 |
PreferencesUtil.getPreferenceStore().setValue(IPreferenceKeys.SHOW_LIFE_FORM, isShowLifeForm); |
|
229 |
} |
|
230 |
}); |
|
218 | 231 |
|
219 | 232 |
|
220 | 233 |
|
Also available in: Unified diff
ref #6722: add preference for show life form in field unit details view