Ejemplo n.º 1
0
 @Override
 public ExprQuestionItem visit(QuestionComputed questionComputeStatement) {
   Identifier identifier = questionComputeStatement.getIdentifier();
   Widget widget = (Widget) questionComputeStatement.getType().accept(this);
   widget.setIdentifier(identifier);
   ExprQuestionItem quetionItem = new ExprQuestionItem(questionComputeStatement, widget);
   formView.addExprQuestionItem(quetionItem);
   widgetListener.initializeValue(identifier, new UndefinedValue());
   return quetionItem;
 }
Ejemplo n.º 2
0
 @Override
 public FormFrame visit(Form form) {
   widgetListener = new WidgetListener(formView);
   form.getBlock().accept(this);
   JButton button = new JButton("Done");
   formView.addDoneButton(button);
   button.addActionListener(new DoneButtonListener(widgetListener.getEvaluator()));
   formView.setFrameVisible(true);
   return formView;
 }
Ejemplo n.º 3
0
 @Override
 public QuestionItem visit(QuestionNormal questionStatement) {
   Widget widget = (Widget) questionStatement.getType().accept(this);
   widget.setIdentifier(questionStatement.getIdentifier());
   Identifier identifier = questionStatement.getIdentifier();
   QuestionItem questionItem = new QuestionItem(questionStatement, widget);
   formView.addQuestionPanel(questionItem);
   widgetListener.initializeValue(identifier, new UndefinedValue());
   return questionItem;
 }