3 * Copyright (C) 2015 EDIT
4 * European Distributed Institute of Taxonomy
5 * http://www.e-taxonomy.eu
7 * The contents of this file are subject to the Mozilla Public License Version 1.1
8 * See LICENSE.TXT at the top of this package for the full license terms.
10 package eu
.etaxonomy
.taxeditor
.ui
.dialog
;
12 import org
.apache
.log4j
.Logger
;
13 import org
.eclipse
.swt
.graphics
.Image
;
14 import org
.eclipse
.swt
.widgets
.Composite
;
15 import org
.eclipse
.swt
.widgets
.Control
;
16 import org
.eclipse
.swt
.widgets
.Shell
;
18 import eu
.etaxonomy
.cdm
.api
.service
.config
.TaxonDeletionConfigurator
;
25 public class DeleteTaxonConfiguratorDialog
extends DeleteConfiguratorDialog
{
27 @SuppressWarnings("unused")
28 private final Logger logger
= Logger
.getLogger(DeleteTaxonConfiguratorDialog
.class);
30 private final TaxonDeletionConfigurator configurator
;
36 * @param dialogTitleImage
37 * @param dialogMessage
38 * @param dialogImageType
39 * @param dialogButtonLabels
42 public DeleteTaxonConfiguratorDialog(TaxonDeletionConfigurator configurator
, Shell parentShell
, String dialogTitle
,
43 Image dialogTitleImage
, String dialogMessage
,int dialogImageType
, String
[] dialogButtonLabels
, int defaultIndex
) {
44 super(parentShell
, dialogTitle
, dialogTitleImage
, dialogMessage
, dialogImageType
, dialogButtonLabels
, defaultIndex
);
45 this.configurator
= configurator
;
49 * @see org.eclipse.jface.dialogs.MessageDialog#createCustomArea(org.eclipse.swt.widgets.Composite)
52 protected Control
createCustomArea(Composite parent
) {
53 DeleteConfiguratorComposite composite
= new DeleteConfiguratorComposite(configurator
, parent
, NONE
);
57 public static boolean openConfirmWithConfigurator(TaxonDeletionConfigurator configurator
, Shell parent
, String title
, String message
) {
58 DeleteTaxonConfiguratorDialog dialog
= new DeleteTaxonConfiguratorDialog(configurator
, parent
, title
, getDefaultImage(), message
, QUESTION
, getButtonLabels(QUESTION
), 0);
59 return dialog
.open() == 0;
63 * @see org.eclipse.jface.dialogs.Dialog#isResizable()
66 protected boolean isResizable() {