| java.awt.Dialog javax.swing.JDialog org.columba.mail.spellcheck.cswilly.ValidationDialog
ValidationDialog | public class ValidationDialog extends JDialog (Code) | | Dialog to the user to determine what to do about a misspelled word.
Features of the dialog box:
- the dialog box is modal
- the title of the dialog box is set to "Spell Check"
- the user action change be determined using the getUserAction() method
- the possible user actions are modelled using the instances of the class
UserAction (which is an enum-like thingy). The possible instances are give by
public static text fields (e.g. ADD, and CANCEL) of type UserAction.
- the dialog box can be closed using the escape key (user action is
CANCEL)
- there is a default button (Ignore)
- the buttons all have mnemonic keys
- ??? todo set focus to Change to text field when dialog is
opened
- ??? todo add tool tips to all visual components
- ??? todo move text to properties file
Escape closes dialog
(http://www.javaworld.com/javaworld/javatips/jw-javatip72.html)
|
Inner Class :public static class UserAction | |
Field Summary | |
final public static UserAction | ADD | final public static UserAction | CANCEL | final public static UserAction | CHANGE | final public static UserAction | CHANGE_ALL | final public static UserAction | IGNORE | final public static UserAction | IGNORE_ALL |
Method Summary | |
protected JRootPane | createRootPane() Overriden to register
CloseDialogActionListener to be called when
the escape key is pressed. | public void | dispose() | public String | getSelectedWord() Returns the replacement word selected by the user
The returned value only makes sense if the user action is either CHANGE
or CHANGE_ALL. | public UserAction | getUserAction() |
ADD | final public static UserAction ADD(Code) | | |
CANCEL | final public static UserAction CANCEL(Code) | | |
CHANGE | final public static UserAction CHANGE(Code) | | |
CHANGE_ALL | final public static UserAction CHANGE_ALL(Code) | | |
IGNORE | final public static UserAction IGNORE(Code) | | |
IGNORE_ALL | final public static UserAction IGNORE_ALL(Code) | | |
ValidationDialog | public ValidationDialog(String originalWord, List suggestions)(Code) | | |
createRootPane | protected JRootPane createRootPane()(Code) | | Overriden to register
CloseDialogActionListener to be called when
the escape key is pressed.
|
dispose | public void dispose()(Code) | | |
getSelectedWord | public String getSelectedWord()(Code) | | Returns the replacement word selected by the user
The returned value only makes sense if the user action is either CHANGE
or CHANGE_ALL. Should be ignored for any other action.
the replacement word selected by the user as a String |
getUserAction | public UserAction getUserAction()(Code) | | |
Fields inherited from java.awt.Dialog | final public static ModalityType DEFAULT_MODALITY_TYPE(Code)(Java Doc)
|
|
|