Examples of TextElement


Examples of org.jfree.report.TextElement

   */
  private void changeFontInElement(List eList) {
    for (int i = 0; i < eList.size(); i++) {
      Element e = (Element) eList.get(i);
      if (e != null && (e instanceof TextElement)) {
        TextElement tx = (TextElement) e;
        tx.getStyle().setFontDefinitionProperty(changeFontDef(tx.getStyle().getFontDefinitionProperty()));
      }
    }
  }//}}}
View Full Code Here

Examples of org.mybatis.generator.api.dom.xml.TextElement

    StringBuilder sb = new StringBuilder();
    sb.append("select * from "); //$NON-NLS-1$
    sb.append(introspectedTable
        .getAliasedFullyQualifiedTableNameAtRuntime());
    answer.addElement(new TextElement(sb.toString()));

    XmlElement whereElement = new XmlElement("where"); //$NON-NLS-1$
    for (IntrospectedColumn introspectedColumn : introspectedTable
        .getAllColumns())
    {
      XmlElement isNotNullElement = new XmlElement("if"); //$NON-NLS-1$
      sb.setLength(0);
      sb.append(introspectedColumn.getJavaProperty()); //$NON-NLS-1$
      sb.append(" != null"); //$NON-NLS-1$
      isNotNullElement.addAttribute(new Attribute("test", sb.toString())); //$NON-NLS-1$

      sb.setLength(0);
      sb.append("and ");
      sb.append(MyBatis3FormattingUtilities
          .getAliasedEscapedColumnName(introspectedColumn));
      sb.append(" = "); //$NON-NLS-1$
      sb.append(MyBatis3FormattingUtilities.getParameterClause(
          introspectedColumn, "")); //$NON-NLS-1$

      isNotNullElement.addElement(new TextElement(sb.toString()));

      whereElement.addElement(isNotNullElement);
    }
    answer.addElement(whereElement);

    parentElement.addElement(answer);

    // 生成selectCountByCriteria的sql映射
    parentElement = document.getRootElement();

    String fqjt = introspectedTable.getExampleType();
    answer = new XmlElement("select"); //$NON-NLS-1$
    answer
        .addAttribute(new Attribute(
            "id", "selectCount" + introspectedTable.getSelectByExampleStatementId().substring(6))); //$NON-NLS-1$
    answer.addAttribute(new Attribute("resultType", "long")); //$NON-NLS-1$
    answer.addAttribute(new Attribute("parameterType", fqjt)); //$NON-NLS-1$

    context.getCommentGenerator().addComment(answer);

    answer.addElement(new TextElement("select count(1) ")); //$NON-NLS-1$
    sb = new StringBuilder();
    sb.setLength(0);
    sb.append("from "); //$NON-NLS-1$
    sb.append(introspectedTable
        .getAliasedFullyQualifiedTableNameAtRuntime());
    answer.addElement(new TextElement(sb.toString()));
    answer.addElement(getExampleIncludeElement(introspectedTable));
    parentElement.addElement(answer);
    return true;
  }
View Full Code Here

Examples of org.olat.core.gui.components.form.flexible.elements.TextElement

    formLayout.add(ste);
    return ste;
  }
 
  public TextElement addInlineTextElement(String name, String value, FormItemContainer formLayout, FormBasicController listener) {
    TextElement ie = new TextElementImpl(name, value, TextElementImpl.HTML_INPUT_TYPE_TEXT, true);
    ie.addActionListener(listener, FormEvent.ONCLICK);
    if(listener != null){
      formLayout.add(ie);
    }
    return ie;
  }
View Full Code Here

Examples of org.olat.core.gui.components.form.flexible.elements.TextElement

   * @param formLayout
   * @return
   */
  public TextElement addTextElement(String name, final String i18nLabel, final int maxLen, String initialValue,
      FormItemContainer formLayout) {
    TextElement te = new TextElementImpl(name, initialValue);
    te.setNotLongerThanCheck(maxLen, "text.element.error.notlongerthan");
    setLabelIfNotNull(i18nLabel, te);
    te.setMaxLength(maxLen);
    formLayout.add(te);
    return te;
  }
View Full Code Here

Examples of org.olat.core.gui.components.form.flexible.elements.TextElement

    return te;
  }
 
  public TextElement addPasswordElement(String name, final String i18nLabel, final int maxLen, String initialValue,
      FormItemContainer formLayout) {
    TextElement te = new TextElementImpl(name, initialValue,
        TextElementImpl.HTML_INPUT_TYPE_PASSWORD);
    te.setNotLongerThanCheck(maxLen, "text.element.error.notlongerthan");
    setLabelIfNotNull(i18nLabel, te);
    te.setMaxLength(maxLen);
    formLayout.add(te);
    return te;
  }
View Full Code Here

Examples of org.olat.core.gui.components.form.flexible.elements.TextElement

   * @param formLayout
   * @return
   */
  public TextElement addTextAreaElement(String name, final String i18nLabel, final int maxLen, final int rows, final int cols, boolean isAutoHeightEnabled, String initialValue,
    FormItemContainer formLayout) {
    TextElement te = new TextAreaElementImpl(name, initialValue, rows, cols, isAutoHeightEnabled) {
      {
        setNotLongerThanCheck(maxLen, "text.element.error.notlongerthan");
        // the text.element.error.notlongerthan uses a variable {0} that
        // contains the length maxLen
      }
View Full Code Here

Examples of org.olat.core.gui.components.form.flexible.elements.TextElement

    hideItems.add(newVariant);
    // Rule 2: show variant when country is not empty
    FormItemDependencyRule showRule = new FormItemDependencyRuleImpl(newCountry, ".{2}", hideItems, FormItemDependencyRuleImpl.MAKE_VISIBLE) {
      @Override
      protected boolean doesTrigger() {
        TextElement te = (TextElement) this.triggerElement;
        String val = te.getValue();
        //
        if (val == null && triggerVal == null) {
          // triggerVal and val are NULL -> true
          return true;
        } else if (val != null) {
View Full Code Here

Examples of org.olat.core.gui.components.form.flexible.elements.TextElement

  /**
   * @see org.olat.core.gui.components.form.flexible.rules.FormItemDependencyRuleImpl#doesTrigger()
   */
  @Override
  protected boolean doesTrigger() {
    TextElement te = (TextElement)this.triggerElement;
    String val = te.getValue();
    //
    if(val == null && triggerVal == null){
      //triggerVal and val are NULL -> true
      return true;
    }else if(triggerVal != null){
View Full Code Here

Examples of org.olat.core.gui.components.form.flexible.elements.TextElement

    tmpLayout.contextPut("glossItemSynonyms", glossItemSynonymsToUse);

    // add input fields with existing synonyms
    synonymTextElementList = new ArrayList<TextElement>(glossItemSynonymsToUse.size());
    for (int synNum = 1; synNum < glossItemSynonymsToUse.size() + 1; synNum++) {
      TextElement tmpSynonymTE = formUIf.addTextElement(SYNONYM_TEXT_ELEMENT + synNum, null, 100, glossItemSynonymsToUse.get(synNum - 1), tmpLayout);
      synonymTextElementList.add(tmpSynonymTE);
    }

    // add delete-links for existing synonyms
    for (int linkNum = 1; linkNum < glossItemSynonymsToUse.size() + 1; linkNum++) {
View Full Code Here

Examples of org.olat.core.gui.components.form.flexible.elements.TextElement

      String propertyName = userPropertyHandler.getName();
      this.formItems.put(propertyName, formItem);
     
      if (formItem instanceof TextElement) {
        // it's a text field, so get the value of this property into the text field
        TextElement textElement = (TextElement)formItem;
        textElement.setValue(this.identity.getUser().getProperty(propertyName, getLocale()));
      } else if (formItem instanceof MultipleSelectionElement) {
        // it's a checkbox, so set the box to checked if the corresponding property is set to "true"
        MultipleSelectionElement checkbox = (MultipleSelectionElement)formItem;
        String value = this.identity.getUser().getProperty(propertyName, getLocale());
        if (value != null) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.