Class edu.cornell.lassp.mck10.HysteresisApplet.HysteresisPanel
All Packages Class Hierarchy This Package Previous Next Index
Class edu.cornell.lassp.mck10.HysteresisApplet.HysteresisPanel
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Container
|
+----java.awt.Panel
|
+----edu.cornell.lassp.mck10.FastApplet.AppletPanel
|
+----edu.cornell.lassp.mck10.HysteresisApplet.HysteresisPanel
- public class HysteresisPanel
- extends AppletPanel
- implements Observer
HysteresisPanel subclasses AppletPanel to
produce a fastloading applet which provides a graphical interface
to an interesting model of
Source Code
is available.
- Version:
- 1.0
- Author:
- Matt Kuntz (e-mail: mck10@cornell.edu)
-
HysteresisPanel()
-
HysteresisPanel(), the default constructor, is necessary
so that FastApplet can load and construct the
HysteresisPanel without knowing anything about it except
that it is a type of AppletPanel.
-
paint(Graphics)
- If this is the first time the applet is painting itself, then we
will generate a hysteresis loop after we paint it.
-
setup(Applet, Label)
-
setup(applet, myLabel) is used to set up the display
and the simulation.
-
update(Observable, Object)
-
update(obs, obj) catches changes in the size of the
lattice.
HysteresisPanel
public HysteresisPanel()
-
HysteresisPanel(), the default constructor, is necessary
so that FastApplet can load and construct the
HysteresisPanel without knowing anything about it except
that it is a type of AppletPanel.
setup
public void setup(Applet applet,
Label myLabel)
-
setup(applet, myLabel) is used to set up the display
and the simulation. This overrides the abstract setup
method in AppletPanel and is called by
FastApplet after the panel has been constructed, to
set things up.
- Parameters:
- applet - A reference to the applet containing the panel.
- myLabel - A reference to the label on the splash screen.
- Overrides:
- setup in class AppletPanel
update
public void update(Observable obs,
Object obj)
-
update(obs, obj) catches changes in the size of the
lattice. If the lattice becomes too big to display in the panel
of the applet, an external frame is created to display the lattice,
and the LoopView is expanded to fill the entire applet window.
- Parameters:
- obs - The observable (in this case, width) which has changed.
- obj - This parameter is unused.
paint
public void paint(Graphics g)
- If this is the first time the applet is painting itself, then we
will generate a hysteresis loop after we paint it.
- Parameters:
- g - The graphics context of the area to paint.
- Overrides:
- paint in class Component
All Packages Class Hierarchy This Package Previous Next Index