Examples of CTXf


Examples of org.openxmlformats.schemas.spreadsheetml.x2006.main.CTXf

    this.dxfs.add(dxf);
    return this.dxfs.size();
  }

  public XSSFCellStyle createCellStyle() {
    CTXf xf = CTXf.Factory.newInstance();
    xf.setNumFmtId(0);
    xf.setFontId(0);
    xf.setFillId(0);
    xf.setBorderId(0);
    xf.setXfId(0);
    int xfSize = styleXfs.size();
    int indexXf = putCellXf(xf);
    return new XSSFCellStyle(indexXf - 1, xfSize - 1, this);
  }
View Full Code Here

Examples of org.openxmlformats.schemas.spreadsheetml.x2006.main.CTXf

        assertNotNull(columnHelper.getColumn(3, false));
        columnHelper.setColDefaultStyle(3, 2);
        assertEquals(2, columnHelper.getColDefaultStyle(3));
        assertEquals(-1, columnHelper.getColDefaultStyle(4));
        StylesTable stylesTable = workbook.getStylesSource();
        CTXf cellXf = CTXf.Factory.newInstance();
        cellXf.setFontId(0);
        cellXf.setFillId(0);
        cellXf.setBorderId(0);
        cellXf.setNumFmtId(0);
        cellXf.setXfId(0);
        stylesTable.putCellXf(cellXf);
        CTCol col_2 = ctWorksheet.getColsArray(0).addNewCol();
        col_2.setMin(10);
        col_2.setMax(12);
        col_2.setStyle(1);
View Full Code Here

Examples of org.openxmlformats.schemas.spreadsheetml.x2006.main.CTXf

    }

    return new XSSFCellStyle(idx, styleXfId, this, theme);
  }
  public int putStyle(XSSFCellStyle style) {
    CTXf mainXF = style.getCoreXf();

    if(! xfs.contains(mainXF)) {
      xfs.add(mainXF);
    }
    return xfs.indexOf(mainXF);
View Full Code Here

Examples of org.openxmlformats.schemas.spreadsheetml.x2006.main.CTXf

    fills.add(new XSSFCellFill(ctFill[1]));

    CTBorder ctBorder = createDefaultBorder();
    borders.add(new XSSFCellBorder(ctBorder));

    CTXf styleXf = createDefaultXf();
    styleXfs.add(styleXf);
    CTXf xf = createDefaultXf();
    xf.setXfId(0);
    xfs.add(xf);
  }
View Full Code Here

Examples of org.openxmlformats.schemas.spreadsheetml.x2006.main.CTXf

    xf.setXfId(0);
    xfs.add(xf);
  }

  private static CTXf createDefaultXf() {
    CTXf ctXf = CTXf.Factory.newInstance();
    ctXf.setNumFmtId(0);
    ctXf.setFontId(0);
    ctXf.setFillId(0);
    ctXf.setBorderId(0);
    return ctXf;
  }
View Full Code Here

Examples of org.openxmlformats.schemas.spreadsheetml.x2006.main.CTXf

    this.dxfs.add(dxf);
    return this.dxfs.size();
  }

  public XSSFCellStyle createCellStyle() {
    CTXf xf = CTXf.Factory.newInstance();
    xf.setNumFmtId(0);
    xf.setFontId(0);
    xf.setFillId(0);
    xf.setBorderId(0);
    xf.setXfId(0);
    int xfSize = styleXfs.size();
    int indexXf = putCellXf(xf);
    return new XSSFCellStyle(indexXf - 1, xfSize - 1, this, theme);
  }
View Full Code Here

Examples of org.openxmlformats.schemas.spreadsheetml.x2006.main.CTXf

        assertNotNull(columnHelper.getColumn(3, false));
        columnHelper.setColDefaultStyle(3, 2);
        assertEquals(2, columnHelper.getColDefaultStyle(3));
        assertEquals(-1, columnHelper.getColDefaultStyle(4));
        StylesTable stylesTable = (StylesTable) workbook.getStylesSource();
        CTXf cellXf = CTXf.Factory.newInstance();
        cellXf.setFontId(0);
        cellXf.setFillId(0);
        cellXf.setBorderId(0);
        cellXf.setNumFmtId(0);
        cellXf.setXfId(0);
        stylesTable.putCellXf(cellXf);
        CTCol col_2 = ctWorksheet.getColsArray(0).addNewCol();
        col_2.setMin(10);
        col_2.setMax(12);
        col_2.setStyle(1);
View Full Code Here

Examples of org.openxmlformats.schemas.spreadsheetml.x2006.main.CTXf

      XSSFSheet sheet = new XSSFSheet(ctSheet, ctWorksheet, (XSSFWorkbook) workbook);
      StylesTable stylesTable = (StylesTable) workbook.getStylesSource();
      XSSFFont font = new XSSFFont();
      font.setFontName("Cambria");
      stylesTable.putFont(font);
      CTXf cellStyleXf = CTXf.Factory.newInstance();
      cellStyleXf.setFontId(1);
      cellStyleXf.setFillId(0);
      cellStyleXf.setBorderId(0);
      cellStyleXf.setNumFmtId(0);
      stylesTable.putCellStyleXf(cellStyleXf);
      CTXf cellXf = CTXf.Factory.newInstance();
      cellXf.setXfId(1);
      stylesTable.putCellXf(cellXf);
      XSSFCellStyle cellStyle = new XSSFCellStyle(1, 1, stylesTable);
      assertEquals(1, cellStyle.getFontIndex());
     
      sheet.setDefaultColumnStyle((short) 3, cellStyle);
View Full Code Here

Examples of org.openxmlformats.schemas.spreadsheetml.x2006.main.CTXf

     
    return new XSSFCellStyle((int) idx, styleXfId, this);
  }
    public synchronized long putStyle(CellStyle style) {
      XSSFCellStyle xStyle = (XSSFCellStyle)style;
      CTXf mainXF = xStyle.getCoreXf();
     
      if(! xfs.contains(mainXF)) {
        xfs.add(mainXF);
      }
    return xfs.indexOf(mainXF);
View Full Code Here

Examples of org.openxmlformats.schemas.spreadsheetml.x2006.main.CTXf

      fills.add(ctFill);
     
      CTBorder ctBorder = createDefaultBorder();
      borders.add(ctBorder);
     
      CTXf styleXf = createDefaultXf();
      styleXfs.add(styleXf);
      CTXf xf = createDefaultXf();
      xf.setXfId(0);
      xfs.add(xf);
  }
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.