net.sf.zekr.ui
Class MessageBoxUtils
java.lang.Object
net.sf.zekr.ui.MessageBoxUtils
public class MessageBoxUtils
- extends java.lang.Object
- Author:
- Mohsen Saboorian
Method Summary |
static java.io.File |
exportFileDialog(org.eclipse.swt.widgets.Shell parentShall,
java.lang.String[] filterNames,
java.lang.String[] filterWildcards)
|
static org.eclipse.swt.widgets.Shell |
getFullScreenToolbar(QuranForm quranForm)
|
static org.eclipse.swt.widgets.Shell |
getShell()
|
static java.util.List |
importFileDialog(org.eclipse.swt.widgets.Shell parentShall,
java.lang.String[] filterNames,
java.lang.String[] filterWildcards)
This method opens a file chooser dialog and selects file filtering with the given wildcards. |
static int |
radioQuestionPrompt(java.lang.String[] options,
int selectedOption,
java.lang.String question,
java.lang.String title)
|
static int |
radioQuestionPrompt(java.lang.String[] options,
java.lang.String question,
java.lang.String title)
|
static void |
show(java.lang.String msg,
java.lang.String title,
int style)
|
static void |
showActionFailureError(java.lang.Exception ex)
|
static void |
showError(java.lang.String msg)
|
static void |
showError(java.lang.String title,
java.lang.String msg)
|
static void |
showError(ZekrMessageException zme)
|
static void |
showMessage(java.lang.String msg)
|
static void |
showWarning(java.lang.String msg)
|
static boolean |
showYesNoConfirmation(java.lang.String msg,
java.lang.String title)
|
static java.lang.String |
textBoxPrompt(java.lang.String title,
java.lang.String question)
|
static java.lang.String |
textBoxPrompt(java.lang.String title,
java.lang.String question,
java.lang.String defaultValue)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MessageBoxUtils
public MessageBoxUtils()
showError
public static void showError(java.lang.String msg)
showActionFailureError
public static void showActionFailureError(java.lang.Exception ex)
showError
public static void showError(ZekrMessageException zme)
showError
public static void showError(java.lang.String title,
java.lang.String msg)
showMessage
public static void showMessage(java.lang.String msg)
show
public static void show(java.lang.String msg,
java.lang.String title,
int style)
showYesNoConfirmation
public static boolean showYesNoConfirmation(java.lang.String msg,
java.lang.String title)
textBoxPrompt
public static java.lang.String textBoxPrompt(java.lang.String title,
java.lang.String question)
textBoxPrompt
public static java.lang.String textBoxPrompt(java.lang.String title,
java.lang.String question,
java.lang.String defaultValue)
radioQuestionPrompt
public static int radioQuestionPrompt(java.lang.String[] options,
int selectedOption,
java.lang.String question,
java.lang.String title)
- Parameters:
options
- answer optionsselectedOption
- option number to be selected by default. This field is 0-base.question
- the string to be placed as a question on the top of the dialogtitle
- the text to be displayed as a title of this dialog
- Returns:
- -1 if nothing was selected, or dialog closed/cancelled, or a 0-base selected item number
radioQuestionPrompt
public static int radioQuestionPrompt(java.lang.String[] options,
java.lang.String question,
java.lang.String title)
- Parameters:
options
- answer optionsquestion
- the string to be placed as a question on the top of the dialogtitle
- the text to be displayed as a title of this dialog
- Returns:
- -1 if nothing was selected, or dialog closed/cancelled, or a 0-base selected item number
getShell
public static org.eclipse.swt.widgets.Shell getShell()
getFullScreenToolbar
public static org.eclipse.swt.widgets.Shell getFullScreenToolbar(QuranForm quranForm)
importFileDialog
public static java.util.List importFileDialog(org.eclipse.swt.widgets.Shell parentShall,
java.lang.String[] filterNames,
java.lang.String[] filterWildcards)
throws java.io.IOException
- This method opens a file chooser dialog and selects file filtering with the given wildcards.
- Parameters:
filterNames
- names of the filtersfilterWildcards
- wildcard filters (e.g. *.zip)
- Returns:
- a 0-item list if action cancelled, no item was selected or selected items did not fit the
extension criteria. Otherwise, returns a list of selected files (of type java.io.File).
- Throws:
java.io.IOException
- if any exception occurred during importing.
exportFileDialog
public static java.io.File exportFileDialog(org.eclipse.swt.widgets.Shell parentShall,
java.lang.String[] filterNames,
java.lang.String[] filterWildcards)
throws java.io.IOException
- Throws:
java.io.IOException
showWarning
public static void showWarning(java.lang.String msg)