Package org.odftoolkit.odfdom.dom.element.text

Examples of org.odftoolkit.odfdom.dom.element.text.TextNumberElement


   * @param format
   *            the number format to be set.
   */
  public void setNumberFormat(String format) {
    if (getOwnerList().getType() == ListType.NUMBER) {
      TextNumberElement textNumberElement = null;
      Node child = listItemElement.getFirstChild();
      if (child == null) {
        textNumberElement = listItemElement.newTextNumberElement();
      } else {
        if (child instanceof TextNumberElement) {
          textNumberElement = (TextNumberElement) child;
        } else {
          textNumberElement = ((OdfFileDom) listItemElement.getOwnerDocument())
              .newOdfElement(TextNumberElement.class);
          listItemElement.insertBefore(textNumberElement, child);
        }
      }
      textNumberElement.setTextContent(format);
    }
  }
View Full Code Here

TOP

Related Classes of org.odftoolkit.odfdom.dom.element.text.TextNumberElement

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.