Project

General

Profile

« Previous | Next » 

Revision 5fdf87f0

Added by Katja Luther almost 3 years ago

ref #9611: adapt taxeditor to changes in configurator

View differences:

eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/configurator/SetSecundumConfiguratorWizardPage.java
49 49
    private EntitySelectionElement<Reference> selectReference;
50 50
    private Button btnIncludeAcceptedTaxa;
51 51
    private Button btnIncludeSynonyms;
52
    private Button btnOverwriteExistingAccepted;
53
    private Button btnOverwriteExistingSynonyms;
54
    private Button btnOverwriteExistingRelations;
52
    private Button btnOverwriteExisting;
53
//    private Button btnOverwriteExistingSynonyms;
54
//    private Button btnOverwriteExistingRelations;
55 55
    private Button btnEmptySecundumDetail;
56 56
    private Button btnIncludeSharedTaxa;
57 57
    private Button btnIncludeMisappliedNamed;
......
92 92
        IObservableValue includeProparteSynonymsConfiguratorObserveValue = PojoProperties.value("includeProParteSynonyms").observe(configurator);
93 93
        bindingContext.bindValue(observeSelectionBtnIncludeProparteSynonyms, includeProparteSynonymsConfiguratorObserveValue, null, null);
94 94

  
95
        IObservableValue observeSelectionBtnOverwriteExistingAccepted = WidgetProperties.selection().observe(btnOverwriteExistingAccepted);
96
        IObservableValue overwriteExistingAcceptedConfiguratorObserveValue = PojoProperties.value("overwriteExistingAccepted").observe(configurator);
97
        bindingContext.bindValue(observeSelectionBtnOverwriteExistingAccepted, overwriteExistingAcceptedConfiguratorObserveValue, null, null);
95
        IObservableValue observeSelectionBtnOverwriteExisting = WidgetProperties.selection().observe(btnOverwriteExisting);
96
        IObservableValue overwriteExistingConfiguratorObserveValue = PojoProperties.value("overwriteExisting").observe(configurator);
97
        bindingContext.bindValue(observeSelectionBtnOverwriteExisting, overwriteExistingConfiguratorObserveValue, null, null);
98 98

  
99
        IObservableValue observeSelectionBtnOverwriteExistingSynonyms = WidgetProperties.selection().observe(btnOverwriteExistingSynonyms);
100
        IObservableValue overwriteExistingSynonymsConfiguratorObserveValue = PojoProperties.value("overwriteExistingSynonyms").observe(configurator);
101
        bindingContext.bindValue(observeSelectionBtnOverwriteExistingSynonyms, overwriteExistingSynonymsConfiguratorObserveValue, null, null);
102

  
103
        IObservableValue observeSelectionBtnOverwriteExistingRelations = WidgetProperties.selection().observe(btnOverwriteExistingRelations);
104
        IObservableValue overwriteExistingRelationsConfiguratorObserveValue = PojoProperties.value("overwriteExistingRelations").observe(configurator);
105
        bindingContext.bindValue(observeSelectionBtnOverwriteExistingRelations, overwriteExistingRelationsConfiguratorObserveValue, null, null);
99
//        IObservableValue observeSelectionBtnOverwriteExistingSynonyms = WidgetProperties.selection().observe(btnOverwriteExistingSynonyms);
100
//        IObservableValue overwriteExistingSynonymsConfiguratorObserveValue = PojoProperties.value("overwriteExistingSynonyms").observe(configurator);
101
//        bindingContext.bindValue(observeSelectionBtnOverwriteExistingSynonyms, overwriteExistingSynonymsConfiguratorObserveValue, null, null);
102
//
103
//        IObservableValue observeSelectionBtnOverwriteExistingRelations = WidgetProperties.selection().observe(btnOverwriteExistingRelations);
104
//        IObservableValue overwriteExistingRelationsConfiguratorObserveValue = PojoProperties.value("overwriteExistingRelations").observe(configurator);
105
//        bindingContext.bindValue(observeSelectionBtnOverwriteExistingRelations, overwriteExistingRelationsConfiguratorObserveValue, null, null);
106 106

  
107 107
        IObservableValue observeSelectionBtnEmptySecundumDetail = WidgetProperties.selection().observe(btnEmptySecundumDetail);
108 108
        IObservableValue emptySecundumDetailConfiguratorObserveValue = PojoProperties.value("emptySecundumDetail").observe(configurator);
......
175 175
                Button b = (Button) e.widget;
176 176
                GridData data = (GridData)  btnIncludeAcceptedTaxa.getLayoutData();
177 177
                data.exclude = b.getSelection();
178
                btnOverwriteExistingAccepted.setVisible(data.exclude);
178

  
179 179
                btnIncludeSharedTaxa.setVisible(data.exclude);
180
                boolean isEnabled = true;
180 181
                if (!btnIncludeSynonyms.getSelection() && !data.exclude){
181
                    btnEmptySecundumDetail.setVisible(false);
182
                    setPageComplete(false);
183
                }else{
184
                    btnEmptySecundumDetail.setVisible(true);
185
                    setPageComplete(true);
182
                    isEnabled = false;
186 183
                }
184
                btnOverwriteExisting.setVisible(isEnabled);
185
                btnEmptySecundumDetail.setVisible(isEnabled);
186
                setPageComplete(isEnabled);
187 187
            }
188 188
        });
189 189

  
190
                btnOverwriteExistingAccepted = new Button(control, SWT.CHECK);
191
                GridData gd_btnOverwriteExistingAccepted = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);
192
                gd_btnOverwriteExistingAccepted.horizontalIndent = 10;
193
                btnOverwriteExistingAccepted.setLayoutData(gd_btnOverwriteExistingAccepted);
194
                btnOverwriteExistingAccepted.setText(Messages.SetSecundumConfiguration_OverwriteExistingAccepted);
190
//                btnOverwriteExistingAccepted = new Button(control, SWT.CHECK);
191
//                GridData gd_btnOverwriteExistingAccepted = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);
192
//                gd_btnOverwriteExistingAccepted.horizontalIndent = 10;
193
//                btnOverwriteExistingAccepted.setLayoutData(gd_btnOverwriteExistingAccepted);
194
//                btnOverwriteExistingAccepted.setText(Messages.SetSecundumConfiguration_OverwriteExistingAccepted);
195 195

  
196 196
                btnIncludeSharedTaxa = new Button(control, SWT.CHECK);
197 197
                GridData gd_btnIncludeSharedTaxa = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);
......
209 209
                Button b = (Button) e.widget;
210 210
                GridData data = (GridData)  btnIncludeSynonyms.getLayoutData();
211 211
                data.exclude = b.getSelection();
212
                btnOverwriteExistingSynonyms.setVisible(data.exclude);
213
                if (!btnIncludeAcceptedTaxa.getSelection() && !data.exclude){
214
                    btnEmptySecundumDetail.setVisible(false);
215
                    setPageComplete(false);
216
                }else{
217
                    btnEmptySecundumDetail.setVisible(true);
218
                    setPageComplete(true);
212
                boolean isEnabled = true;
213
                if (!btnIncludeAcceptedTaxa.getSelection() && !data.exclude && !btnIncludeMisappliedNamed.getSelection() && !btnIncludeProParteSynonyms.getSelection()){
214
                    isEnabled = false;
219 215
                }
216
                btnEmptySecundumDetail.setVisible(isEnabled);
217
                btnOverwriteExisting.setVisible(isEnabled);
218
                setPageComplete(isEnabled);
220 219

  
221 220
            }
222 221
        });
223 222

  
224
                btnOverwriteExistingSynonyms = new Button(control, SWT.CHECK);
225
                GridData gd_btnOverwriteExistingSynonyms = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);
226
                gd_btnOverwriteExistingSynonyms.horizontalIndent = 10;
227
                btnOverwriteExistingSynonyms.setLayoutData(gd_btnOverwriteExistingSynonyms);
228
                btnOverwriteExistingSynonyms.setText(Messages.SetSecundumConfiguration_OverwriteExistingSynonyms);
229
                btnOverwriteExistingSynonyms.setSelection(configurator.isOverwriteExistingSynonyms());
223
//                btnOverwriteExistingSynonyms = new Button(control, SWT.CHECK);
224
//                GridData gd_btnOverwriteExistingSynonyms = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);
225
//                gd_btnOverwriteExistingSynonyms.horizontalIndent = 10;
226
//                btnOverwriteExistingSynonyms.setLayoutData(gd_btnOverwriteExistingSynonyms);
227
//                btnOverwriteExistingSynonyms.setText(Messages.SetSecundumConfiguration_OverwriteExistingSynonyms);
228
//                btnOverwriteExistingSynonyms.setSelection(configurator.isOverwriteExistingSynonyms());
230 229

  
231 230
        btnIncludeMisappliedNamed = new Button(control, SWT.CHECK);
232 231
        btnIncludeMisappliedNamed.setText(Messages.SetSecundumConfiguration_IncludeMisapplications);
......
237 236
                Button b = (Button) e.widget;
238 237
                GridData data = (GridData)  btnIncludeMisappliedNamed.getLayoutData();
239 238
                data.exclude = b.getSelection();
240
                if (!btnIncludeProParteSynonyms.getSelection() && !data.exclude){
241
                    btnOverwriteExistingRelations.setVisible(false);
242
                }else{
243
                    btnOverwriteExistingRelations.setVisible(true);
244
                }
245

  
239
                boolean isEnabled = true;
246 240
                if (!btnIncludeAcceptedTaxa.getSelection() && !btnIncludeProParteSynonyms.getSelection() && !btnIncludeSynonyms.getSelection() && !data.exclude){
247
                    btnEmptySecundumDetail.setVisible(false);
248
                    setPageComplete(false);
249
                }else{
250
                    btnEmptySecundumDetail.setVisible(true);
251
                    setPageComplete(true);
241
                    isEnabled = false;
252 242
                }
253

  
243
                btnEmptySecundumDetail.setVisible(isEnabled);
244
                btnOverwriteExisting.setVisible(isEnabled);
245
                setPageComplete(isEnabled);
254 246
            }
255 247
        });
256 248

  
......
265 257
                Button b = (Button) e.widget;
266 258
                GridData data = (GridData)  btnIncludeProParteSynonyms.getLayoutData();
267 259
                data.exclude = b.getSelection();
268

  
269
                if (!btnIncludeMisappliedNamed.getSelection() && !data.exclude){
270
                    btnOverwriteExistingRelations.setVisible(false);
271
                }else{
272
                    btnOverwriteExistingRelations.setVisible(true);
273
                }
274

  
260
                boolean isEnabled = true;
275 261
                if (!btnIncludeAcceptedTaxa.getSelection() && !btnIncludeMisappliedNamed.getSelection() && !btnIncludeSynonyms.getSelection() && !data.exclude){
276
                    btnEmptySecundumDetail.setVisible(false);
277
                    setPageComplete(false);
278
                }else{
279
                    btnEmptySecundumDetail.setVisible(true);
280
                    setPageComplete(true);
262
                    isEnabled = false;
281 263
                }
282

  
264
                btnEmptySecundumDetail.setVisible(isEnabled);
265
                btnOverwriteExisting.setVisible(isEnabled);
266
                setPageComplete(isEnabled);
283 267
            }
284 268
        });
285 269

  
286
        btnOverwriteExistingRelations = new Button(control, SWT.CHECK);
270
        btnOverwriteExisting = new Button(control, SWT.CHECK);
287 271
        GridData gd_btnOverwriteExistingRelations = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);
288
        gd_btnOverwriteExistingRelations.horizontalIndent = 10;
289
        btnOverwriteExistingRelations.setLayoutData(gd_btnOverwriteExistingRelations);
290
        btnOverwriteExistingRelations.setText(Messages.SetSecundumConfiguration_OverwriteExistingRelations);
291
        btnOverwriteExistingRelations.setSelection(configurator.isOverwriteExistingRelations());
272
        gd_btnOverwriteExistingRelations.verticalIndent = 5;
273
        btnOverwriteExisting.setLayoutData(gd_btnOverwriteExistingRelations);
274
        btnOverwriteExisting.setText(Messages.SetSecundumConfiguration_OverwriteExistingRelations);
275
        btnOverwriteExisting.setSelection(configurator.isOverwriteExisting());
292 276

  
293 277

  
294
        btnOverwriteExistingAccepted.setSelection(configurator.isOverwriteExistingAccepted());
278
//        btnOverwriteExistingAccepted.setSelection(configurator.isOverwriteExistingAccepted());
295 279

  
296 280
        btnEmptySecundumDetail = new Button(control, SWT.CHECK);
297 281
        btnEmptySecundumDetail.setText(Messages.SetSecundumConfiguration_EmptySecundumDetail);

Also available in: Unified diff