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

Variable Index

 o display
 o freq
 o title

Constructor Index

 o Title()
constructor that does nothing
 o 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.

Method Index

 o action(Event, Object)
respond to the menu choices
 o addMenus(MenuBar)
add menu items to the window containing this GWin canvas.
 o destroy()
This is called when the user closes the window.
 o getParameters(int)
Return a parameter array if BNF(), parse(), and unparse() are to be automated, null otherwise.
 o initialize(int)
Initialize, either partially or completely.
 o setWatchManager(WatchManager, String)
Remember the WatchManager for this object and create the window.
 o update(String, Pointer, Watchable)
One of the watched variables has changed, so look at it and others.

Variables

 o title
 protected PString title
 o display
 protected Display display[]
 o freq
 protected PInt freq

Constructors

 o Title
 public Title()
constructor that does nothing

 o 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.

Methods

 o 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
 o 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
 o addMenus
 public void addMenus(MenuBar mb)
add menu items to the window containing this GWin canvas.

Overrides:
addMenus in class GWin
 o 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
 o action
 public boolean action(Event e,
                       Object w)
respond to the menu choices

Overrides:
action in class Component
 o 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
 o initialize
 public void initialize(int level)
Initialize, either partially or completely.

Overrides:
initialize in class Display
See Also:
initialize