public class FormEntryPrompt extends FormEntryCaption
FormEntryCaption.RepeatOptionselement, TEXT_FORM_AUDIO, TEXT_FORM_IMAGE, TEXT_FORM_LONG, TEXT_FORM_SHORT, TEXT_FORM_VIDEO, viewWidgetCHANGE_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.
|
formElementStateChanged, getAppearanceHint, getAudioText, getFormElement, getImageText, getIndex, getIText, getLongText, getMultiplicity, getNumRepetitions, getQuestionText, getQuestionText, getRepeatOptions, getRepeatText, getRepetitionsText, getRepetitionText, getShortText, getSpecialFormQuestionText, getSpecialFormQuestionText, getTextID, localizer, repeats, substituteStringArgsprotected FormEntryPrompt()
public int getControlType()
public int getDataType()
public String getPromptAttributes()
@Nullable public IAnswerData getAnswerValue()
public String getAnswerText()
public String getConstraintText()
public String getConstraintText(IAnswerData attemptedValue)
public String getConstraintText(String textForm, IAnswerData attemptedValue)
public List<TreeElement> getBindAttributes()
public List<SelectChoice> getSelectChoices()
public boolean isRequired()
public boolean isReadOnly()
public QuestionDef getQuestion()
public void register(IQuestionWidget viewWidget)
register in class FormEntryCaptionpublic void unregister()
unregister in class FormEntryCaptionpublic void formElementStateChanged(TreeElement instanceNode, int changeFlags)
formElementStateChanged in interface FormElementStateListenerformElementStateChanged in class FormEntryCaptionpublic String getHelpText()
public 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 QuestionDefIllegalArgumentException - if Selection is nullpublic String getSelectChoiceText(SelectChoice selection)
getSelectItemText(Selection sel)public String getSpecialFormSelectItemText(Selection sel, 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 QuestionDefIllegalArgumentException - if sel == nullpublic String getSpecialFormSelectChoiceText(SelectChoice sel, String form)
public void requestConstraintHint(ConstraintHint hint) throws UnpivotableExpressionException
UnpivotableExpressionExceptionCopyright © 2022. All rights reserved.