Package org.odftoolkit.odfdom.dom.element.meta

Examples of org.odftoolkit.odfdom.dom.element.meta.MetaPrintDateElement


   * @return the date and time when the document was last printed;
   * <p>
   * <code>null</code>, if the element is not set.
   */
  public Calendar getPrintDate() {
    MetaPrintDateElement printDateEle = OdfElement.findFirstChildNode(
        MetaPrintDateElement.class, mOfficeMetaElement);
    if (printDateEle != null) {
      return stringToCalendar(printDateEle.getTextContent());
    }
    return null;
  }
View Full Code Here


   * meta:print-date}.
   *
   * @param printDate  the date and time need to set. NULL will remove the element from the meta.xml.
   */
  public void setPrintDate(Calendar printDate) {
    MetaPrintDateElement printDateEle = OdfElement.findFirstChildNode(
        MetaPrintDateElement.class, mOfficeMetaElement);
    if (printDate == null) {
      if (printDateEle != null) {
        mOfficeMetaElement.removeChild(printDateEle);
      }
    } else {
      if (printDateEle == null) {
        printDateEle = mOfficeMetaElement.newMetaPrintDateElement();
      }
      printDateEle.setTextContent(calendarToString(printDate));
    }
  }
View Full Code Here

   * @return the date and time when the document was last printed;
   * <p>
   * <code>null</code>, if the element is not set.
   */
  public Calendar getPrintDate() {
    MetaPrintDateElement printDateEle = OdfElement.findFirstChildNode(
        MetaPrintDateElement.class, mOfficeMetaElement);
    if (printDateEle != null) {
      return stringToCalendar(printDateEle.getTextContent());
    }
    return null;
  }
View Full Code Here

   * meta:print-date}.
   *
   * @param printDate  the date and time need to set. NULL will remove the element from the meta.xml.
   */
  public void setPrintDate(Calendar printDate) {
    MetaPrintDateElement printDateEle = OdfElement.findFirstChildNode(
        MetaPrintDateElement.class, mOfficeMetaElement);
    if (printDate == null) {
      if (printDateEle != null) {
        mOfficeMetaElement.removeChild(printDateEle);
      }
    } else {
      if (printDateEle == null) {
        printDateEle = mOfficeMetaElement.newMetaPrintDateElement();
      }
      printDateEle.setTextContent(calendarToString(printDate));
    }
  }
View Full Code Here

   * <p>
   * <code>null</code>, if the element is not set.
   * @see org.odftoolkit.odfdom.dom.element.meta.MetaPrintDateElement
   */
  public Calendar getPrintDate() {
    MetaPrintDateElement printDateEle = OdfElement.findFirstChildNode(
        MetaPrintDateElement.class, mOfficeMetaElement);
    if (printDateEle != null) {
      return stringToCalendar(printDateEle.getTextContent());
    }
    return null;
  }
View Full Code Here

   *
   * @param printDate  the date and time need to set
   * @see org.odftoolkit.odfdom.dom.element.meta.MetaPrintDateElement
   */
  public void setPrintDate(Calendar printDate) {
    MetaPrintDateElement printDateEle = OdfElement.findFirstChildNode(
        MetaPrintDateElement.class, mOfficeMetaElement);
    if (printDateEle == null) {
      printDateEle = mOfficeMetaElement.newMetaPrintDateElement();
    }
    printDateEle.setTextContent(calendarToString(printDate));
  }
View Full Code Here

   * Child element is new in Odf 1.2
   *
   * @return the element {@odf.element meta:print-date}
   */
  public MetaPrintDateElement newMetaPrintDateElement() {
    MetaPrintDateElement metaPrintDate = ((OdfFileDom) this.ownerDocument).newOdfElement(MetaPrintDateElement.class);
    this.appendChild(metaPrintDate);
    return metaPrintDate;
  }
View Full Code Here

TOP

Related Classes of org.odftoolkit.odfdom.dom.element.meta.MetaPrintDateElement

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.