Package org.odftoolkit.odfdom.dom.element.form

Examples of org.odftoolkit.odfdom.dom.element.form.FormPropertiesElement


  protected void setFormProperty(String formPropertyName,
      String officeValueType, String officeStringValue,
      Boolean officeBooleanValue, String officeDateValue,
      String officeTimeValue, Double officeValue, String officeCurrency) {
    FormPropertiesElement parentEle = getFormPropertiesElementForWrite();

    // find the existing property with the appointed form property name
    NodeList properties = parentEle.getChildNodes();
    FormPropertyElement formProperty = null;
    for (int i = 0; i < properties.getLength(); i++) {
      FormPropertyElement property = (FormPropertyElement) properties
          .item(i);
      if (property.getFormPropertyNameAttribute()
          .equals(formPropertyName)) {
        formProperty = (FormPropertyElement) properties.item(i);
        break;
      }
    }
    // create a new property
    if (formProperty == null) {
      org.w3c.dom.Document ownerDocument = parentEle.getOwnerDocument();
      formProperty = ((OdfFileDom) ownerDocument)
          .newOdfElement(FormPropertyElement.class);
      formProperty.setFormPropertyNameAttribute(formPropertyName);
      formProperty.setOfficeValueTypeAttribute(officeValueType);
    }
View Full Code Here

TOP

Related Classes of org.odftoolkit.odfdom.dom.element.form.FormPropertiesElement

Copyright © 2018 www.massapicom. 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.