Examples of newStyle()


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());
      }
    } else {
      OdfStyle lefttopStyle = null, righttopStyle = null;
View Full Code Here

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

    } else {
      OdfStyle lefttopStyle = null, righttopStyle = null;
      // create 2 kinds of styles
      if (!mIsSpreadsheet) {
        OdfOfficeAutomaticStyles automaticStyles = mTableElement.getAutomaticStyles();
        lefttopStyle = automaticStyles.newStyle(OdfStyleFamily.TableCell);
        setLeftTopBorderStyleProperties(lefttopStyle);
        righttopStyle = automaticStyles.newStyle(OdfStyleFamily.TableCell);
        setRightTopBorderStyleProperties(righttopStyle);
      }
      for (int j = 0; j < columnCount; j++) {
View Full Code Here

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

      // create 2 kinds of styles
      if (!mIsSpreadsheet) {
        OdfOfficeAutomaticStyles automaticStyles = mTableElement.getAutomaticStyles();
        lefttopStyle = automaticStyles.newStyle(OdfStyleFamily.TableCell);
        setLeftTopBorderStyleProperties(lefttopStyle);
        righttopStyle = automaticStyles.newStyle(OdfStyleFamily.TableCell);
        setRightTopBorderStyleProperties(righttopStyle);
      }
      for (int j = 0; j < columnCount; j++) {
        TableTableCellElement aCell = (TableTableCellElement) OdfXMLFactory.newOdfElement(dom, OdfName.newName(
            OdfDocumentNamespace.TABLE, "table-cell"));
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
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.