private final FormToolkit toolkit = new FormToolkit(Display.getCurrent());
private final MediaDeletionConfigurator configurator;
private Button btnDelete;
- private Button btnDeleteIfUsedInTaxonDescription;
- private Button btnDeleteIfUsedInSpecimenDescription;
+// private Button btnDeleteIfUsedInTaxonDescription;
+// private Button btnDeleteIfUsedInSpecimenDescription;
+ private Button btnDeleteIfUsedInSomeWhereElse;
private Button btnRemoveFromImageGallery;
private boolean inBulkEditor;
setBackground(getBackground());
- if (inBulkEditor){
- btnDeleteIfUsedInTaxonDescription = new Button(this, SWT.CHECK);
- btnDeleteIfUsedInTaxonDescription.setText(Messages.DeleteConfiguration_media_deleteIfUsedInTaxonDescription);
- btnDeleteIfUsedInTaxonDescription.setEnabled(true);
- btnDeleteIfUsedInTaxonDescription.setSelection(configurator.isDeleteIfUsedInTaxonDescription());
- btnDeleteIfUsedInSpecimenDescription = new Button(this, SWT.CHECK);
- btnDeleteIfUsedInSpecimenDescription.setText(Messages.DeleteConfiguration_media_deleteIfUsedInSpecimenDescription);
- btnDeleteIfUsedInSpecimenDescription.setEnabled(true);
- btnDeleteIfUsedInSpecimenDescription.setSelection(configurator.isDeleteIfUsedInSpecimenDescription());
- }
- else {
+// if (inBulkEditor){
+// btnDeleteIfUsedInTaxonDescription = new Button(this, SWT.CHECK);
+// btnDeleteIfUsedInTaxonDescription.setText(Messages.DeleteConfiguration_media_deleteIfUsedInTaxonDescription);
+// btnDeleteIfUsedInTaxonDescription.setEnabled(true);
+// btnDeleteIfUsedInTaxonDescription.setSelection(configurator.isDeleteIfUsedInTaxonDescription());
+// btnDeleteIfUsedInSpecimenDescription = new Button(this, SWT.CHECK);
+// btnDeleteIfUsedInSpecimenDescription.setText(Messages.DeleteConfiguration_media_deleteIfUsedInSpecimenDescription);
+// btnDeleteIfUsedInSpecimenDescription.setEnabled(true);
+// btnDeleteIfUsedInSpecimenDescription.setSelection(configurator.isDeleteIfUsedInSpecimenDescription());
+// }
+// else {
btnDelete = new Button(this, SWT.RADIO);
btnDelete.setText(Messages.DeleteConfiguration_media_delete);
+ //btnDelete.setSelection(configurator.setDeleteFrom(deleteFrom););
+
+ btnDeleteIfUsedInSomeWhereElse = new Button(this, SWT.RADIO);
+ btnDeleteIfUsedInSomeWhereElse.setText(Messages.DeleteConfiguration_media_deleteIfUsedSomeWhereElse);
+ btnDeleteIfUsedInSomeWhereElse.setEnabled(true);
+ btnDeleteIfUsedInSomeWhereElse.setSelection(configurator.isDeleteFromEveryWhere());
// btnDeleteIfUsedInSpecimenDescription = new Button(this, SWT.CHECK);
// btnDeleteIfUsedInSpecimenDescription.setText(Messages.DeleteConfiguration_media_deleteIfUsedInSpecimenDescription);
btnRemoveFromImageGallery = new Button(this, SWT.RADIO);
btnRemoveFromImageGallery.setText(Messages.DeleteConfiguration_media_removeFromGallery);
btnRemoveFromImageGallery.setSelection(configurator.isOnlyRemoveFromGallery());
- btnDelete.setSelection(configurator.isDeleteIfUsedInTaxonDescription());
- }
+
+// }
m_bindingContext = initDataBindings();
protected DataBindingContext initDataBindings() {
DataBindingContext bindingContext = new DataBindingContext();
//
- if (inBulkEditor){
- IObservableValue observeSelectionBtnDeleteIfUsedInTaxonDescription = WidgetProperties.selection().observe(btnDeleteIfUsedInTaxonDescription);
- IObservableValue deleteIfUsedInTaxonDescriptionConfiguratorObserveValue = PojoProperties.value("deleteIfUsedInTaxonDescription").observe(configurator);
- bindingContext.bindValue(observeSelectionBtnDeleteIfUsedInTaxonDescription, deleteIfUsedInTaxonDescriptionConfiguratorObserveValue, null, null);
-
- IObservableValue observeSelectionBtnDeleteIfUsedInSpecimenDescription = WidgetProperties.selection().observe(btnDeleteIfUsedInSpecimenDescription);
- IObservableValue deleteIfUsedInSpecimenDescriptionConfiguratorObserveValue = PojoProperties.value("deleteIfUsedInSpecimenDescription").observe(configurator);
- bindingContext.bindValue(observeSelectionBtnDeleteIfUsedInSpecimenDescription, deleteIfUsedInSpecimenDescriptionConfiguratorObserveValue, null, null);
- } else{
-
- IObservableValue observeSelectionBtnDelete = WidgetProperties.selection().observe(btnDelete);
- IObservableValue deleteConfiguratorObserveValue = PojoProperties.value("deleteIfUsedInTaxonDescription").observe(configurator);
- bindingContext.bindValue(observeSelectionBtnDelete, deleteConfiguratorObserveValue, null, null);
+// if (inBulkEditor){
+// IObservableValue observeSelectionBtnDeleteIfUsedInTaxonDescription = WidgetProperties.selection().observe(btnDeleteIfUsedInTaxonDescription);
+// IObservableValue deleteIfUsedInTaxonDescriptionConfiguratorObserveValue = PojoProperties.value("deleteIfUsedInTaxonDescription").observe(configurator);
+// bindingContext.bindValue(observeSelectionBtnDeleteIfUsedInTaxonDescription, deleteIfUsedInTaxonDescriptionConfiguratorObserveValue, null, null);
+//
+// IObservableValue observeSelectionBtnDeleteIfUsedInSpecimenDescription = WidgetProperties.selection().observe(btnDeleteIfUsedInSpecimenDescription);
+// IObservableValue deleteIfUsedInSpecimenDescriptionConfiguratorObserveValue = PojoProperties.value("deleteIfUsedInSpecimenDescription").observe(configurator);
+// bindingContext.bindValue(observeSelectionBtnDeleteIfUsedInSpecimenDescription, deleteIfUsedInSpecimenDescriptionConfiguratorObserveValue, null, null);
+// } else{
+ IObservableValue observeSelectionBtnDeleteIfUsedInSomeWhereElse = WidgetProperties.selection().observe(btnDeleteIfUsedInSomeWhereElse);
+ IObservableValue deleteIfUsedInSomeWhereElseConfiguratorObserveValue = PojoProperties.value("deleteFromEveryWhere").observe(configurator);
+ bindingContext.bindValue(observeSelectionBtnDeleteIfUsedInSomeWhereElse, deleteIfUsedInSomeWhereElseConfiguratorObserveValue, null, null);
+
+// IObservableValue observeSelectionBtnDelete = WidgetProperties.selection().observe(btnDelete);
+// IObservableValue deleteConfiguratorObserveValue = PojoProperties.value("deleteIfUsedInTaxonDescription").observe(configurator);
+// bindingContext.bindValue(observeSelectionBtnDelete, deleteConfiguratorObserveValue, null, null);
IObservableValue observeSelectionBtnRemoveFromImageGallery = WidgetProperties.selection().observe(btnRemoveFromImageGallery);
IObservableValue removeFromImageGalleryConfiguratorObserveValue = PojoProperties.value("onlyRemoveFromGallery").observe(configurator);
bindingContext.bindValue(observeSelectionBtnRemoveFromImageGallery, removeFromImageGalleryConfiguratorObserveValue, null, null);
- }
+// }