2 * Copyright (C) 2015 EDIT
3 * European Distributed Institute of Taxonomy
4 * http://www.e-taxonomy.eu
6 * The contents of this file are subject to the Mozilla Public License Version 1.1
7 * See LICENSE.TXT at the top of this package for the full license terms.
9 package eu
.etaxonomy
.taxeditor
.ui
.dialog
;
11 import java
.io
.Serializable
;
13 import org
.eclipse
.swt
.SWT
;
14 import org
.eclipse
.swt
.widgets
.MessageBox
;
15 import org
.eclipse
.swt
.widgets
.Shell
;
17 import eu
.etaxonomy
.taxeditor
.operation
.FeedbackGenerator
;
20 * Feedback Generator corresponding to a {@link MessageBox}
26 public class FeedbackMessageBox
extends FeedbackGenerator
{
32 public FeedbackMessageBox(Shell parent
) {
40 public Serializable
generateFeedback() {
42 // create a dialog with ok and cancel buttons and a question icon
44 new MessageBox(shell
, SWT
.ICON_QUESTION
| SWT
.OK
| SWT
.CANCEL
);
45 dialog
.setText("Monitor Feedback");
46 dialog
.setMessage("Do you really want to continue?");
48 // open dialog and await user selection