Examples of newStyle()


Examples of org.odftoolkit.odfdom.incubator.doc.office.OdfOfficeAutomaticStyles.newStyle()

    if (dom instanceof OdfContentDom) {
      styles = ((OdfContentDom) dom).getAutomaticStyles();
    } else if (dom instanceof OdfStylesDom) {
      styles = ((OdfStylesDom) dom).getAutomaticStyles();
    }
    OdfStyle textStyle = styles.newStyle(OdfStyleFamily.Text);
    StyleTextPropertiesElement styleTextPropertiesElement = textStyle.newStyleTextPropertiesElement(null);
    styleTextPropertiesElement.setStyleFontNameAttribute("Tahoma");
    styleTextPropertiesElement.setFoFontSizeAttribute("10pt");
    styleTextPropertiesElement.setStyleFontNameAsianAttribute("Lucida Sans Unicode");
    styleTextPropertiesElement.setStyleFontSizeAsianAttribute("12pt");
View Full Code Here

Examples of org.odftoolkit.odfdom.incubator.doc.office.OdfOfficeAutomaticStyles.newStyle()

      OdfNumberStyle numberStyle = new OdfNumberStyle(contentDom, "#0.00", "numberTemperatureStyle");

      contentAutoStyles.appendChild(dateStyle);
      contentAutoStyles.appendChild(numberStyle);

      style = contentAutoStyles.newStyle(OdfStyleFamily.TableCell);
      noaaDateStyleName = style.getStyleNameAttribute();
      style.setStyleDataStyleNameAttribute("numberDateStyle");

      // and for time cells
      style = contentAutoStyles.newStyle(OdfStyleFamily.TableCell);
View Full Code Here

Examples of org.odftoolkit.odfdom.incubator.doc.office.OdfOfficeAutomaticStyles.newStyle()

      style = contentAutoStyles.newStyle(OdfStyleFamily.TableCell);
      noaaDateStyleName = style.getStyleNameAttribute();
      style.setStyleDataStyleNameAttribute("numberDateStyle");

      // and for time cells
      style = contentAutoStyles.newStyle(OdfStyleFamily.TableCell);
      noaaTempStyleName = style.getStyleNameAttribute();
      style.setStyleDataStyleNameAttribute("numberTemperatureStyle");
      style.setProperty(StyleParagraphPropertiesElement.TextAlign, "end");

      Table table = Table.newTable(outputDocument);
View Full Code Here

Examples of org.odftoolkit.odfdom.incubator.doc.office.OdfOfficeAutomaticStyles.newStyle()

    TableTableElement newTEle = (TableTableElement) OdfXMLFactory.newOdfElement(dom, OdfName.newName(
        OdfDocumentNamespace.TABLE, "table"));
    String tablename = getUniqueTableName(container);
    newTEle.setTableNameAttribute(tablename);
    // create style
    OdfStyle tableStyle = styles.newStyle(OdfStyleFamily.Table);
    String stylename = tableStyle.getStyleNameAttribute();
    tableStyle.setProperty(StyleTablePropertiesElement.Width, tableWidth + "in");
    tableStyle.setProperty(StyleTablePropertiesElement.Align, DEFAULT_TABLE_ALIGN);
    if (marginLeft != 0) {
      tableStyle.setProperty(StyleTablePropertiesElement.MarginLeft, (new DecimalFormat("#0.##")
View Full Code Here

Examples of org.odftoolkit.odfdom.incubator.doc.office.OdfOfficeAutomaticStyles.newStyle()

    }
    newTEle.setStyleName(stylename);

    // 2. create column elements
    // 2.0 create column style
    OdfStyle columnStyle = styles.newStyle(OdfStyleFamily.TableColumn);
    String columnStylename = columnStyle.getStyleNameAttribute();
    // for spreadsheet document, no need compute column width.
    if (isTextDocument) {
      columnStyle.setProperty(StyleTableColumnPropertiesElement.ColumnWidth, IN_FORMAT.format(tableWidth
          / numCols)
View Full Code Here

Examples of org.odftoolkit.odfdom.incubator.doc.office.OdfOfficeAutomaticStyles.newStyle()

    // 3. create row elements
    // 3.0 create 4 kinds of styles
    OdfStyle lefttopStyle = null, leftbottomStyle = null, righttopStyle = null, rightbottomStyle = null;

    if (isTextDocument) {
      lefttopStyle = styles.newStyle(OdfStyleFamily.TableCell);
      setLeftTopBorderStyleProperties(lefttopStyle);

      leftbottomStyle = styles.newStyle(OdfStyleFamily.TableCell);
      setLeftBottomBorderStylesProperties(leftbottomStyle);
View Full Code Here

Examples of org.odftoolkit.odfdom.incubator.doc.office.OdfOfficeAutomaticStyles.newStyle()

    if (isTextDocument) {
      lefttopStyle = styles.newStyle(OdfStyleFamily.TableCell);
      setLeftTopBorderStyleProperties(lefttopStyle);

      leftbottomStyle = styles.newStyle(OdfStyleFamily.TableCell);
      setLeftBottomBorderStylesProperties(leftbottomStyle);

      righttopStyle = styles.newStyle(OdfStyleFamily.TableCell);
      setRightTopBorderStyleProperties(righttopStyle);
View Full Code Here

Examples of org.odftoolkit.odfdom.incubator.doc.office.OdfOfficeAutomaticStyles.newStyle()

      setLeftTopBorderStyleProperties(lefttopStyle);

      leftbottomStyle = styles.newStyle(OdfStyleFamily.TableCell);
      setLeftBottomBorderStylesProperties(leftbottomStyle);

      righttopStyle = styles.newStyle(OdfStyleFamily.TableCell);
      setRightTopBorderStyleProperties(righttopStyle);

      rightbottomStyle = styles.newStyle(OdfStyleFamily.TableCell);
      setRightBottomBorderStylesProperties(rightbottomStyle);
    }
View Full Code Here

Examples of org.odftoolkit.odfdom.incubator.doc.office.OdfOfficeAutomaticStyles.newStyle()

      setLeftBottomBorderStylesProperties(leftbottomStyle);

      righttopStyle = styles.newStyle(OdfStyleFamily.TableCell);
      setRightTopBorderStyleProperties(righttopStyle);

      rightbottomStyle = styles.newStyle(OdfStyleFamily.TableCell);
      setRightBottomBorderStylesProperties(rightbottomStyle);
    }

    // 3.1 create header row elements
    if (headerRowNumber > 0) {
View Full Code Here

Examples of org.odftoolkit.odfdom.incubator.doc.office.OdfOfficeAutomaticStyles.newStyle()

      if (columnCount > 1) {
        aCell.setTableNumberColumnsRepeatedAttribute(columnCount);
      }
      if (!mIsSpreadsheet) {
        OdfOfficeAutomaticStyles automaticStyles = mTableElement.getAutomaticStyles();
        OdfStyle borderStyle = automaticStyles.newStyle(OdfStyleFamily.TableCell);
        setRightTopBorderStyleProperties(borderStyle);
        aCell.setStyleName(borderStyle.getStyleNameAttribute());
      }
      aRow.appendChild(aCell);
    } else {
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.