public class QuestionDef extends Object implements IFormElement, Localizable
| Constructor and Description |
|---|
QuestionDef() |
QuestionDef(int id,
int controlType) |
| Modifier and Type | Method and Description |
|---|---|
void |
addChild(IFormElement fe) |
void |
addSelectChoice(SelectChoice choice) |
void |
alertStateObservers(int changeFlags) |
ActionController |
getActionController() |
String |
getAdditionalAttribute(String namespace,
String name)
Retrieve the value of an additional attribute on a Question or Group
|
List<TreeElement> |
getAdditionalAttributes()
Retrieve all additional attributes on a Question or Group
|
String |
getAppearanceAttr() |
IDataReference |
getBind() |
IFormElement |
getChild(int i) |
List<IFormElement> |
getChildren() |
SelectChoice |
getChoice(int i) |
SelectChoice |
getChoiceForValue(String value) |
List<SelectChoice> |
getChoices() |
int |
getControlType() |
int |
getDeepChildCount() |
ItemsetBinding |
getDynamicChoices() |
String |
getHelpInnerText() |
String |
getHelpText()
Only if there is no localizable version of the <hint> available should this method be used
|
String |
getHelpTextID() |
int |
getID() |
String |
getLabelInnerText()
This method returns the regular
innertext betweem label tags (if present) (<label>innertext</label>).
|
int |
getNumChoices() |
List<OSMTag> |
getOsmTags() |
String |
getTextID()
get the TextID for this element used for localization purposes
|
boolean |
isComplex()
true if the answer to this question yields xml tree data, not a simple string value
|
void |
localeChanged(String locale,
Localizer localizer)
Updates the current object with the locate given.
|
void |
readExternal(DataInputStream dis,
PrototypeFactory pf) |
void |
registerStateObserver(FormElementStateListener qsl)
Registers a state observer for this element.
|
void |
removeSelectChoice(SelectChoice choice) |
void |
setAdditionalAttribute(String namespace,
String name,
String value)
Capture additional attributes on a Question or Group
|
void |
setAppearanceAttr(String appearanceAttr) |
void |
setBind(IDataReference binding) |
void |
setChildren(List<IFormElement> v) |
void |
setControlType(int controlType) |
void |
setDynamicChoices(ItemsetBinding ib) |
void |
setHelpInnerText(String helpInnerText) |
void |
setHelpText(String helpText)
Only if there is no localizable version of the <hint>available should this method be used
|
void |
setHelpTextID(String textID) |
void |
setID(int id) |
void |
setLabelInnerText(String labelInnerText) |
void |
setOsmTags(List<OSMTag> tags) |
void |
setTextID(String textID)
Set the textID for this element for use with localization.
|
void |
unregisterAll() |
void |
unregisterStateObserver(FormElementStateListener qsl)
Unregisters a state observer for this element.
|
void |
writeExternal(DataOutputStream dos) |
public QuestionDef()
public QuestionDef(int id,
int controlType)
public int getID()
getID in interface IFormElementpublic void setID(int id)
setID in interface IFormElementid - The new unique ID of this elementpublic IDataReference getBind()
getBind in interface IFormElementpublic void setBind(IDataReference binding)
public int getControlType()
public void setControlType(int controlType)
public String getAppearanceAttr()
getAppearanceAttr in interface IFormElementpublic void setAppearanceAttr(String appearanceAttr)
setAppearanceAttr in interface IFormElementpublic String getHelpText()
public void setHelpText(String helpText)
public void setAdditionalAttribute(String namespace, String name, String value)
IFormElementsetAdditionalAttribute in interface IFormElementpublic String getAdditionalAttribute(String namespace, String name)
IFormElementgetAdditionalAttribute in interface IFormElementpublic List<TreeElement> getAdditionalAttributes()
IFormElementgetAdditionalAttributes in interface IFormElementpublic ActionController getActionController()
getActionController in interface IFormElementpublic String getHelpTextID()
public void setHelpTextID(String textID)
public void addSelectChoice(SelectChoice choice)
public void removeSelectChoice(SelectChoice choice)
public List<SelectChoice> getChoices()
public SelectChoice getChoice(int i)
public int getNumChoices()
public SelectChoice getChoiceForValue(String value)
public ItemsetBinding getDynamicChoices()
public void setDynamicChoices(ItemsetBinding ib)
public boolean isComplex()
public void localeChanged(String locale, Localizer localizer)
LocalizablelocaleChanged in interface Localizablepublic List<IFormElement> getChildren()
getChildren in interface IFormElementpublic void setChildren(List<IFormElement> v)
setChildren in interface IFormElementv - the children of this element, if it is capable of having
child elements.public void addChild(IFormElement fe)
addChild in interface IFormElementfe - The child element to be addedpublic IFormElement getChild(int i)
getChild in interface IFormElementpublic void readExternal(DataInputStream dis, PrototypeFactory pf) throws IOException, DeserializationException
readExternal in interface ExternalizableIOExceptionDeserializationExceptionpublic void writeExternal(DataOutputStream dos) throws IOException
writeExternal in interface ExternalizableIOExceptionpublic void registerStateObserver(FormElementStateListener qsl)
IFormElementregisterStateObserver in interface IFormElementpublic void unregisterStateObserver(FormElementStateListener qsl)
IFormElementunregisterStateObserver in interface IFormElementpublic void unregisterAll()
public void alertStateObservers(int changeFlags)
public int getDeepChildCount()
getDeepChildCount in interface IFormElementpublic void setLabelInnerText(String labelInnerText)
public String getLabelInnerText()
IFormElementgetLabelInnerText in interface IFormElementpublic void setHelpInnerText(String helpInnerText)
public String getHelpInnerText()
public String getTextID()
IFormElementgetTextID in interface IFormElementpublic void setTextID(String textID)
IFormElementsetTextID in interface IFormElementtextID - the plain TextID WITHOUT any form specification (e.g. ;long)Copyright © 2021. All rights reserved.