Interface edu.cornell.lassp.mck10.ConfigurePack.CheckConfigurable
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Interface edu.cornell.lassp.mck10.ConfigurePack.CheckConfigurable

public interface CheckConfigurable
extends Object

The CheckConfigurable interface is used to allow the checking of Configurable Variables. By default, Configurable variables can be assigned arbitrary values. However, if they have an object of type CheckConfigurable registered with them, they will call the check(variable,value) of that object to make sure that the value they are being assigned is acceptable. They can have any number of CheckConfigurable objects registered with them, and they will check with all of them before changing their value.

Classes can implement the CheckConfigurable in many different ways. In the simplest case, they may just have hardwired limits, and return false if the values are outside of the hardwired limits. It is also possible that the limits themselves will be configurable, or that a single CheckConfigurable object will be registered with a number of configurable variables, and will perform some function on all of their values in order to decide whether to accept a change in one of the values. It is also possible that a CheckConfigurable will pop up a dialog box, and ask the user if they really want the value changed.

Source code is available.
Version:
1.0
Author:
Matt Kuntz (e-mail: mck10@cornell.edu)

Method Index

 o check(Configurable, Object)
The check(variable,value) is called by the configurable variable and returns true if value is an acceptable value for the variable, and false if it is not.

Methods

 o check
  public abstract boolean check(Configurable variable,
                                Object value)
The check(variable,value) is called by the configurable variable and returns true if value is an acceptable value for the variable, and false if it is not.
Parameters:
variable - The variable who's value is changing.
value - The value the variable will recieve if check returns true.

All Packages  Class Hierarchy  This Package  Previous  Next  Index