Revision 43788452
Added by Katja Luther almost 8 years ago
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/menu/RankMenuPreferences.java | ||
---|---|---|
1 | 1 |
/** |
2 | 2 |
* Copyright (C) 2007 EDIT |
3 |
* European Distributed Institute of Taxonomy
|
|
3 |
* European Distributed Institute of Taxonomy |
|
4 | 4 |
* http://www.e-taxonomy.eu |
5 |
*
|
|
5 |
* |
|
6 | 6 |
* The contents of this file are subject to the Mozilla Public License Version 1.1 |
7 | 7 |
* See LICENSE.TXT at the top of this package for the full license terms. |
8 | 8 |
*/ |
... | ... | |
37 | 37 |
* <p>Constructor for RankMenuPreferences.</p> |
38 | 38 |
*/ |
39 | 39 |
public RankMenuPreferences() { |
40 |
super("Rank Preferences",
|
|
40 |
super("Rank Preferences", |
|
41 | 41 |
"Choose which ranks to display in the property sheet drop-down menu.", |
42 | 42 |
false); |
43 | 43 |
} |
... | ... | |
48 | 48 |
/** {@inheritDoc} */ |
49 | 49 |
@Override |
50 | 50 |
protected void createAdditionalContent(Composite container) { |
51 |
|
|
51 |
|
|
52 | 52 |
final Button checkbox = new Button(container, SWT.CHECK); |
53 | 53 |
checkbox.setText("Sort ranks hierarchically (default is alphabetically)"); |
54 |
|
|
54 |
|
|
55 | 55 |
checkbox.setSelection(PreferencesUtil.getSortRanksHierarchichally()); |
56 |
|
|
56 |
|
|
57 | 57 |
checkbox.addSelectionListener(new SelectionAdapter() { |
58 | 58 |
/* (non-Javadoc) |
59 | 59 |
* @see org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse.swt.events.SelectionEvent) |
60 | 60 |
*/ |
61 | 61 |
@Override |
62 | 62 |
public void widgetSelected(SelectionEvent e) { |
63 |
|
|
63 | 64 |
PreferencesUtil.setSortRanksHierarchichally(checkbox.getSelection()); |
64 |
refresh(getTerms()); |
|
65 |
|
|
65 | 66 |
} |
66 | 67 |
}); |
67 |
|
|
68 |
|
|
68 | 69 |
} |
69 |
|
|
70 |
|
|
70 | 71 |
/* (non-Javadoc) |
71 | 72 |
* @see eu.etaxonomy.taxeditor.preference.menu.AbstractMenuPreferences#getTermClass() |
72 | 73 |
*/ |
Also available in: Unified diff
fix #5821