Revision c03d27b9
Added by Katja Luther over 4 years ago
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/configurator/PublishSubTreeConfiguratorWizardPage.java | ||
---|---|---|
24 | 24 |
import org.eclipse.swt.widgets.Composite; |
25 | 25 |
import org.eclipse.swt.widgets.Display; |
26 | 26 |
import org.eclipse.swt.widgets.Event; |
27 |
import org.eclipse.swt.widgets.Label; |
|
27 | 28 |
import org.eclipse.swt.widgets.Listener; |
28 | 29 |
|
29 | 30 |
import eu.etaxonomy.cdm.api.service.config.PublishForSubtreeConfigurator; |
... | ... | |
95 | 96 |
} |
96 | 97 |
btnPublish.addSelectionListener(this); |
97 | 98 |
|
98 |
|
|
99 |
// Composite control = toolkit.createComposite(composite); |
|
100 | 99 |
btnIncludeAcceptedTaxa = new Button(control, SWT.CHECK); |
101 | 100 |
btnIncludeAcceptedTaxa.setText(Messages.SetPublishConfiguration_IncludeAcceptedTaxa); |
102 |
// btnIncludeAcceptedTaxa.setSelection(configurator.isIncludeAcceptedTaxa()); |
|
103 |
// btnIncludeAcceptedTaxa.addListener(SWT.Selection, new Listener() { |
|
104 |
// @Override |
|
105 |
// public void handleEvent(Event e) { |
|
106 |
// Button b = (Button) e.widget; |
|
107 |
// GridData data = (GridData) btnIncludeAcceptedTaxa.getLayoutData(); |
|
108 |
// data.exclude = b.getSelection(); |
|
109 |
// |
|
110 |
// btnIncludeSharedTaxa.setVisible(data.exclude); |
|
111 |
// if (!btnIncludeSynonyms.getSelection() && !data.exclude && !btnIncludeHybrids.getSelection() && !btnIncludeMisappliedNames.getSelection() && !btnIncludeProParteSynonyms.getSelection()){ |
|
112 |
// setPageComplete(false); |
|
113 |
// }else{ |
|
114 |
// setPageComplete(true); |
|
115 |
// } |
|
116 |
// } |
|
117 |
// }); |
|
118 |
|
|
119 |
|
|
120 |
btnIncludeSharedTaxa = new Button(control, SWT.CHECK); |
|
121 |
GridData gd_btnIncludeSharedTaxa = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1); |
|
122 |
gd_btnIncludeSharedTaxa.horizontalIndent = 10; |
|
123 |
btnIncludeSharedTaxa.setLayoutData(gd_btnIncludeSharedTaxa); |
|
124 |
btnIncludeSharedTaxa.setText(Messages.SetPublishConfiguration_IncludeSharedtaxa); |
|
125 |
btnIncludeSharedTaxa.setSelection(configurator.isIncludeSharedTaxa()); |
|
101 |
btnIncludeAcceptedTaxa.addSelectionListener(this); |
|
126 | 102 |
|
127 | 103 |
btnIncludeMisappliedNames = new Button(control, SWT.CHECK); |
128 | 104 |
btnIncludeMisappliedNames.setText(Messages.SetPublishConfiguration_IncludeMisappliedNames); |
129 |
// btnIncludeMisappliedNames.setSelection(configurator.isIncludeMisapplications()); |
|
130 |
// btnIncludeMisappliedNames.addListener(SWT.Selection, new Listener() { |
|
131 |
// @Override |
|
132 |
// public void handleEvent(Event e) { |
|
133 |
// Button b = (Button) e.widget; |
|
134 |
// GridData data = (GridData) btnIncludeMisappliedNames.getLayoutData(); |
|
135 |
// data.exclude = b.getSelection(); |
|
136 |
// |
|
137 |
// if (!btnIncludeSynonyms.getSelection() && !data.exclude && !btnIncludeAcceptedTaxa.getSelection() && !btnIncludeProParteSynonyms.getSelection() && !btnIncludeHybrids.getSelection()){ |
|
138 |
// setPageComplete(false); |
|
139 |
// }else{ |
|
140 |
// setPageComplete(true); |
|
141 |
// } |
|
142 |
// } |
|
143 |
// }); |
|
144 |
|
|
105 |
btnIncludeMisappliedNames.addSelectionListener(this); |
|
145 | 106 |
|
146 | 107 |
btnIncludeProParteSynonyms = new Button(control, SWT.CHECK); |
147 | 108 |
btnIncludeProParteSynonyms.setText(Messages.SetPublishConfiguration_IncludeProParteSynonyms); |
148 |
// btnIncludeProParteSynonyms.setSelection(configurator.isIncludeProParteSynonyms()); |
|
149 |
// btnIncludeProParteSynonyms.addListener(SWT.Selection, new Listener() { |
|
150 |
// @Override |
|
151 |
// public void handleEvent(Event e) { |
|
152 |
// Button b = (Button) e.widget; |
|
153 |
// GridData data = (GridData) btnIncludeProParteSynonyms.getLayoutData(); |
|
154 |
// data.exclude = b.getSelection(); |
|
155 |
// |
|
156 |
// if (!btnIncludeSynonyms.getSelection() && !data.exclude && !btnIncludeAcceptedTaxa.getSelection() && !btnIncludeMisappliedNames.getSelection() && !btnIncludeHybrids.getSelection()){ |
|
157 |
// setPageComplete(false); |
|
158 |
// }else{ |
|
159 |
// setPageComplete(true); |
|
160 |
// } |
|
161 |
// } |
|
162 |
// }); |
|
109 |
btnIncludeProParteSynonyms.addSelectionListener(this); |
|
163 | 110 |
|
164 | 111 |
btnIncludeHybrids = new Button(control, SWT.CHECK); |
165 | 112 |
btnIncludeHybrids.setText(Messages.SetPublishConfiguration_IncludeHybrids); |
166 |
// btnIncludeHybrids.setSelection(configurator.isIncludeHybrids()); |
|
167 |
// btnIncludeHybrids.addListener(SWT.Selection, new Listener() { |
|
168 |
// @Override |
|
169 |
// public void handleEvent(Event e) { |
|
170 |
// Button b = (Button) e.widget; |
|
171 |
// GridData data = (GridData) btnIncludeHybrids.getLayoutData(); |
|
172 |
// data.exclude = b.getSelection(); |
|
173 |
// |
|
174 |
// if (!btnIncludeSynonyms.getSelection() && !data.exclude && !btnIncludeAcceptedTaxa.getSelection() && !btnIncludeMisappliedNames.getSelection() && !btnIncludeProParteSynonyms.getSelection()){ |
|
175 |
// setPageComplete(false); |
|
176 |
// }else{ |
|
177 |
// setPageComplete(true); |
|
178 |
// } |
|
179 |
// } |
|
180 |
// }); |
|
113 |
btnIncludeHybrids.addSelectionListener(this); |
|
181 | 114 |
|
182 | 115 |
btnIncludeSynonyms = new Button(control, SWT.CHECK); |
183 | 116 |
btnIncludeSynonyms.setText(Messages.SetPublishConfiguration_IncludeSynonyms); |
184 |
// btnIncludeSynonyms.setSelection(configurator.isIncludeSynonyms()); |
|
185 |
// btnIncludeSynonyms.addListener(SWT.Selection, new Listener() { |
|
186 |
// @Override |
|
187 |
// public void handleEvent(Event e) { |
|
188 |
// Button b = (Button) e.widget; |
|
189 |
// GridData data = (GridData) btnIncludeSynonyms.getLayoutData(); |
|
190 |
// data.exclude = b.getSelection(); |
|
191 |
// |
|
192 |
// if (!btnIncludeAcceptedTaxa.getSelection() && !data.exclude && !btnIncludeHybrids.getSelection() && !btnIncludeMisappliedNames.getSelection() && !btnIncludeProParteSynonyms.getSelection()){ |
|
193 |
// setPageComplete(false); |
|
194 |
// }else{ |
|
195 |
// setPageComplete(true); |
|
196 |
// } |
|
197 |
// |
|
198 |
// } |
|
199 |
// }); |
|
200 | 117 |
|
118 |
Label space = new Label(control, SWT.NONE); |
|
119 |
|
|
120 |
btnIncludeSharedTaxa = new Button(control, SWT.CHECK); |
|
121 |
btnIncludeSharedTaxa.setText(Messages.SetPublishConfiguration_IncludeSharedtaxa); |
|
201 | 122 |
|
202 | 123 |
m_bindingContext = initDataBindings(); |
203 | 124 |
|
... | ... | |
265 | 186 |
} else{ |
266 | 187 |
configurator.setPublish(true); |
267 | 188 |
} |
189 |
if (!btnIncludeMisappliedNames.getSelection() && !btnIncludeAcceptedTaxa.getSelection() && !btnIncludeProParteSynonyms.getSelection() ){ |
|
190 |
btnIncludeSharedTaxa.setEnabled(false); |
|
191 |
}else{ |
|
192 |
btnIncludeSharedTaxa.setEnabled(true); |
|
268 | 193 |
|
194 |
} |
|
269 | 195 |
} |
270 | 196 |
|
271 | 197 |
|
Also available in: Unified diff
ref #8447: move shared taxa and disable if not needed