Class Title
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Container
|
+----java.awt.Panel
|
+----GWin
|
+----Display
|
+----Title
- public class Title
- extends Display
This Display shows a title at the top, with another Display embedded inside.
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.02, 18 July 97
- Author:
- Leemon Baird
-
display
-
-
freq
-
-
title
-
-
Title()
- constructor that does nothing
-
Title(String, Display)
- This constructor takes the same parameters that parse() parses, and
initializes this object just as if it had been created by parsing instead.
-
action(Event, Object)
- respond to the menu choices
-
addMenus(MenuBar)
- add menu items to the window containing this GWin canvas.
-
destroy()
- This is called when the user closes the window.
-
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.
-
update(String, Pointer, Watchable)
- One of the watched variables has changed, so look at it and others.
title
protected PString title
display
protected Display display[]
freq
protected PInt freq
Title
public Title()
- constructor that does nothing
Title
public Title(String titleString,
Display disp)
- This constructor takes the same parameters that parse() parses, and
initializes this object just as if it had been created by parsing instead.
This window contains the Display disp, and the title is titleString.
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
addMenus
public void addMenus(MenuBar mb)
- add menu items to the window containing this GWin canvas.
- Overrides:
- addMenus in class GWin
update
public void update(String changedName,
Pointer changedVar,
Watchable obj)
- One of the watched variables has changed, so look at it and others.
It should call checkMoved() to
make sure the window is a legal size.
- Overrides:
- update in class Display
action
public boolean action(Event e,
Object w)
- respond to the menu choices
- Overrides:
- action in class Component
destroy
public void destroy()
- This is called when the user closes the window. Override it
to react to that event (e.g. kill threads, dispose of Graphics, unregister watches)
- Overrides:
- destroy in class Display
initialize
public void initialize(int level)
- Initialize, either partially or completely.
- Overrides:
- initialize in class Display
- See Also:
- initialize