Examples of MetaPrintDateElement


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

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

   * 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

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

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

   * 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

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

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

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

   *
   * @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

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

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