javax.swing
Class InputVerifier

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

public abstract class InputVerifier
extends Object

Verifies the user input on a component before the focus is shifted. It is sometimes necessary that input components have a valid state before they loose focus. Such components can have a InputVerifier subclass registered, that permits or vetos a focus change request.


Constructor Summary
InputVerifier()
          Creates a InputVerifier
 
Method Summary
 boolean shouldYieldFocus(JComponent component)
          shouldYieldFocus
abstract  boolean verify(JComponent component)
          verify
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InputVerifier

public InputVerifier()
Creates a InputVerifier

Method Detail

verify

public abstract boolean verify(JComponent component)
verify

Parameters:
component - the component to verify
Returns:
true if valid, false otherwise.

shouldYieldFocus

public boolean shouldYieldFocus(JComponent component)
shouldYieldFocus

Parameters:
component - the component to verify
Returns:
true if valid, false otherwise.