Revision da948591
Added by Katja Luther almost 7 years ago
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/databaseAdmin/wizard/DatabasePreferencesPage.java | ||
---|---|---|
13 | 13 |
import org.eclipse.jface.preference.IPreferenceStore; |
14 | 14 |
import org.eclipse.jface.wizard.IWizard; |
15 | 15 |
import org.eclipse.jface.wizard.IWizardPage; |
16 |
import org.eclipse.jface.wizard.WizardPage; |
|
17 | 16 |
import org.eclipse.swt.SWT; |
18 | 17 |
import org.eclipse.swt.events.SelectionAdapter; |
19 | 18 |
import org.eclipse.swt.events.SelectionEvent; |
20 |
import org.eclipse.swt.layout.GridData; |
|
21 | 19 |
import org.eclipse.swt.layout.GridLayout; |
22 | 20 |
import org.eclipse.swt.widgets.Button; |
23 | 21 |
import org.eclipse.swt.widgets.Combo; |
24 | 22 |
import org.eclipse.swt.widgets.Composite; |
25 | 23 |
import org.eclipse.swt.widgets.Label; |
26 |
import org.eclipse.swt.widgets.TabFolder; |
|
27 |
import org.eclipse.swt.widgets.TabItem; |
|
28 | 24 |
|
29 | 25 |
import eu.etaxonomy.cdm.io.specimen.abcd206.in.Abcd206ImportConfigurator; |
30 | 26 |
import eu.etaxonomy.cdm.model.metadata.CdmPreference; |
... | ... | |
40 | 36 |
* @date 01.11.2016 |
41 | 37 |
* |
42 | 38 |
*/ |
43 |
public class DatabasePreferencesPage extends WizardPage implements IWizardPage{
|
|
39 |
public class DatabasePreferencesPage extends AbstractPreferenceWizard implements IWizardPage{
|
|
44 | 40 |
|
45 | 41 |
CdmPreference preferedNomenclaturalCode; |
46 | 42 |
NameDetailsConfigurator config ; |
... | ... | |
49 | 45 |
CdmPreference showCollectingAreaInGeneralSectionPreference; |
50 | 46 |
CdmPreference showTaxonAssociationsPreference; |
51 | 47 |
|
52 |
|
|
53 |
TabFolder tabFolder; |
|
54 |
|
|
55 |
IPreferenceStore preferenceStore; |
|
56 |
Composite composite; |
|
57 | 48 |
boolean isSimpleDetailsViewActivated; |
58 | 49 |
|
59 | 50 |
Composite child ; |
... | ... | |
67 | 58 |
ListComponent biocaseProviderList; |
68 | 59 |
Abcd206ImportConfigurator abcdImportConfigurator; |
69 | 60 |
|
70 |
|
|
71 |
// private UriWithLabelElement nomenclaturalCodeCombo; |
|
72 |
// private Label nomenclaturalCodeLabel; |
|
73 |
|
|
74 | 61 |
String[][] labelAndValues; |
75 | 62 |
|
76 | 63 |
/* |
... | ... | |
83 | 70 |
if (config == null){ |
84 | 71 |
config = new NameDetailsConfigurator(false); |
85 | 72 |
} |
86 |
setPreferenceStore(PreferencesUtil.getPreferenceStore()); |
|
87 | 73 |
|
88 |
} |
|
89 | 74 |
|
90 |
protected void setPreferenceStore(IPreferenceStore store){ |
|
91 |
this.preferenceStore = store; |
|
92 | 75 |
} |
93 | 76 |
|
94 | 77 |
|
95 |
|
|
96 |
|
|
97 |
/*** |
|
98 |
* Adds a tab to the page. |
|
99 |
* @param text the tab label |
|
100 |
*/ |
|
101 |
public Composite addTab(String text) { |
|
102 |
if (tabFolder == null){ |
|
103 |
// initialize tab folder |
|
104 |
if (composite == null) { |
|
105 |
composite = new Composite(getShell(), SWT.NONE); |
|
106 |
} |
|
107 |
tabFolder = new TabFolder(composite, SWT.NONE); |
|
108 |
tabFolder.setLayoutData(new GridData(GridData.FILL_BOTH)); |
|
109 |
} |
|
110 |
|
|
111 |
TabItem item = new TabItem(tabFolder, SWT.NONE); |
|
112 |
item.setText(text); |
|
113 |
|
|
114 |
Composite currentTab = new Composite(tabFolder, SWT.NULL); |
|
115 |
GridLayout layout = new GridLayout(); |
|
116 |
currentTab.setLayout(layout); |
|
117 |
currentTab.setFont(composite.getFont()); |
|
118 |
// currentTab.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); |
|
119 |
|
|
120 |
item.setControl(currentTab); |
|
121 |
return currentTab; |
|
122 |
|
|
123 |
} |
|
124 |
|
|
125 |
|
|
126 |
|
|
127 |
|
|
128 | 78 |
protected IPreferenceStore doGetPreferenceStore() { |
129 | 79 |
return PreferencesUtil.getPreferenceStore(); |
130 | 80 |
} |
Also available in: Unified diff
add abcd import configuration to preferences