Package org.openxmlformats.schemas.spreadsheetml.x2006.main

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


    CTFill[] ctFill = createDefaultFills();
    fills.add(new XSSFCellFill(ctFill[0]));
    fills.add(new XSSFCellFill(ctFill[1]));

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

    CTXf styleXf = createDefaultXf();
    styleXfs.add(styleXf);
    CTXf xf = createDefaultXf();
View Full Code Here


    ctXf.setFillId(0);
    ctXf.setBorderId(0);
    return ctXf;
  }
  private static CTBorder createDefaultBorder() {
    CTBorder ctBorder = CTBorder.Factory.newInstance();
    ctBorder.addNewBottom();
    ctBorder.addNewTop();
    ctBorder.addNewLeft();
    ctBorder.addNewRight();
    ctBorder.addNewDiagonal();
    return ctBorder;
  }
View Full Code Here

     */
    public short getBorderBottom() {
        if(!_cellXf.getApplyBorder()) return BORDER_NONE;

        int idx = (int)_cellXf.getBorderId();
        CTBorder ct = _stylesSource.getBorderAt(idx).getCTBorder();
        STBorderStyle.Enum ptrn = ct.isSetBottom() ? ct.getBottom().getStyle() : null;
        return ptrn == null ? BORDER_NONE : (short)(ptrn.intValue() - 1);
    }
View Full Code Here

     */
    public short getBorderLeft() {
        if(!_cellXf.getApplyBorder()) return BORDER_NONE;

        int idx = (int)_cellXf.getBorderId();
        CTBorder ct = _stylesSource.getBorderAt(idx).getCTBorder();
        STBorderStyle.Enum ptrn = ct.isSetLeft() ? ct.getLeft().getStyle() : null;
        return ptrn == null ? BORDER_NONE : (short)(ptrn.intValue() - 1);
    }
View Full Code Here

                for (CTFill fill : ctfills.getFillArray()) {
                    fills.add(new XSSFCellFill(fill));
                }
            }

            CTBorders ctborders = styleSheet.getBorders();
            if(ctborders != null) {
                for (CTBorder border : ctborders.getBorderArray()) {
                    borders.add(new XSSFCellBorder(border));
                }
            }

            CTCellXfs cellXfs = styleSheet.getCellXfs();
View Full Code Here

    for(XSSFCellFill f : fills) ctf[idx++] = f.getCTFill();
    ctFills.setFillArray(ctf);
    styleSheet.setFills(ctFills);

    // Borders
    CTBorders ctBorders = CTBorders.Factory.newInstance();
    ctBorders.setCount(borders.size());
    CTBorder[] ctb = new CTBorder[borders.size()];
    idx = 0;
    for(XSSFCellBorder b : borders) ctb[idx++] = b.getCTBorder();
    ctBorders.setBorderArray(ctb);
    styleSheet.setBorders(ctBorders);

    // Xfs
    if(xfs.size() > 0) {
      CTCellXfs ctXfs = CTCellXfs.Factory.newInstance();
View Full Code Here

            }

            CTCellXfs cellXfs = styleSheet.getCellXfs();
            if(cellXfs != null) xfs.addAll(Arrays.asList(cellXfs.getXfArray()));

            CTCellStyleXfs cellStyleXfs = styleSheet.getCellStyleXfs();
            if(cellStyleXfs != null) styleXfs.addAll(Arrays.asList(cellStyleXfs.getXfArray()));

            CTDxfs styleDxfs = styleSheet.getDxfs();
      if(styleDxfs != null) dxfs.addAll(Arrays.asList(styleDxfs.getDxfArray()));

    } catch (XmlException e) {
View Full Code Here

      styleSheet.setCellXfs(ctXfs);
    }

    // Style xfs
    if(styleXfs.size() > 0) {
      CTCellStyleXfs ctSXfs = CTCellStyleXfs.Factory.newInstance();
      ctSXfs.setCount(styleXfs.size());
      ctSXfs.setXfArray(
          styleXfs.toArray(new CTXf[styleXfs.size()])
      );
      styleSheet.setCellStyleXfs(ctSXfs);
    }
View Full Code Here

                for (CTBorder border : ctborders.getBorderArray()) {
                    borders.add(new XSSFCellBorder(border));
                }
            }

            CTCellXfs cellXfs = styleSheet.getCellXfs();
            if(cellXfs != null) xfs.addAll(Arrays.asList(cellXfs.getXfArray()));

            CTCellStyleXfs cellStyleXfs = styleSheet.getCellStyleXfs();
            if(cellStyleXfs != null) styleXfs.addAll(Arrays.asList(cellStyleXfs.getXfArray()));

            CTDxfs styleDxfs = styleSheet.getDxfs();
View Full Code Here

    ctBorders.setBorderArray(ctb);
    styleSheet.setBorders(ctBorders);

    // Xfs
    if(xfs.size() > 0) {
      CTCellXfs ctXfs = CTCellXfs.Factory.newInstance();
      ctXfs.setCount(xfs.size());
      ctXfs.setXfArray(
          xfs.toArray(new CTXf[xfs.size()])
      );
      styleSheet.setCellXfs(ctXfs);
    }
View Full Code Here

TOP

Related Classes of org.openxmlformats.schemas.spreadsheetml.x2006.main.CTRst

Copyright © 2018 www.massapicom. 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.