qflib 0.98.1

de.qfs.lib.option
Interface OptionValidator


public interface OptionValidator

The range of legal values for an Option can be restricted by adding an OptionValidator with Option.addValidator. When the Option checks a possible new value in Option.checkValue it will also query all registered OptionValidators.

Version:
$Revision: 1.3 $
Author:
Gregor Schmid

Method Summary
 boolean checkValue(java.awt.Component component, Option option, java.lang.Object value)
          Check whether a value is acceptable for an Option.
 

Method Detail

checkValue

public boolean checkValue(java.awt.Component component,
                          Option option,
                          java.lang.Object value)
Check whether a value is acceptable for an Option. If it is not, the reason should be explained in a message dialog unless component is null.
Parameters:
component - The Component in which the Option is being edited.
option - The option that should be changed.
value - The value which is about to be set.
Returns:
True if OK.

qflib 0.98.1