All Packages Class Hierarchy This Package Previous Next Index
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Button
|
+----edu.cornell.lassp.mck10.HysteresisApplet.AutoFitButton
AutoFitButton is used in conjunction with the
LoopView class to zoom the view to exactly the size of the
hysteresis loop.
Source Code is available.
AutoFitButton(model,loop,name) constructor is
used to create a new button attatched to a particular model and view,
with the label given in the String name.
action(e,o) is called when the button is pressed.
fit() can be called from outside the class to zoom in
on the hysteresis loop without the user pressing the button.
notify(XY,prod) is called when there is a new point in
the hysteresis loop.
update(obs,obj) is called whenever the parameters of the
simulation are changed.
public AutoFitButton(HysteresisLattice model,
LoopView loop,
String name)
AutoFitButton(model,loop,name) constructor is
used to create a new button attatched to a particular model and view,
with the label given in the String name.
public boolean action(Event e,
Object o)
action(e,o) is called when the button is pressed.
When this happens, we want to zoom in to the present size of the
hysteresis loop.
public void notify(XYPair XY,
XYProducer prod)
notify(XY,prod) is called when there is a new point in
the hysteresis loop. We need to check to see if the new point changes
the size of the hysteresis loop.
public void update(Observable obs,
Object obj)
update(obs,obj) is called whenever the parameters of the
simulation are changed. If this happens, there is a new hysteresis
loop, and we need to change all of our parameters.
public void fit()
fit() can be called from outside the class to zoom in
on the hysteresis loop without the user pressing the button. This
is used to zoom in after a hysteresis loop has been automatically
generated.
All Packages Class Hierarchy This Package Previous Next Index