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 java
.io
.Serializable
;
14 import org
.eclipse
.swt
.SWT
;
15 import org
.eclipse
.swt
.widgets
.MessageBox
;
16 import org
.eclipse
.swt
.widgets
.Shell
;
18 import eu
.etaxonomy
.taxeditor
.operation
.FeedbackGenerator
;
21 * Feedback Generator corresponding to a {@link MessageBox}
27 public class FeedbackMessageBox
extends FeedbackGenerator
{
33 public FeedbackMessageBox(Shell parent
) {
41 public Serializable
generateFeedback() {
43 // create a dialog with ok and cancel buttons and a question icon
45 new MessageBox(shell
, SWT
.ICON_QUESTION
| SWT
.OK
| SWT
.CANCEL
);
46 dialog
.setText("Monitor Feedback");
47 dialog
.setMessage("Do you really want to continue?");
49 // open dialog and await user selection