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
ConstructorDescriptionTextFieldVerifier
(JTextField field, TextFieldVerifierImp imp) Creates a new verifier for the specified field and implementor. -
Method Summary
Modifier and TypeMethodDescriptionvoid
actionPerformed
(ActionEvent event) boolean
shouldYieldFocus
(JComponent input) boolean
verify
(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:
verify
in classInputVerifier
-
shouldYieldFocus
- Overrides:
shouldYieldFocus
in classInputVerifier
-
actionPerformed
- Specified by:
actionPerformed
in interfaceActionListener
-