Examples of OdfNumberTimeStyle


Examples of org.odftoolkit.odfdom.incubator.doc.number.OdfNumberTimeStyle

      dateStyle.setNumberLanguageAttribute("en");
      dateStyle.setNumberCountryAttribute("US");
      mElement.getAutomaticStyles().appendChild(dateStyle);
      setDataDisplayStyleName(dateStyle.getStyleNameAttribute());
    } else if (typeValue == OfficeValueTypeAttribute.Value.TIME) {
      OdfNumberTimeStyle timeStyle = new OdfNumberTimeStyle(
          (OdfFileDom) mElement.getOwnerDocument(), formatStr,
          getUniqueDateStyleName());
      mElement.getAutomaticStyles().appendChild(timeStyle);
      setDataDisplayStyleName(timeStyle.getStyleNameAttribute());
    } else if (typeValue == OfficeValueTypeAttribute.Value.PERCENTAGE) {
      OdfNumberPercentageStyle dateStyle = new OdfNumberPercentageStyle(
          (OdfFileDom) mElement.getOwnerDocument(), formatStr,
          getUniquePercentageStyleName());
      mElement.getAutomaticStyles().appendChild(dateStyle);
View Full Code Here

Examples of org.odftoolkit.odfdom.incubator.doc.number.OdfNumberTimeStyle

    if (dom instanceof OdfContentDom) {
      styles = ((OdfContentDom) dom).getAutomaticStyles();
    } else if (dom instanceof OdfStylesDom) {
      styles = ((OdfStylesDom) dom).getAutomaticStyles();
    }
    OdfNumberTimeStyle newStyle = dom.newOdfElement(OdfNumberTimeStyle.class);
    newStyle.setStyleNameAttribute(newUniqueStyleName(styles));
    styles.appendChild(newStyle);
    return newStyle;
  }
View Full Code Here

Examples of org.odftoolkit.odfdom.incubator.doc.number.OdfNumberTimeStyle

    if (drawingShape == null)
      throw new IllegalStateException(
          "Please call loadDrawControl() first.");
    DrawControlElement element = drawingShape.getOdfElement();
    String name = getUniqueTimeStyleName();
    OdfNumberTimeStyle timeStyle = new OdfNumberTimeStyle(
        (OdfFileDom) element.getOwnerDocument(), formatStr, name);
    timeStyle.setNumberLanguageAttribute(locale.getLanguage());
    timeStyle.setNumberCountryAttribute(locale.getCountry());
    element.getAutomaticStyles().appendChild(timeStyle);
    OdfStyleBase styleElement = drawingShape.getStyleHandler()
        .getStyleElementForWrite();
    if (styleElement != null) {
      styleElement.setOdfAttributeValue(OdfName.newName(
View Full Code Here

Examples of org.odftoolkit.odfdom.incubator.doc.number.OdfNumberTimeStyle

      if (dateStr != null) {
        Calendar date = getDateValue();
        setDisplayText((new SimpleDateFormat(formatStr)).format(date.getTime()));
      }
    } else if (typeValue == OfficeValueTypeAttribute.Value.TIME) {
      OdfNumberTimeStyle timeStyle = new OdfNumberTimeStyle(
          (OdfFileDom) mCellElement.getOwnerDocument(), formatStr,
          getUniqueDateStyleName());
      mCellElement.getAutomaticStyles().appendChild(timeStyle);
      setDataDisplayStyleName(timeStyle.getStyleNameAttribute());
      String timeStr = mCellElement.getOfficeTimeValueAttribute();
      if (timeStr != null) {
        Calendar time = getTimeValue();
        setDisplayText((new SimpleDateFormat(formatStr)).format(time.getTime()));
      }
View Full Code Here

Examples of org.odftoolkit.odfdom.incubator.doc.number.OdfNumberTimeStyle

      dateStyle.setNumberCountryAttribute(locale.getCountry());
      drawingShape.getOdfElement().getAutomaticStyles().appendChild(
          dateStyle);
      setDataDisplayStyleName(dateStyle.getStyleNameAttribute());
    } else if (type == OfficeValueTypeAttribute.Value.TIME) {
      OdfNumberTimeStyle timeStyle = new OdfNumberTimeStyle(
          (OdfFileDom) mElement.getOwnerDocument(), formatStr,
          getUniqueDateStyleName());
      timeStyle.setNumberLanguageAttribute(locale.getLanguage());
      timeStyle.setNumberCountryAttribute(locale.getCountry());
      drawingShape.getOdfElement().getAutomaticStyles().appendChild(
          timeStyle);
      setDataDisplayStyleName(timeStyle.getStyleNameAttribute());
    } else if (type == OfficeValueTypeAttribute.Value.PERCENTAGE) {
      OdfNumberPercentageStyle dateStyle = new OdfNumberPercentageStyle(
          (OdfFileDom) mElement.getOwnerDocument(), formatStr,
          getUniquePercentageStyleName());
      dateStyle.setNumberLanguageAttribute(locale.getLanguage());
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.