pl.edu.agh.cast.ui.util
Class MsgBoxHelper

java.lang.Object
  extended by pl.edu.agh.cast.ui.util.MsgBoxHelper
All Implemented Interfaces:
IMsgBoxHelper

public class MsgBoxHelper
extends Object
implements IMsgBoxHelper

Shows different styles of message boxes.

Author:
AGH CAST Team

Constructor Summary
MsgBoxHelper(org.eclipse.swt.widgets.Composite parent)
          Constructor.
 
Method Summary
static MsgBoxHelper createInstanceFor(org.eclipse.swt.widgets.Composite parent)
          Creates new instance of MsgBoxHelper for given parent composite.
static int showErrorBox(org.eclipse.swt.widgets.Composite parent, String title, String msg)
          Shows error box.
 int showErrorBox(String title, String msg)
          Shows error box.
static int showInfoBox(org.eclipse.swt.widgets.Composite parent, String title, String msg)
          Shows information box.
 int showInfoBox(String title, String msg)
          Shows information box.
static int showQuestionBox(org.eclipse.swt.widgets.Composite parent, String title, String msg)
          Shows Y/N question box.
 int showQuestionBox(String title, String msg)
          Shows Y/N question box.
static int showWarningBox(org.eclipse.swt.widgets.Composite parent, String title, String msg)
          Shows warning box.
 int showWarningBox(String title, String msg)
          Shows warning box.
static int showWarningQuestionBox(org.eclipse.swt.widgets.Composite parent, String title, String msg)
          Shows warning Y/N question box.
 int showWarningQuestionBox(String title, String msg)
          Shows warning Y/N question box.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MsgBoxHelper

public MsgBoxHelper(org.eclipse.swt.widgets.Composite parent)
Constructor.

Parameters:
parent - parent composite
Method Detail

createInstanceFor

public static final MsgBoxHelper createInstanceFor(org.eclipse.swt.widgets.Composite parent)
Creates new instance of MsgBoxHelper for given parent composite.

Parameters:
parent - parent composite
Returns:
a new instance of MsgBoxHelper

showErrorBox

public int showErrorBox(String title,
                        String msg)
Shows error box.

Specified by:
showErrorBox in interface IMsgBoxHelper
Parameters:
title - message box title
msg - error message
Returns:
message box result
See Also:
IMsgBoxHelper.showErrorBox(java.lang.String, java.lang.String)

showInfoBox

public int showInfoBox(String title,
                       String msg)
Shows information box.

Specified by:
showInfoBox in interface IMsgBoxHelper
Parameters:
title - message box title
msg - info message
Returns:
message box result
See Also:
IMsgBoxHelper.showInfoBox(java.lang.String, java.lang.String)

showQuestionBox

public int showQuestionBox(String title,
                           String msg)
Shows Y/N question box.

Specified by:
showQuestionBox in interface IMsgBoxHelper
Parameters:
title - message box title
msg - question message
Returns:
message box result
See Also:
IMsgBoxHelper.showQuestionBox(java.lang.String, java.lang.String)

showWarningBox

public int showWarningBox(String title,
                          String msg)
Shows warning box.

Specified by:
showWarningBox in interface IMsgBoxHelper
Parameters:
title - message box title
msg - warning message
Returns:
message box result
See Also:
IMsgBoxHelper.showWarningBox(java.lang.String, java.lang.String)

showWarningQuestionBox

public int showWarningQuestionBox(String title,
                                  String msg)
Shows warning Y/N question box.

Specified by:
showWarningQuestionBox in interface IMsgBoxHelper
Parameters:
title - message box title
msg - question message
Returns:
message box result
See Also:
IMsgBoxHelper.showWarningQuestionBox(java.lang.String, java.lang.String)

showQuestionBox

public static int showQuestionBox(org.eclipse.swt.widgets.Composite parent,
                                  String title,
                                  String msg)
Shows Y/N question box.

Parameters:
parent - parent control
title - message box title
msg - question message
Returns:
message box result

showWarningBox

public static int showWarningBox(org.eclipse.swt.widgets.Composite parent,
                                 String title,
                                 String msg)
Shows warning box.

Parameters:
parent - parent control
title - message box title
msg - warning message
Returns:
message box result

showWarningQuestionBox

public static int showWarningQuestionBox(org.eclipse.swt.widgets.Composite parent,
                                         String title,
                                         String msg)
Shows warning Y/N question box.

Parameters:
parent - parent control
title - message box title
msg - question message
Returns:
message box result

showErrorBox

public static int showErrorBox(org.eclipse.swt.widgets.Composite parent,
                               String title,
                               String msg)
Shows error box.

Parameters:
parent - parent control
title - message box title
msg - error message
Returns:
message box result

showInfoBox

public static int showInfoBox(org.eclipse.swt.widgets.Composite parent,
                              String title,
                              String msg)
Shows information box.

Parameters:
parent - parent control
title - message box title
msg - info message
Returns:
message box result


Copyright © 2007-2009 IISG AGH-UST Krakow, Poland. All Rights Reserved.