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

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


    NodeList frameList = maNoteElement.getElementsByTagNameNS(OdfDocumentNamespace.DRAW.getUri(), "frame");
    if(frameList.getLength() > 0){
      DrawFrameElement frame = (DrawFrameElement)frameList.item(0);
      NodeList textBoxList = frame.getElementsByTagNameNS(OdfDocumentNamespace.DRAW.getUri(), "text-box");
      if(textBoxList.getLength() > 0){
        DrawTextBoxElement textBox = (DrawTextBoxElement)textBoxList.item(0);
        TextPElement newPara = textBox.newTextPElement();
        newPara.setTextContent(text);
      }
    }
  }
View Full Code Here


    NodeList frameList = maNoteElement.getElementsByTagNameNS(OdfDocumentNamespace.DRAW.getUri(), "frame");
    if(frameList.getLength() > 0){
      DrawFrameElement frame = (DrawFrameElement)frameList.item(0);
      NodeList textBoxList = frame.getElementsByTagNameNS(OdfDocumentNamespace.DRAW.getUri(), "text-box");
      if(textBoxList.getLength() > 0){
        DrawTextBoxElement textBox = (DrawTextBoxElement)textBoxList.item(0);
        TextPElement newPara = textBox.newTextPElement();
        newPara.setTextContent(text);
      }
    }
  }
View Full Code Here

   * @see AbstractFrameContainer#getFrameByName(String)
   */
  public Textbox getTextboxByName(String name) {
    Frame frame = getFrameByName(name);
    if (frame != null) {
      DrawTextBoxElement boxElement = OdfElement.findFirstChildNode(DrawTextBoxElement.class, frame
          .getDrawFrameElement());
      if (boxElement != null) {
        Textbox box = Textbox.getInstanceof(boxElement);
        box.mFrameContainer = frame.mFrameContainer;
        return box;
View Full Code Here

      return null;

    ArrayList<Textbox> al = new ArrayList<Textbox>();
    for (int i = 0; i < frameList.size(); i++) {
      Frame frame = frameList.get(i);
      DrawTextBoxElement boxElement = OdfElement.findFirstChildNode(DrawTextBoxElement.class, frame
          .getDrawFrameElement());
      if (boxElement != null) {
        Textbox box = Textbox.getInstanceof(boxElement);
        box.mFrameContainer = frame.mFrameContainer;
        al.add(box);
View Full Code Here

      } else {
        nextFrame = OdfElement.findNextChildNode(DrawFrameElement.class, thisBox.getDrawFrameElement());
      }

      if (nextFrame != null) {
        DrawTextBoxElement nextbox = OdfElement.findFirstChildNode(DrawTextBoxElement.class, nextFrame);
        return Textbox.getInstanceof(nextbox);
      }
      return null;
    }
View Full Code Here

    Textbox textbox = null;
    OdfElement parent = container.getFrameContainerElement();
    OdfFileDom ownerDom = (OdfFileDom) parent.getOwnerDocument();
    DrawFrameElement fElement = ownerDom.newOdfElement(DrawFrameElement.class);
    parent.appendChild(fElement);
    DrawTextBoxElement boxElement = fElement.newDrawTextBoxElement();
    textbox = new Textbox(boxElement);
    textbox.mFrameContainer = container;
    Component.registerComponent(textbox, boxElement);

    // set text box default style
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);
View Full Code Here

    NodeList frameList = maNoteElement.getElementsByTagNameNS(OdfDocumentNamespace.DRAW.getUri(), "frame");
    if (frameList.getLength() > 0) {
      DrawFrameElement frame = (DrawFrameElement) frameList.item(0);
      NodeList textBoxList = frame.getElementsByTagNameNS(OdfDocumentNamespace.DRAW.getUri(), "text-box");
      if (textBoxList.getLength() > 0) {
        DrawTextBoxElement textBox = (DrawTextBoxElement) textBoxList.item(0);
        TextPElement newPara = textBox.newTextPElement();
        newPara.setTextContent(text);
      }
    }
  }
View Full Code Here

  private class ListContainerImpl extends AbstractListContainer {

    public OdfElement getListContainerElement() {
      DrawFrameElement frame = null;
      DrawTextBoxElement textBox = null;
      NodeList frameList = maNoteElement.getElementsByTagNameNS(OdfDocumentNamespace.DRAW.getUri(), "frame");
      if (frameList.getLength() <= 0) {
        frame = maNoteElement.newDrawFrameElement();
      } else {
        frame = (DrawFrameElement) frameList.item(frameList.getLength() - 1);
View Full Code Here

            // here can be captured resize options
            newElement = addImageBox(dframe, dstElement);
         //}

        } else if (e instanceof DrawTextBoxElement) {
            DrawTextBoxElement didascalia = (DrawTextBoxElement) e;
       

        } else if (e instanceof OdfDrawImage) {
            addImage((OdfDrawImage) e, dstElement);
View Full Code Here

TOP

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

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.