Package eu.bandm.tools.option
Class Compiler.Phase_gui
java.lang.Object
eu.bandm.tools.tdom.runtime.BaseVisitor
eu.bandm.tools.option.absy.Visitor
eu.bandm.tools.option.Compiler.Phase
eu.bandm.tools.option.Compiler.Phase_gui
- All Implemented Interfaces:
PCDataVisitor
- Enclosing class:
- Compiler
Compile code for the gui class.
-
Field Summary
Modifier and TypeFieldDescription(package private) final GeneratedParameterizedType
Cache for the generated type "List of Component".(package private) int
Counting the argument input fields, either relative to an option or to a rep group.(package private) GeneratedClass
The generated class of the gui under construction.(package private) GeneratedMethod
The generated method "model2view", either on top-level or for a repeting group.(package private) GeneratedMethod
The generated method "populate" for filling a gui, on toplevel or for a repeting group.(package private) GeneratedMethod
The generated method "view2model", either on top-level or for a repeting group.(package private) GeneratedClass
The generated class of the top level gui, existing only once.(package private) GeneratedMethod
The generated method "model2view" on top-level.(package private) GeneratedMethod
The generated method "populate" for filling a gui on toplevel.(package private) GeneratedMethod
The generated method "view2model" on top-level.Fields inherited from class eu.bandm.tools.option.Compiler.Phase
abbrev, currentOptionElement, name, option_qualifier
Fields inherited from class eu.bandm.tools.tdom.runtime.BaseVisitor
validating
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
makeGuiField
(MetaType cl, String type) Supplies empty args and and callsmakeGuiField(eu.bandm.tools.metajava.MetaType,java.lang.String,java.lang.String)
protected void
makeGuiField
(MetaType cl, String type, String args) Add a statement to the "populate()" method to generate the input field, and to the conversion methods, and a variable to store its access.protected void
makeGuiField
(Class cl, String type) Wraps the Java class and callsmakeGuiField(eu.bandm.tools.metajava.MetaType,java.lang.String)
protected void
makeGuiField
(Class cl, String type, String args) Wraps the Java class and callsmakeGuiField(eu.bandm.tools.metajava.MetaType,java.lang.String,java.lang.String)
void
Make gui input field and aux methods for an option without arguments (switch)void
translate
(Element_optionlist olist) Main entry point, generates the gui representatives and adds them to theCompiler.guiclass
.void
visit
(Element_bool el) Make gui input field and aux methods for an argument of boolean typevoid
visit
(Element_comment element) Generate the GUI label for a separating comment.void
visit
(Element_enum el) Make gui input field and aux methods for an argument of a particular enumeration typevoid
visit
(Element_enumset el) Make gui input field and aux methods for an argument of a particular enum set typevoid
visit
(Element_float el) Make gui input field and aux methods for an argument of float typevoid
visit
(Element_int el) Make gui input field and aux methods for an argument of integer typevoid
visit
(Element_option element) Generate all GUI elements and auxiliary methods for the visited option.void
visit
(Element_rat el) Make gui input field and aux methods for an argument of Rational typevoid
visit
(Element_rep el) Make all gui objects and aux methods for a repeting group of arguments.void
visit
(Element_string el) Make gui input field and aux methods for an argument of String typevoid
visit
(Element_uri el) Make gui input field and aux methods for an argument of uri/file name typeMethods inherited from class eu.bandm.tools.option.Compiler.Phase
bothtags, bothtags_formatted, ERROR, longestname, longesttag, shortestname, shortesttag, WARNING, WARNING
Methods inherited from class eu.bandm.tools.option.absy.Visitor
visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit
Methods inherited from class eu.bandm.tools.tdom.runtime.BaseVisitor
visit
-
Field Details
-
allComponentClass
Cache for the generated type "List of Component". -
tl_class_gui
GeneratedClass tl_class_guiThe generated class of the top level gui, existing only once. -
class_gui
GeneratedClass class_guiThe generated class of the gui under construction. Is either top-level or for a repeting group. -
tl_meth_make
GeneratedMethod tl_meth_makeThe generated method "populate" for filling a gui on toplevel. Exists only once. -
meth_make
GeneratedMethod meth_makeThe generated method "populate" for filling a gui, on toplevel or for a repeting group. -
tl_meth_m2v
GeneratedMethod tl_meth_m2vThe generated method "model2view" on top-level. -
meth_m2v
GeneratedMethod meth_m2vThe generated method "model2view", either on top-level or for a repeting group. -
tl_meth_v2m
GeneratedMethod tl_meth_v2mThe generated method "view2model" on top-level. -
meth_v2m
GeneratedMethod meth_v2mThe generated method "view2model", either on top-level or for a repeting group. -
argindex
int argindexCounting the argument input fields, either relative to an option or to a rep group.
-
-
Constructor Details
-
Phase_gui
protected Phase_gui()
-
-
Method Details
-
translate
Main entry point, generates the gui representatives and adds them to theCompiler.guiclass
. (This was created by the main methodCompiler.compile(Element_optionlist, String, String, String, String, Format, String, MessageReceiver)
and stored globally. -
visit
Generate the GUI label for a separating comment. The name of the variable has been calculated in an earlier visit, to collect all languages correctly. -
visit
Generate all GUI elements and auxiliary methods for the visited option.- Overrides:
visit
in classCompiler.Phase
-
makeGuiField
Wraps the Java class and callsmakeGuiField(eu.bandm.tools.metajava.MetaType,java.lang.String)
-
makeGuiField
Wraps the Java class and callsmakeGuiField(eu.bandm.tools.metajava.MetaType,java.lang.String,java.lang.String)
-
makeGuiField
Supplies empty args and and callsmakeGuiField(eu.bandm.tools.metajava.MetaType,java.lang.String,java.lang.String)
-
makeGuiField
Add a statement to the "populate()" method to generate the input field, and to the conversion methods, and a variable to store its access.- Parameters:
cl
- the class of the GUI widget (for instanceGui.Field_int
)type
- the text fragment indicating the type, to construct the method call.args
- additional arguments (as Text) added to the factory method call.
-
visit
Make gui input field and aux methods for an argument of integer type -
visit
Make gui input field and aux methods for an argument of float type -
visit
Make gui input field and aux methods for an argument of Rational type -
makeNoArgSwitch
public void makeNoArgSwitch()Make gui input field and aux methods for an option without arguments (switch) -
visit
Make gui input field and aux methods for an argument of boolean type -
visit
Make gui input field and aux methods for an argument of String type -
visit
Make gui input field and aux methods for an argument of uri/file name type -
visit
Make gui input field and aux methods for an argument of a particular enumeration type -
visit
Make gui input field and aux methods for an argument of a particular enum set type -
visit
Make all gui objects and aux methods for a repeting group of arguments.
-