<metaname="copyright"content="Copyright (c) IBM Corporation and others 2002, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page.">
<samp>processXXX()</samp> method, such as <samp><Ahref="../../../reference/api/org/eclipse/rse/ui/dialogs/SystemPromptDialog.html#processOK()">processOK()</A></samp>. By default, you get OK and Cancel buttons.
<li>Support of a simple <samp><Ahref="../../../reference/api/org/eclipse/rse/ui/dialogs/SystemPromptDialog.html#wasCancelled()">wasCancelled()</A></samp> method to easily test if the dialog was cancelled or not.
its <samp><Ahref="../../../reference/api/org/eclipse/rse/ui/dialogs/SystemPromptDialog.html#processOK()">processOK()</A></samp> method) and your calling code gets the output object,
if <samp><Ahref="../../../reference/api/org/eclipse/rse/ui/dialogs/SystemPromptDialog.html#wasCancelled()">wasCancelled()</A></samp> returns false.
<li>Support of a <samp><Ahref="../../../reference/api/org/eclipse/rse/ui/dialogs/SystemPromptDialog.html#setPageComplete(boolean)">setPageComplete(boolean)</A></samp> method, consistent with wizard pages, to enable/disable the OK button.
<li>Support of a simple <samp><Ahref="../../../reference/api/org/eclipse/rse/ui/dialogs/SystemPromptDialog.html#setHelp(java.lang.String)">setHelp(String helpId)</A></samp> method to set the dialog's popup help.
<li>Helper methods for adding <Ahref="../../../reference/api/org/eclipse/rse/ui/dialogs/SystemPromptDialog.html#addFillerLine(org.eclipse.swt.widgets.Composite, int)">filler lines</A>
and <Ahref="../../../reference/api/org/eclipse/rse/ui/dialogs/SystemPromptDialog.html#addSeparatorLine(org.eclipse.swt.widgets.Composite, int)">separator lines</A>.
<li>Subclass <samp><Ahref="../../../reference/api/org/eclipse/rse/ui/dialogs/SystemPromptDialog.html">SystemPromptDialog</A></samp>, picking the appropriate constructor, the simplest
<li>If a progress monitor is desired, in your own constructor call <samp><Ahref="../../../reference/api/org/eclipse/rse/ui/dialogs/SystemPromptDialog.html#setNeedsProgressMonitor(boolean)">setNeedsProgressMonitor(true)</A></samp>. Later, to run
a long-running operation that displays the progress monitor, use <samp><Ahref="../../../reference/api/org/eclipse/rse/ui/dialogs/SystemPromptDialog.html#getProgressMonitor()">getProgressMonitor()</A></samp>.
<li>Override the <samp><Ahref="../../../reference/api/org/eclipse/rse/ui/dialogs/SystemPromptDialog.html#createInner(org.eclipse.swt.widgets.Composite)">createInner(Composite)</A></samp> method to populate the client area of the dialog with SWT widgets. Typically
static helper methods in <samp><Ahref="../../../reference/api/org/eclipse/rse/ui/SystemWidgetHelpers.html">SystemWidgetHelpers</A></samp>.
<li>Override the <samp><Ahref="../../../reference/api/org/eclipse/rse/ui/dialogs/SystemPromptDialog.html#getInitialFocusControl()">getInitialFocusControl()</A></samp> method to supply the control to get initial focus when the dialog is displayed.
<li>Override the <samp><Ahref="../../../reference/api/org/eclipse/rse/ui/dialogs/SystemPromptDialog.html#processOK()">processOK()</A></samp> method to supply the processing for when OK is pressed. You typically first validate
or call <samp><Ahref="../../../reference/api/org/eclipse/rse/ui/dialogs/SystemPromptDialog.html#setOutputObject(java.lang.Object)">setOuputObject(Object)</A></samp>
in your processOK logic so that your caller can code <samp><Ahref="../../../reference/api/org/eclipse/rse/ui/dialogs/SystemPromptDialog.html#getOutputObject()">getOutputObject()</A></samp>.
<P>One of the more difficult efforts in building a dialog with multiple entry fields, is the code to do the validation of those entry fields. A common strategy is to add modify listeners to the entry fields, and for each one validate the data as it typed. If the validation fails, a message is issued. If the validation succeeds, then the other fields on the dialog are validated. At the end of the validation, the OK button is enabled or disabled depending on the error message status, and whether the required information has been supplied. The RSE can help with this effort, somewhat, through the use of re-usable <A
href="../validators/uiValidatorsAPI.html">validators</A> for various types of input.<BR>
<BR>
Follow this <Ahref="dialogSample.html">link</A> for an example of a fully-formed dialog class written on top of this RSE base class, complete with
error checking.</P>
<p>Typically, after creating your dialog, you will create an action to invoke it. The RSE can help with this too, via the
development and test effort. All these dialogs are in package <samp><Ahref="../../../reference/api/org/eclipse/rse/ui/dialogs/package-summary.html">org.eclipse.rse.ui.dialogs</A></samp>:
do not adapt to <samp><Ahref="../../../reference/api/org/eclipse/rse/ui/view/ISystemViewElementAdapter.html">ISystemViewElementAdapter</A></samp>
or <samp><Ahref="../../../reference/api/org/eclipse/rse/ui/view/ISystemRemoteElementAdapter.html">ISystemRemoteElementAdapter</A></samp>,
you should call <samp><Ahref="../../../reference/api/org/eclipse/rse/ui/dialogs/SystemRenameDialog.html#setNameValidator(org.eclipse.rse.ui.validators.ISystemValidator)">setNameValidator</A></samp> to specify a validator that ensures the new name is correct, and your
you should call <samp><Ahref="../../../reference/api/org/eclipse/rse/ui/dialogs/SystemRenameSingleDialog.html#setNameValidator(org.eclipse.rse.ui.validators.ISystemValidator)">setNameValidator</A></samp> to specify a validator that ensures the new name is correct, and your
input object should also either be an IResource object or implement <samp><Ahref="../../../reference/api/org/eclipse/rse/ui/dialogs/ISystemTypedObject.html">ISystemTypedObject</A></samp>.
your input objects should either be IResource objects or implement <samp><Ahref="../../../reference/api/org/eclipse/rse/ui/dialogs/ISystemTypedObject.html">ISystemTypedObject</A></samp>.
<samp><Ahref="../../../reference/api/org/eclipse/rse/ui/dialogs/SystemSimpleContentElement.html">SystemSimpleContentElement</A></samp>, maintaining the parent/child hierarchy, and pass the root element to the dialog. The rest is
<P><BR>While the dialogs can be instantiated directly, it is perhaps best to use them by instantiating their action class, and calling the run method on it.
The action classes are all in <samp><Ahref="../../../reference/api/org/eclipse/rse/ui/actions/package-summary.html">org.eclipse.rse.ui.actions</A></samp> package.
<p>In addition to these universal dialogs, there are dialogs specific to the predefined Files subsystem. These enable selection of remote files or folders. They can be found in the <ahref="../../../reference/api/org/eclipse/rse/files/ui/dialogs/package-summary.html"><samp>org.eclipse.rse.files.ui.dialogs</samp></a> package.</p>
<TD><samp><Ahref="../../../reference/api/org/eclipse/rse/files/ui/actions/SystemSelectRemoteFileAction.html">SystemSelectRemoteFileAction</A></samp> or