예제 #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);
 }
예제 #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;
 }
예제 #3
0
 public void addQuestion(Question question) {
   QuestionEditor editor = addNewQuestionEditor();
   editor.setContent(question);
 }