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