/**
   * Attempts to return question text for this element. Will check for text in the following order:
   * <br>
   * Localized Text (long form) -> Localized Text (no special form) <br>
   * If no textID is specified, method will return THIS element's labelInnerText.
   *
   * @param textID - The textID of the text you're trying to retrieve. if <code>textID == null
   *     </code> will get LabelInnerText for current element
   * @return Question Text. <code>null</code> if no text for this element exists (after all
   *     fallbacks).
   * @throws RunTimeException if this method is called on an element that is NOT a QuestionDef
   */
  public String getQuestionText(String textID) {
    String tid = textID;
    if (tid == "") tid = null; // to make things look clean

    // check for the null id case and return labelInnerText if it is so.
    if (tid == null) return substituteStringArgs(element.getLabelInnerText());

    // otherwise check for 'long' form of the textID, then for the default form and return
    String returnText;
    returnText = getIText(tid, "long");
    if (returnText == null) returnText = getIText(tid, null);

    return substituteStringArgs(returnText);
  }
 public void unregister() {
   this.viewWidget = null;
   element.unregisterStateObserver(this);
 }
 public void register(IQuestionWidget viewWidget) {
   this.viewWidget = viewWidget;
   element.registerStateObserver(this);
 }
 public String getAppearanceHint() {
   return element.getAppearanceAttr();
 }