Class IntegerVerifier
java.lang.Object
javax.swing.InputVerifier
IntegerVerifier
- public class IntegerVerifier
- extends javax.swing.InputVerifier
Input Verifier to verifier integer text fields
Checks for valid integer input, and to see if the number is between a
specified max and min value.
- Author:
- Mark Pendergast
Method Summary |
boolean |
verify(javax.swing.JComponent jComponent)
Verifies contents of the specified component |
Methods inherited from class javax.swing.InputVerifier |
shouldYieldFocus |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
IntegerVerifier
public IntegerVerifier(VerifierListener alistener,
boolean blankok,
int min,
int max)
- Creates a new instance of IntegerVerifier
- Parameters:
alistener
- VerifierListener to receive invalid/valid data class (null means no listener)blankok
- if true, then the field can be left blankmin
- minimum valid valuemax
- maximum valid value
verify
public boolean verify(javax.swing.JComponent jComponent)
- Verifies contents of the specified component
- Parameters:
jComponent
- the component to check
- Returns:
- true if the component is ok, else false