javax.swing

Class 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
booleanshouldYieldFocus(JComponent component)
shouldYieldFocus
abstract booleanverify(JComponent component)
verify

Constructor Detail

InputVerifier

public InputVerifier()
Creates a InputVerifier

Method Detail

shouldYieldFocus

public boolean shouldYieldFocus(JComponent component)
shouldYieldFocus

Parameters: component the component to verify

Returns: true if valid, false otherwise.

verify

public abstract boolean verify(JComponent component)
verify

Parameters: component the component to verify

Returns: true if valid, false otherwise.