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
FieldsModifier and TypeFieldDescription(package private) final GeneratedParameterizedTypeCache for the generated type "List of Component".(package private) intCounting the argument input fields, either relative to an option or to a rep group.(package private) GeneratedClassThe generated class of the gui under construction.(package private) GeneratedMethodThe generated method "model2view", either on top-level or for a repeting group.(package private) GeneratedMethodThe generated method "populate" for filling a gui, on toplevel or for a repeting group.(package private) GeneratedMethodThe generated method "view2model", either on top-level or for a repeting group.(package private) GeneratedClassThe generated class of the top level gui, existing only once.(package private) GeneratedMethodThe generated method "model2view" on top-level.(package private) GeneratedMethodThe generated method "populate" for filling a gui on toplevel.(package private) GeneratedMethodThe generated method "view2model" on top-level.Fields inherited from class eu.bandm.tools.option.Compiler.Phase
abbrev, currentOptionElement, name, option_qualifierFields inherited from class eu.bandm.tools.tdom.runtime.BaseVisitor
validating -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidmakeGuiField(MetaType cl, String type) Supplies empty args and and callsmakeGuiField(eu.bandm.tools.metajava.MetaType,java.lang.String,java.lang.String)protected voidmakeGuiField(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 voidmakeGuiField(Class cl, String type) Wraps the Java class and callsmakeGuiField(eu.bandm.tools.metajava.MetaType,java.lang.String)protected voidmakeGuiField(Class cl, String type, String args) Wraps the Java class and callsmakeGuiField(eu.bandm.tools.metajava.MetaType,java.lang.String,java.lang.String)voidMake gui input field and aux methods for an option without arguments (switch)voidtranslate(Element_optionlist olist) Main entry point, generates the gui representatives and adds them to theCompiler.guiclass.voidvisit(Element_bool el) Make gui input field and aux methods for an argument of boolean typevoidvisit(Element_comment element) Generate the GUI label for a separating comment.voidvisit(Element_enum el) Make gui input field and aux methods for an argument of a particular enumeration typevoidvisit(Element_enumset el) Make gui input field and aux methods for an argument of a particular enum set typevoidvisit(Element_float el) Make gui input field and aux methods for an argument of float typevoidvisit(Element_int el) Make gui input field and aux methods for an argument of integer typevoidvisit(Element_option element) Generate all GUI elements and auxiliary methods for the visited option.voidvisit(Element_rat el) Make gui input field and aux methods for an argument of Rational typevoidvisit(Element_rep el) Make all gui objects and aux methods for a repeting group of arguments.voidvisit(Element_string el) Make gui input field and aux methods for an argument of String typevoidvisit(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, WARNINGMethods 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, visitMethods 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, GeneratedAnnotation, 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:
visitin 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.
-