All Packages Class Hierarchy This Package Previous Next Index
Class sim.display.SaveDisplay
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Container
|
+----java.awt.Panel
|
+----GWin
|
+----Display
|
+----sim.display.SaveDisplay
- public class SaveDisplay
- extends Display
This Display takes another Display as a parameter, and periodically
copies it to the hard drive as a GIF. Other programs can take the
series of GIFs and create an animated GIF, FLI, FLC, MOV or other
animation.
This code is (c) 1997 Leemon Baird
<leemon@cs.cmu.edu>,
http://www.cs.cmu.edu/~baird
The source and object code may be redistributed freely.
If the code is modified, please state so in the comments.
- Version:
- 1.1, 20 Feb 97
- Author:
- Leemon Baird
-
animate
-
-
display
-
-
file
-
-
filename
-
-
fileStream
-
-
freq
-
-
max
-
-
numSaved
-
-
trigger
-
-
triggerVar
-
-
SaveDisplay()
-
-
action(Event, Object)
- respond to the menu choices
-
addMenus(MenuBar)
- add menu items to the window containing this GWin canvas.
-
getParameters(int)
- Return a parameter array if BNF(), parse(), and unparse() are to be automated, null otherwise.
-
initialize(int)
- Initialize, either partially or completely.
-
setWatchManager(WatchManager, String)
- Remember the WatchManager for this object and create the window.
-
unregister(String)
- One of the watched variables has been unregistered.
-
update(String, Pointer, Watchable)
- The trigger changed the appropriate number of times, so
save the GIF to disk.
filename
protected PString filename
trigger
protected PString trigger
freq
protected IntExp freq
max
protected IntExp max
display
protected Display display[]
animate
protected PBoolean animate
numSaved
protected PInt numSaved
file
protected File file
fileStream
protected FileOutputStream fileStream
triggerVar
protected Pointer triggerVar
SaveDisplay
public SaveDisplay()
getParameters
public Object[][] getParameters(int lang)
- Return a parameter array if BNF(), parse(), and unparse() are to be automated, null otherwise.
- Overrides:
- getParameters in class Display
- See Also:
- getParameters
setWatchManager
public void setWatchManager(WatchManager wm,
String name)
- Remember the WatchManager for this object and create the window.
After everything is parsed and windows are created, all experiments
are given a watchManager by Simulator, then it starts giving each
Display a watchManager. This is where
the Display should register each variable it wants to watch.
- Overrides:
- setWatchManager in class Display
unregister
public void unregister(String watchedVar)
- One of the watched variables has been unregistered.
- Overrides:
- unregister in class Display
addMenus
public void addMenus(MenuBar mb)
- add menu items to the window containing this GWin canvas.
- Overrides:
- addMenus in class GWin
action
public boolean action(Event e,
Object w)
- respond to the menu choices
- Overrides:
- action in class Component
update
public void update(String changedName,
Pointer changedVar,
Watchable obj)
- The trigger changed the appropriate number of times, so
save the GIF to disk.
- Overrides:
- update in class Display
initialize
public void initialize(int level)
- Initialize, either partially or completely.
- Overrides:
- initialize in class Display
- See Also:
- initialize
All Packages Class Hierarchy This Package Previous Next Index