Exemple #1
0
 public Quiz getQuizFromContents() {
   List<Question> questions = new ArrayList<Question>();
   for (QuestionEditor editor : questionEditorList) {
     questions.add(editor.getQuestionFromContents());
   }
   return new Quiz(titleTxt.getText(), authorTxt.getText(), questions);
 }
Exemple #2
0
 public QuestionEditor addNewQuestionEditor() {
   QuestionEditor questionEditor = new QuestionEditor();
   questionEditorList.add(questionEditor);
   questionEditor.setNumber(questionEditorList.size());
   this.questionsPanel.add(questionEditor);
   this.revalidate();
   this.repaint();
   this.pack();
   return questionEditor;
 }
Exemple #3
0
 public void addQuestion(Question question) {
   QuestionEditor editor = addNewQuestionEditor();
   editor.setContent(question);
 }