blob: fcf471c8db6e644636ed76c9ef9f611a9518e401 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><HTML>
<HEAD>
<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2005. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
<link rel="stylesheet" type="text/css" HREF="../book.css">
<TITLE>
Standard dialogs
</TITLE>
</HEAD>
<BODY BGCOLOR="#ffffff">
<h2>
Standard dialogs</h2>
<P >
The package <a href="../reference/api/org/eclipse/jface/dialogs/package-summary.html"> <b> org.eclipse.jface.dialogs</b></a> defines the basic support for dialogs. This package provides standard dialogs for displaying user messages and obtaining simple input from the user.</P>
<ul>
<li>
<a href="../reference/api/org/eclipse/jface/dialogs/MessageDialog.html">
<b>
MessageDialog</b></a> displays a message to the user. You can set the dialog title, image, button text, and message in the constructor for this dialog.</li>
<li><a href="../reference/api/org/eclipse/jface/dialogs/ErrorDialog.html"><b>ErrorDialog</b></a> displays information about an error. You can set the dialog title and message for the dialog. You can also supply an IStatus object which the dialog will use to obtain an error message.</li>
<li>
<a href="../reference/api/org/eclipse/jface/dialogs/InputDialog.html"><b>
InputDialog</b></a> allows the user to enter text. You can set the dialog title, default text value, and supply an object that will validate the text input.</li>
<li>
<a href="../reference/api/org/eclipse/jface/dialogs/ProgressMonitorDialog.html"><b>
ProgressMonitorDialog</b></a> shows progress to the user during the running of
a long operation.</li>
</ul>
<P >
The standard dialogs are designed so that you can completely specify the dialog in its constructor. We saw a
<b><a href="../reference/api/org/eclipse/jface/dialogs/MessageDialog.html"> MessageDialog</a>
</b> in action in the readme tool's view action:</P>
<pre>
MessageDialog.openInformation(
view.getSite().getShell(),&quot;Readme Editor&quot;,&quot;View Action executed&quot;);</pre>
</BODY>
</HTML>