|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectcom.objectplanet.survey.plugin.api.Question
com.objectplanet.survey.plugin.api.QuestionMultiple
public class QuestionMultiple
This class represents a multiple choice question. Subclasses Question, and adds functionality to create/edit/delete a multiple choice question.
| Field Summary | |
|---|---|
static int |
LAYOUT_BUTTON_BOTTOM
Option layout: Button is placed under the text/image |
static int |
LAYOUT_BUTTON_LEFT
Option layout: Button is placed to the left of the text/image |
static int |
LAYOUT_BUTTON_RIGHT
Option layout: Button is placed to the right of the text/image |
static int |
LAYOUT_BUTTON_TOP
Option layout: Button is placed over the text/image |
static int |
LAYOUT_IMAGE_BOTTOM
Option layout: Image is placed under the text |
static int |
LAYOUT_IMAGE_LEFT
Option layout: Image is placed to the left of the text |
static int |
LAYOUT_IMAGE_RIGHT
Option layout: Image is placed to the tight of the text |
static int |
LAYOUT_IMAGE_TOP
Option layout: Image is placed over the text |
| Fields inherited from class com.objectplanet.survey.plugin.api.Question |
|---|
ESSAY_FIELD_CHECKBOX, ESSAY_FIELD_DROPDOWN, ESSAY_FIELD_NUMERIC_DEC, ESSAY_FIELD_NUMERIC_INT, ESSAY_FIELD_TEXT, ESSAYFIELD_LENGTH, INTEXT_TYPE_CHECKBOX, INTEXT_TYPE_DROPDOWN, INTEXT_TYPE_NUMERIC_DEC, INTEXT_TYPE_NUMERIC_INT, INTEXT_TYPE_TEXT, QUESTION_DROPDOWN, QUESTION_MATRIX, QUESTION_MULTIPLE, QUESTION_NO_TYPE, QUESTION_NUMERIC, QUESTION_RATING, TAG_END, TAG_START, UPLOAD_IMAGE, UPLOAD_NONE |
| Method Summary | |
|---|---|
void |
addOption(int optionIndex,
java.lang.String optionText)
Adds an option to the end of the multiple choice question. |
void |
addOption(int optionIndex,
java.lang.String optionText,
java.lang.String imageUrl,
int buttonLayout,
int imageLayout)
Adds an option to the the multiple choice question. |
void |
addOption(java.lang.String optionText)
Adds an option to the end of the multiple choice question. |
void |
addOption(java.lang.String optionText,
java.lang.String imageUrl,
int buttonLayout,
int imageLayout)
Adds an option to the end of the multiple choice question. |
int |
getColumnCount()
Gets the number of columns |
boolean |
getMultipleOn()
Gets the multipleOn |
int |
getOptionButtonLayout(int index)
Gets option button layout (position relative to the text/image) |
int |
getOptionCount()
Gets the optionCount |
java.lang.String |
getOptionImage(int index)
Gets option image |
int |
getOptionImageLayout(int index)
Gets option image layout (position relative to the text) |
java.lang.String |
getOptionText(int index)
Gets option text. |
boolean |
getOtherField()
Gets text-field for entering "other". |
void |
keepBusinessObject()
Get and keep business object. |
void |
releaseBusinessObject()
Release business object. |
void |
removeOption(int optionIndex)
Removes one option |
void |
removeOptions()
Removes all options. |
void |
setColumnCount(int columnCount)
Sets the number of columns |
void |
setMultipleOn(boolean MultipleOn)
Sets multiple selections. |
void |
setOtherField(boolean otherOn)
Sets text-field for entering "other", if none of the other choices apply. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int LAYOUT_IMAGE_LEFT
public static final int LAYOUT_IMAGE_RIGHT
public static final int LAYOUT_IMAGE_TOP
public static final int LAYOUT_IMAGE_BOTTOM
public static final int LAYOUT_BUTTON_LEFT
public static final int LAYOUT_BUTTON_RIGHT
public static final int LAYOUT_BUTTON_TOP
public static final int LAYOUT_BUTTON_BOTTOM
| Method Detail |
|---|
public void setMultipleOn(boolean MultipleOn)
throws LockException,
RespondentsExistException,
SurveySecurityException,
SurveySystemException
MultipleOn - Multiple selections value
LockException - Thrown if the survey is locked and
can't be edited. Not yet implemented. Use survey.isLocked()
to be sure that the survey can be updated.
RespondentsExistException - Thrown if the survey has responses and
can't be edited. Not yet implemented. Use survey.hasRespondents()
to be sure that the survey can be updated.
SurveySecurityException - Thrown if the user is not authorized
to call this method.
SurveySystemException - If an error occurs in the system.
public void setColumnCount(int columnCount)
throws LockException,
RespondentsExistException,
SurveySecurityException,
SurveySystemException
columnCount - The number of columns
LockException - Thrown if the survey is locked and
can't be edited. Not yet implemented. Use survey.isLocked()
to be sure that the survey can be updated.
RespondentsExistException - Thrown if the survey has responses and
can't be edited. Not yet implemented. Use survey.hasRespondents()
to be sure that the survey can be updated.
SurveySecurityException - Thrown if the user is not authorized
to call this method.
SurveySystemException - If an error occurs in the system.
public void setOtherField(boolean otherOn)
throws java.lang.IllegalArgumentException,
LockException,
RespondentsExistException,
SurveySecurityException,
SurveySystemException
otherOn - True if other is on.
LockException - Thrown if the survey is locked and
can't be edited. Not yet implemented. Use survey.isLocked()
to be sure that the survey can be updated.
RespondentsExistException - Thrown if the survey has responses and
can't be edited. Not yet implemented. Use survey.hasRespondents()
to be sure that the survey can be updated.
SurveySecurityException - Thrown if the user is not authorized
to call this method.
java.lang.IllegalArgumentException - If no multiple options exist..
SurveySystemException - If an error occurs in the system.
public boolean getMultipleOn()
throws SurveySystemException
SurveySystemException - If an error occurs in the system.
public int getColumnCount()
throws SurveySystemException
SurveySystemException - If an error occurs in the system.
public int getOptionCount()
throws SurveySystemException
SurveySystemException - If an error occurs in the system.
public boolean getOtherField()
throws SurveySystemException
SurveySystemException - If an error occurs in the system.
public java.lang.String getOptionText(int index)
throws java.lang.IllegalArgumentException,
SurveySystemException
index - Index of the option
java.lang.IllegalArgumentException - If illegal index
SurveySystemException - If an error occurs in the system.
public java.lang.String getOptionImage(int index)
throws java.lang.IllegalArgumentException,
SurveySystemException
index - Index of the option
java.lang.IllegalArgumentException - If illegal index
SurveySystemException - If an error occurs in the system.
public int getOptionButtonLayout(int index)
throws java.lang.IllegalArgumentException,
SurveySystemException
index - Index of the option
java.lang.IllegalArgumentException - If illegal index
SurveySystemException - If an error occurs in the system.
public int getOptionImageLayout(int index)
throws java.lang.IllegalArgumentException,
SurveySystemException
index - Index of the option
java.lang.IllegalArgumentException - If illegal index
SurveySystemException - If an error occurs in the system.
public void addOption(java.lang.String optionText)
throws LockException,
RespondentsExistException,
SurveySecurityException,
SurveySystemException
optionText - Option text
LockException - Thrown if the survey is locked and
can't be edited. Not yet implemented. Use survey.isLocked()
to be sure that the survey can be updated.
RespondentsExistException - Thrown if the survey has responses and
can't be edited. Not yet implemented. Use survey.hasRespondents()
to be sure that the survey can be updated.
SurveySecurityException - Thrown if the user is not authorized
to call this method.
SurveySystemException - If an error occurs in the system.
public void addOption(int optionIndex,
java.lang.String optionText)
throws LockException,
RespondentsExistException,
SurveySecurityException,
SurveySystemException
optionIndex - Index of the option, starts at 0optionText - Option text
LockException - Thrown if the survey is locked and
can't be edited. Not yet implemented. Use survey.isLocked()
to be sure that the survey can be updated.
RespondentsExistException - Thrown if the survey has responses and
can't be edited. Not yet implemented. Use survey.hasRespondents()
to be sure that the survey can be updated.
SurveySecurityException - Thrown if the user is not authorized
to call this method.
SurveySystemException - If an error occurs in the system.
public void addOption(java.lang.String optionText,
java.lang.String imageUrl,
int buttonLayout,
int imageLayout)
throws LockException,
RespondentsExistException,
SurveySecurityException,
SurveySystemException
optionText - Option textimageUrl - Relative image url.buttonLayout - Position of the button, relative to
the text and imageimageLayout - Position of the image, relative to the
text
LockException - Thrown if the survey is locked and
can't be edited. Not yet implemented. Use survey.isLocked()
to be sure that the survey can be updated.
RespondentsExistException - Thrown if the survey has responses and
can't be edited. Not yet implemented. Use survey.hasRespondents()
to be sure that the survey can be updated.
SurveySecurityException - Thrown if the user is not authorized
to call this method.
SurveySystemException - If an error occurs in the system.
public void addOption(int optionIndex,
java.lang.String optionText,
java.lang.String imageUrl,
int buttonLayout,
int imageLayout)
throws LockException,
RespondentsExistException,
SurveySecurityException,
SurveySystemException
optionIndex - Index of the option, starts at 0optionText - Option textimageUrl - Relative image url.buttonLayout - Position of the button, relative to
the text and imageimageLayout - Position of the image, relative to the
text
LockException - Thrown if the survey is locked and
can't be edited. Not yet implemented. Use survey.isLocked()
to be sure that the survey can be updated.
RespondentsExistException - Thrown if the survey has responses and
can't be edited. Not yet implemented. Use survey.hasRespondents()
to be sure that the survey can be updated.
SurveySecurityException - Thrown if the user is not authorized
to call this method.
SurveySystemException - If an error occurs in the system.
public void removeOption(int optionIndex)
throws LockException,
RespondentsExistException,
SurveySecurityException,
SurveySystemException
optionIndex - Index of the option, from 0 to
optionCount-1
LockException - Thrown if the survey is locked and
can't be edited. Not yet implemented. Use survey.isLocked()
to be sure that the survey can be updated.
RespondentsExistException - Thrown if the survey has responses and
can't be edited. Not yet implemented. Use survey.hasRespondents()
to be sure that the survey can be updated.
SurveySecurityException - Thrown if the user is not authorized
to call this method.
SurveySystemException - If an error occurs in the system.
public void removeOptions()
throws LockException,
RespondentsExistException,
SurveySecurityException,
SurveySystemException
LockException - Thrown if the survey is locked and
can't be edited. Not yet implemented. Use survey.isLocked()
to be sure that the survey can be updated.
RespondentsExistException - Thrown if the survey has responses and
can't be edited. Not yet implemented. Use survey.hasRespondents()
to be sure that the survey can be updated.
SurveySecurityException - Thrown if the user is not authorized
to call this method.
SurveySystemException - If an error occurs in the system.
public void keepBusinessObject()
throws SurveySystemException
keepBusinessObject in class QuestionSurveySystemException - If an error occurs in the system.public void releaseBusinessObject()
releaseBusinessObject in class Question
|
Copyright ? ObjectPlanet Inc. All Rights Reserved. | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||