|
Rational Developer for Power Systems Software V7.6 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object Dialog com.ibm.etools.iseries.rse.ui.preferences.InputDialog
public class InputDialog
A simple input dialog for soliciting an input string from the user.
This concete dialog class can be instantiated as is, or further subclassed as required.
This is a copy of the JFace InputDialog class, with a text limit feature.
Field Summary | |
---|---|
protected int |
_iTextLimit
|
static String |
Copyright
|
protected Label |
errorMessageLabel
Error message label widget. |
protected String |
helpContext
The help context for the dialog |
protected String |
message
The message to display, or null if none. |
protected Button |
okButton
Ok button widget. |
protected Text |
text
Input text widget. |
protected String |
title
The title of the dialog. |
protected String |
tooltipText
The text to use for the entry field tooltip |
protected IInputValidator |
validator
The input validator, or null if none. |
protected String |
value
The input value; the empty string by default. |
Constructor Summary | |
---|---|
InputDialog(Shell parentShell,
String dialogTitle,
String dialogMessage,
String initialValue,
IInputValidator validator)
Creates an input dialog with OK and Cancel buttons. |
|
InputDialog(Shell parentShell,
String dialogTitle,
String dialogMessage,
String initialValue,
String tooltip,
String helpContext,
IInputValidator validator)
Creates an input dialog with OK and Cancel buttons. |
Method Summary | |
---|---|
protected void |
buttonPressed(int buttonId)
|
protected void |
configureShell(Shell shell)
|
protected void |
createButtonsForButtonBar(Composite parent)
|
protected Control |
createDialogArea(Composite parent)
|
protected Label |
getErrorMessageLabel()
Returns the error message label. |
protected Button |
getOkButton()
Returns the ok button. |
protected Text |
getText()
Returns the text area. |
protected IInputValidator |
getValidator()
Returns the validator. |
String |
getValue()
Returns the string typed into this input dialog. |
void |
setTextLimit(int iTextLimit)
|
protected void |
validateInput()
Validates the input. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String Copyright
protected int _iTextLimit
protected String title
protected String message
null
if none.
protected String value
protected IInputValidator validator
null
if none.
protected Button okButton
protected Text text
protected Label errorMessageLabel
protected String tooltipText
protected String helpContext
Constructor Detail |
---|
public InputDialog(Shell parentShell, String dialogTitle, String dialogMessage, String initialValue, IInputValidator validator)
Note that the open
method blocks for input dialogs.
parentShell
- the parent shelldialogTitle
- the dialog title, or null
if nonedialogMessage
- the dialog message, or null
if noneinitialValue
- the initial input value, or null
if none
(equivalent to the empty string)validator
- an input validator, or null
if nonepublic InputDialog(Shell parentShell, String dialogTitle, String dialogMessage, String initialValue, String tooltip, String helpContext, IInputValidator validator)
Note that the open
method blocks for input dialogs.
parentShell
- the parent shelldialogTitle
- the dialog title, or null
if nonedialogMessage
- the dialog message, or null
if noneinitialValue
- the initial input value, or null
if none
(equivalent to the empty string)tooltip
- tooltip text for the entry fieldhelpContext
- the help context to use for this dialogvalidator
- an input validator, or null
if noneMethod Detail |
---|
protected void buttonPressed(int buttonId)
protected void configureShell(Shell shell)
protected void createButtonsForButtonBar(Composite parent)
protected Control createDialogArea(Composite parent)
protected Label getErrorMessageLabel()
protected Button getOkButton()
protected Text getText()
protected IInputValidator getValidator()
public String getValue()
protected void validateInput()
The default implementation of this framework method delegates the request to the supplied input validator object; if it finds the input invalid, the error message is displayed in the dialog's message line. This hook method is called whenever the text changes in the input field.
public void setTextLimit(int iTextLimit)
|
Rational Developer for Power Systems Software V7.6 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |