Class ShowEdit

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----java.awt.Panel
                           |
                           +----GWin
                                   |
                                   +----Display
                                           |
                                           +----ShowEdit

public class ShowEdit
extends Display
This Display shows the names of variables and their values, and allows the user to edit them. Any variable that has been made watchable can be seen and changed by the user this way.

This code is (c) 1996,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.01, 13 Feb 97
Author:
Leemon Baird

Constructor Index

 o ShowEdit()
constructor that does nothing
 o ShowEdit(String, IntExp, boolean, String, String[])
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 getParameters(int)
Return a parameter array if BNF(), parse(), and unparse() are to be automated, null otherwise.
 o handleEvent(Event)
if a list element is selected, change the last value editted, and start editing the value of the new item selected.
 o initialize(int)
Initialize, either partially or completely.
 o unregister(String)
One of the watched variables has been unregistered.
 o update(String, Pointer, Watchable)
One of the watched variables has changed, so look at it and others.

Constructors

 o ShowEdit
 public ShowEdit()
constructor that does nothing

 o ShowEdit
 public ShowEdit(String trigger,
                 IntExp freq,
                 boolean showAll,
                 String prefix,
                 String vars[])
This constructor takes the same parameters that parse() parses, and initializes this object just as if it had been created by parsing instead. If showAll then it shows all variables (or all starting with prefix, if prefix is not null), else it shows those variables whose names are in varNames[]. It updates every freq times that trigger changes.

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 handleEvent
 public boolean handleEvent(Event evt)
if a list element is selected, change the last value editted, and start editing the value of the new item selected. Allows editting of any primitive type (double,float,int,long,short,string,char,boolean).

Overrides:
handleEvent in class Component
 o unregister
 public void unregister(String watchedVar)
One of the watched variables has been unregistered.

Overrides:
unregister in class Display
 o update
 public void update(String changedName,
                    Pointer changedVar,
                    Watchable obj)
One of the watched variables has changed, so look at it and others.

Overrides:
update in class Display
 o initialize
 public void initialize(int level)
Initialize, either partially or completely.

Overrides:
initialize in class Display
See Also:
initialize