Package noaa.coastwatch.gui.value
Class TextFieldVerifier
java.lang.Object
javax.swing.InputVerifier
noaa.coastwatch.gui.value.TextFieldVerifier
- All Implemented Interfaces:
ActionListener,EventListener
A
TextFieldVerifier attaches to a JTextField and verifies
that the string conforms to a certain format. The verifier uses a
TextFieldVerifierImp object to determine correctness and to
detect changes in the field value.- Since:
- 3.3.2
- Author:
- Peter Hollemans
-
Constructor Summary
ConstructorsConstructorDescriptionTextFieldVerifier(JTextField field, TextFieldVerifierImp imp) Creates a new verifier for the specified field and implementor. -
Method Summary
Modifier and TypeMethodDescriptionvoidactionPerformed(ActionEvent event) booleanshouldYieldFocus(JComponent input) booleanverify(JComponent input) Methods inherited from class javax.swing.InputVerifier
shouldYieldFocus, verifyTarget
-
Constructor Details
-
TextFieldVerifier
Creates a new verifier for the specified field and implementor.- Parameters:
field- the text field to monitor and verify.imp- the verifier implementor to use.
-
-
Method Details
-
verify
- Specified by:
verifyin classInputVerifier
-
shouldYieldFocus
- Overrides:
shouldYieldFocusin classInputVerifier
-
actionPerformed
- Specified by:
actionPerformedin interfaceActionListener
-