jpiv2
Class VerifierUFloat

java.lang.Object
  extended by javax.swing.InputVerifier
      extended by jpiv2.VerifierUFloat

public class VerifierUFloat
extends javax.swing.InputVerifier

Unsigned Float Input Verifier. Can be registered on an input component to verify user input.


Constructor Summary
VerifierUFloat()
          Creates a new instance of VerifierUFloat.
 
Method Summary
 boolean shouldYieldFocus(javax.swing.JComponent input)
          Calls the verify method.
 boolean verify(javax.swing.JComponent input)
          Checks the validity of a String typed into a JTextField.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VerifierUFloat

public VerifierUFloat()
Creates a new instance of VerifierUFloat.

Method Detail

verify

public boolean verify(javax.swing.JComponent input)
Checks the validity of a String typed into a JTextField.

Specified by:
verify in class javax.swing.InputVerifier
Parameters:
input - A JTextField
Returns:
true if the String of the JTextField matches the regular expression "^[0-9]+\\.?[0-9]*$".

shouldYieldFocus

public boolean shouldYieldFocus(javax.swing.JComponent input)
Calls the verify method.

Overrides:
shouldYieldFocus in class javax.swing.InputVerifier
Parameters:
input - The input that needs to be verified.
Returns:
true if input is valid.