Examples of TextSectionElement


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

   * The sections defined in embed document won't be covered.
   *
   * @return an iterator of Section objects
   */
  public Iterator<Section> getSectionIterator() {
    TextSectionElement element;
    ArrayList<Section> list = new ArrayList<Section>();
    try {
      // search in content.xml
      OdfElement root = getContentDom().getRootElement();
      OfficeBodyElement officeBody = OdfElement.findFirstChildNode(OfficeBodyElement.class, root);
View Full Code Here

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

   * @param name
   *            - the name of a section
   * @return a section object with a specific name
   */
  public Section getSectionByName(String name) {
    TextSectionElement element;
    try {
      OdfElement root = getContentDom().getRootElement();
      OfficeBodyElement officeBody = OdfElement.findFirstChildNode(OfficeBodyElement.class, root);
      XPath xpath = getContentDom().getXPath();
      String xpathValue = ".//text:section[@text:name=\"" + name + "\"]";
View Full Code Here

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

  public Section appendSection(Section section, boolean isResourceCopied) {
    boolean isForeignNode = false;
    try {
      if (section.getOdfElement().getOwnerDocument() != getContentDom())
        isForeignNode = true;
      TextSectionElement oldSectionEle = section.getOdfElement();
      TextSectionElement newSectionEle = (TextSectionElement) oldSectionEle.cloneNode(true);

      if (isResourceCopied || isForeignNode)
        copyLinkedRefInBatch(newSectionEle, section.getOwnerDocument());
      if (isForeignNode)
        copyForeignStyleRef(newSectionEle, section.getOwnerDocument());
View Full Code Here

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

   * @param textDisplayValue  the <code>String</code> value of <code>TextDisplayAttribute</code>, see {@odf.attribute  text:display} at specification
   * @param textNameValue  the <code>String</code> value of <code>TextNameAttribute</code>, see {@odf.attribute  text:name} at specification
   * @return the element {@odf.element text:section}
   */
   public TextSectionElement newTextSectionElement(String textDisplayValue, String textNameValue) {
    TextSectionElement textSection = ((OdfFileDom) this.ownerDocument).newOdfElement(TextSectionElement.class);
    textSection.setTextDisplayAttribute(textDisplayValue);
    textSection.setTextNameAttribute(textNameValue);
    this.appendChild(textSection);
    return textSection;
  }
View Full Code Here

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

   * @param textDisplayValue  the <code>String</code> value of <code>TextDisplayAttribute</code>, see {@odf.attribute  text:display} at specification
   * @param textNameValue  the <code>String</code> value of <code>TextNameAttribute</code>, see {@odf.attribute  text:name} at specification
   * @return the element {@odf.element text:section}
   */
   public TextSectionElement newTextSectionElement(String textDisplayValue, String textNameValue) {
    TextSectionElement textSection = ((OdfFileDom) this.ownerDocument).newOdfElement(TextSectionElement.class);
    textSection.setTextDisplayAttribute(textDisplayValue);
    textSection.setTextNameAttribute(textNameValue);
    this.appendChild(textSection);
    return textSection;
  }
View Full Code Here

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

   * @param textDisplayValue  the <code>String</code> value of <code>TextDisplayAttribute</code>, see {@odf.attribute  text:display} at specification
   * @param textNameValue  the <code>String</code> value of <code>TextNameAttribute</code>, see {@odf.attribute  text:name} at specification
   * @return the element {@odf.element text:section}
   */
   public TextSectionElement newTextSectionElement(String textDisplayValue, String textNameValue) {
    TextSectionElement textSection = ((OdfFileDom) this.ownerDocument).newOdfElement(TextSectionElement.class);
    textSection.setTextDisplayAttribute(textDisplayValue);
    textSection.setTextNameAttribute(textNameValue);
    this.appendChild(textSection);
    return textSection;
  }
View Full Code Here

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

   * @param textDisplayValue  the <code>String</code> value of <code>TextDisplayAttribute</code>, see {@odf.attribute  text:display} at specification
   * @param textNameValue  the <code>String</code> value of <code>TextNameAttribute</code>, see {@odf.attribute  text:name} at specification
   * @return the element {@odf.element text:section}
   */
   public TextSectionElement newTextSectionElement(String textDisplayValue, String textNameValue) {
    TextSectionElement textSection = ((OdfFileDom) this.ownerDocument).newOdfElement(TextSectionElement.class);
    textSection.setTextDisplayAttribute(textDisplayValue);
    textSection.setTextNameAttribute(textNameValue);
    this.appendChild(textSection);
    return textSection;
  }
View Full Code Here

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

   * @param textDisplayValue  the <code>String</code> value of <code>TextDisplayAttribute</code>, see {@odf.attribute  text:display} at specification
   * @param textNameValue  the <code>String</code> value of <code>TextNameAttribute</code>, see {@odf.attribute  text:name} at specification
   * @return the element {@odf.element text:section}
   */
   public TextSectionElement newTextSectionElement(String textDisplayValue, String textNameValue) {
    TextSectionElement textSection = ((OdfFileDom) this.ownerDocument).newOdfElement(TextSectionElement.class);
    textSection.setTextDisplayAttribute(textDisplayValue);
    textSection.setTextNameAttribute(textNameValue);
    this.appendChild(textSection);
    return textSection;
  }
View Full Code Here

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

   * @return an instance of the section
   * @throws RuntimeException
   *             if content DOM could not be initialized
   */
  public Section appendSection(String name) {
    TextSectionElement newSectionEle = null;
    try {
      Document doc = (Document) ((OdfFileDom) footerEle
          .getOwnerDocument()).getDocument();
      OdfContentDom contentDocument = doc.getContentDom();
      OdfOfficeAutomaticStyles styles = contentDocument
          .getAutomaticStyles();
      OdfStyle style = styles.newStyle(OdfStyleFamily.Section);
      StyleSectionPropertiesElement sProperties = style
          .newStyleSectionPropertiesElement();
      sProperties.setTextDontBalanceTextColumnsAttribute(false);
      sProperties.setStyleEditableAttribute(false);
      StyleColumnsElement columnEle = sProperties
          .newStyleColumnsElement(1);
      columnEle.setFoColumnGapAttribute("0in");

      newSectionEle = footerEle.newTextSectionElement("true", name);
      newSectionEle.setStyleName(style.getStyleNameAttribute());
      return Section.getInstance(newSectionEle);

    } catch (Exception e) {
      Logger.getLogger(TextDocument.class.getName()).log(Level.SEVERE,
          null, e);
View Full Code Here

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

   * @param textDisplayValue  the <code>String</code> value of <code>TextDisplayAttribute</code>, see {@odf.attribute  text:display} at specification
   * @param textNameValue  the <code>String</code> value of <code>TextNameAttribute</code>, see {@odf.attribute  text:name} at specification
   * @return the element {@odf.element text:section}
   */
   public TextSectionElement newTextSectionElement(String textDisplayValue, String textNameValue) {
    TextSectionElement textSection = ((OdfFileDom) this.ownerDocument).newOdfElement(TextSectionElement.class);
    textSection.setTextDisplayAttribute(textDisplayValue);
    textSection.setTextNameAttribute(textNameValue);
    this.appendChild(textSection);
    return textSection;
  }
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.