public class FormEntryPrompt extends FormEntryCaption
FormEntryCaption.RepeatOptions
Modifier and Type | Field and Description |
---|---|
(package private) boolean |
dynamicChoicesPopulated |
(package private) TreeElement |
mTreeElement |
element, form, index, TEXT_FORM_AUDIO, TEXT_FORM_IMAGE, TEXT_FORM_LONG, TEXT_FORM_SHORT, TEXT_FORM_VIDEO, viewWidget
CHANGE_DATA, CHANGE_ENABLED, CHANGE_INIT, CHANGE_LOCALE, CHANGE_OTHER, CHANGE_RELEVANT, CHANGE_REQUIRED
Modifier | Constructor and Description |
---|---|
protected |
FormEntryPrompt()
This empty constructor exists for convenience of any supertypes of this prompt
|
|
FormEntryPrompt(FormDef form,
FormIndex index)
Creates a FormEntryPrompt for the element at the given index in the form.
|
Modifier and Type | Method and Description |
---|---|
void |
expireDynamicChoices() |
void |
formElementStateChanged(TreeElement instanceNode,
int changeFlags) |
java.lang.String |
getAnswerText() |
IAnswerData |
getAnswerValue() |
java.util.List<TreeElement> |
getBindAttributes() |
java.lang.String |
getConstraintText() |
java.lang.String |
getConstraintText(IAnswerData attemptedValue) |
java.lang.String |
getConstraintText(java.lang.String textForm,
IAnswerData attemptedValue) |
int |
getControlType() |
int |
getDataType() |
java.lang.String |
getHelpText()
ONLY RELEVANT to Question elements!
Will throw runTimeException if this is called for anything that isn't a Question.
|
java.lang.String |
getPromptAttributes() |
QuestionDef |
getQuestion() |
java.util.List<SelectChoice> |
getSelectChoices() |
java.lang.String |
getSelectChoiceText(SelectChoice selection) |
java.lang.String |
getSelectItemText(Selection sel)
Attempts to return the specified Item (from a select or 1select) text.
|
java.lang.String |
getSpecialFormSelectChoiceText(SelectChoice sel,
java.lang.String form) |
java.lang.String |
getSpecialFormSelectItemText(Selection sel,
java.lang.String form)
This method is generally used to retrieve special forms for a
(select or 1select) item, e.g.
|
boolean |
isReadOnly() |
boolean |
isRequired() |
void |
register(IQuestionWidget viewWidget) |
void |
requestConstraintHint(ConstraintHint hint) |
void |
unregister() |
formElementStateChanged, getAppearanceHint, getAudioText, getFormElement, getImageText, getIndex, getIText, getLongText, getMultiplicity, getNumRepetitions, getQuestionText, getQuestionText, getRepeatOptions, getRepeatText, getRepetitionsText, getRepetitionText, getShortText, getSpecialFormQuestionText, getSpecialFormQuestionText, getTextID, localizer, repeats, substituteStringArgs
TreeElement mTreeElement
boolean dynamicChoicesPopulated
protected FormEntryPrompt()
public int getControlType()
public int getDataType()
public java.lang.String getPromptAttributes()
public IAnswerData getAnswerValue()
public java.lang.String getAnswerText()
public java.lang.String getConstraintText()
public java.lang.String getConstraintText(IAnswerData attemptedValue)
public java.lang.String getConstraintText(java.lang.String textForm, IAnswerData attemptedValue)
public java.util.List<TreeElement> getBindAttributes()
public java.util.List<SelectChoice> getSelectChoices()
public void expireDynamicChoices()
public boolean isRequired()
public boolean isReadOnly()
public QuestionDef getQuestion()
public void register(IQuestionWidget viewWidget)
register
in class FormEntryCaption
public void unregister()
unregister
in class FormEntryCaption
public void formElementStateChanged(TreeElement instanceNode, int changeFlags)
formElementStateChanged
in interface FormElementStateListener
formElementStateChanged
in class FormEntryCaption
public java.lang.String getHelpText()
public java.lang.String getSelectItemText(Selection sel)
sel
- the selection (item), if null
will throw a IllegalArgumentExceptionnull
if no text for this element exists (after all fallbacks).RunTimeException
- if this method is called on an element that is NOT a QuestionDefjava.lang.IllegalArgumentException
- if Selection is null
public java.lang.String getSelectChoiceText(SelectChoice selection)
getSelectItemText(Selection sel)
public java.lang.String getSpecialFormSelectItemText(Selection sel, java.lang.String form)
sel
- - The Item whose text you're trying to retrieve.form
- - Special text form of Item you're trying to retrieve.null
if no text for this element exists (with the specified special form).RunTimeException
- if this method is called on an element that is NOT a QuestionDefjava.lang.IllegalArgumentException
- if sel == null
public java.lang.String getSpecialFormSelectChoiceText(SelectChoice sel, java.lang.String form)
public void requestConstraintHint(ConstraintHint hint) throws UnpivotableExpressionException
UnpivotableExpressionException