Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## net.sourceforge.jsurveyor
Class QuestionPage

    java.lang.Object
      net.sourceforge.jsurveyor.QuestionPage

public class QuestionPage
extends java.lang.Object

Class to model pages in questionnaires. It handles a list of the specific order of the questions on the page.

Version:
  1.0
Author:
  Claus Methmann Christensen, Anders Spliid Hansen, Esben Iversen Hansen, Lars H Jensen, Marcus Overheu, Thomas Ramdal, Peter Thomsen

Constructor Summary
`QuestionPage()` Constructor for QuestionPage
`QuestionPage(int questionPageID, java.util.ArrayList questions)` Constructor for QuestionPage, use through DataAccess.

Method Summary
`void` | `addQuestion(net.sourceforge.jsurveyor.Question question)` Add a question to the page.
`void` | `addQuestionAtPosition(net.sourceforge.jsurveyor.Question question, int position)` Add a question to the page at a specific position.
`int` | `getQuestionPageID()` Returns the ID of the page.
`java.util.ArrayList` | `getRefQuestions()` Returns an ArrayList with toString representations of the added Questions.
`void` | `removeQuestion(net.sourceforge.jsurveyor.Question question)` Remove a question from the page.
`void` | `setQuestionPageID(int questionPageID)` Sets the ID of the page.
`java.lang.String` | `toString()` Returns a string representation of the object.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### QuestionPage

    public QuestionPage()

  Constructor for QuestionPage

### QuestionPage

    public QuestionPage(int questionPageID,
                        java.util.ArrayList questions)

  Constructor for QuestionPage, use through DataAccess.

Parameters:
  `questionPageID` - int
  `questions` - ArrayList

Method Detail

### addQuestion

    public void addQuestion(net.sourceforge.jsurveyor.Question question)

  Add a question to the page.

  Parameters:
    `question` - Question
  PRE condition:
    the question is not already added.

### addQuestionAtPosition

    public void addQuestionAtPosition(net.sourceforge.jsurveyor.Question question,
                                      int position)

  Add a question to the page at a specific position.

  Parameters:
    `question` - Question
    `position` - int
  PRE condition:
    the question is not already added.

### removeQuestion

    public void removeQuestion(net.sourceforge.jsurveyor.Question question)

  Remove a question from the page.

  Parameters:
    `question` - Question
  PRE condition:
    the question is on the page.

### getRefQuestions

    public java.util.ArrayList getRefQuestions()

  Returns an ArrayList with toString representations of the added Questions.

  Returns:
    ArrayList

### setQuestionPageID

    public void setQuestionPageID(int questionPageID)

  Sets the ID of the page.

  Parameters:
    `questionPageID` - int

### getQuestionPageID

    public int getQuestionPageID()

  Returns the ID of the page.

  Returns:
    int

### toString

    public java.lang.String toString()

  Returns a string representation of the object.

  Returns:
    String

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD