Package org.odftoolkit.odfdom.dom.element.draw

Examples of org.odftoolkit.odfdom.dom.element.draw.DrawFrameElement


   * Create child element {@odf.element draw:frame}.
   *
   * @return the element {@odf.element draw:frame}
   */
  public DrawFrameElement newDrawFrameElement() {
    DrawFrameElement drawFrame = ((OdfFileDom) this.ownerDocument).newOdfElement(DrawFrameElement.class);
    this.appendChild(drawFrame);
    return drawFrame;
  }
View Full Code Here


  }

  private class ListContainerImpl extends AbstractListContainer {

    public OdfElement getListContainerElement() {
      DrawFrameElement frame = null;
      DrawTextBoxElement textBox = null;
      NodeList frameList = maSlideElement.getElementsByTagNameNS(OdfDocumentNamespace.DRAW.getUri(), "frame");
      if (frameList.getLength() > 0) {
        int index = frameList.getLength() - 1;
        while (index >= 0) {
          frame = (DrawFrameElement) frameList.item(index);
          String presentationClass = frame.getPresentationClassAttribute();
          if (presentationClass == null || "outline".equals(presentationClass)
              || "text".equals(presentationClass) || "subtitle".equals(presentationClass)) {
            break;
          } else {
            index--;
          }
          frame = null;
        }
      }
      if (frame == null) {
        throw new UnsupportedOperationException(
            "There is no list container in this slide, please chose a proper slide layout.");
      }
      NodeList textBoxList = frame.getElementsByTagNameNS(OdfDocumentNamespace.DRAW.getUri(), "text-box");
      if (textBoxList.getLength() <= 0) {
        textBox = frame.newDrawTextBoxElement();
      } else {
        textBox = (DrawTextBoxElement) textBoxList.item(textBoxList.getLength() - 1);
      }
      return textBox;
    }
View Full Code Here

TOP

Related Classes of org.odftoolkit.odfdom.dom.element.draw.DrawFrameElement

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.