Examples of DrawFrameElement


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

    // how to test?
    fcell.removeContent();
    Assert.assertEquals(0, fcell.mCellElement.getChildNodes().getLength());

    fcell.setDisplayText("hello");
    DrawFrameElement drawEle = new DrawFrameElement(odsdoc.getContentDom());
    drawEle.newDrawImageElement();
    fcell.mCellElement.appendChild(drawEle);

    Assert.assertEquals(2, fcell.mCellElement.getChildNodes().getLength());

    fcell.removeTextContent();
View Full Code Here

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

   */
  public BufferedImage getBufferedImage() {
    try {
      TextPElement pElement = OdfElement.findFirstChildNode(TextPElement.class, mCellElement);
      if (pElement != null) {
        DrawFrameElement drawFrame = OdfElement.findFirstChildNode(DrawFrameElement.class, pElement);
        if (drawFrame != null) {
          DrawImageElement imageElement = OdfElement.findFirstChildNode(DrawImageElement.class, drawFrame);
          if (imageElement != null) {
            String packagePath = imageElement.getXlinkHrefAttribute();
            OdfFileDom dom = (OdfFileDom) mCellElement.getOwnerDocument();
View Full Code Here

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

   */
  public Image getImage() {
    try {
      TextPElement pElement = OdfElement.findFirstChildNode(TextPElement.class, mCellElement);
      if (pElement != null) {
        DrawFrameElement drawFrame = OdfElement.findFirstChildNode(DrawFrameElement.class, pElement);
        if (drawFrame != null) {
          DrawImageElement imageElement = OdfElement.findFirstChildNode(DrawImageElement.class, drawFrame);
          return Image.getInstanceof(imageElement);
        }
      } else {
        DrawFrameElement drawFrame = OdfElement.findFirstChildNode(DrawFrameElement.class, mCellElement);
        if (drawFrame != null) {
          DrawImageElement imageElement = OdfElement.findFirstChildNode(DrawImageElement.class, drawFrame);
          return Image.getInstanceof(imageElement);
        }
      }
View Full Code Here

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

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

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

   * @param text  the text that need to insert in the notes page
   */
  public void addText(String text){
    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

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

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

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

   * @param text  the text that need to insert in the notes page
   */
  public void addText(String text){
    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

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
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.