All Packages Class Hierarchy This Package Previous Next Index
java.lang.Object | +----edu.cornell.lassp.mck10.HysteresisApplet.CheckLatticeSize
CheckLatticeSize class is an implementation of the
CheckConfigurable interface, which checks the values
of a pair of configurable integers. It treats the first as the width
of a lattice, and the second as a number of dimensions for the lattice.
if the lattice would have more than maxSize spins
for a changed value of the width or the dimensions,
CheckLatticeSize tells the user how big the lattice would
be, and asks them if they really want to change the size. If they do,
the change occurs, and if they don't, the change is blocked.
Source Code is available.
CheckLatticeSize(width,dimensions,maxSize,menu)
constructor constructs a new size checker, and attatches it to the
width and dimensions variables with the maximum size set to
maxSize.
check(variable,value) is called when either someone
tries to change either the width or the number of dimensions.
public CheckLatticeSize(ConfigurableInteger width,
ConfigurableInteger dimensions,
int maxSize,
ConfigurableCollection menu)
CheckLatticeSize(width,dimensions,maxSize,menu)
constructor constructs a new size checker, and attatches it to the
width and dimensions variables with the maximum size set to
maxSize. It also puts the maximumSize in the configuration menu
menu.
public boolean check(Configurable variable,
Object value)
check(variable,value) is called when either someone
tries to change either the width or the number of dimensions. If the
resulting simulation size would be bigger than maximumSize,
the user is prompted with a dialog box, asking them if they really
want the size to be changed.
All Packages Class Hierarchy This Package Previous Next Index