Package org.apache.poi.xssf.usermodel.extensions

Examples of org.apache.poi.xssf.usermodel.extensions.XSSFCellBorder


        CTBorderPr pr = ct.isSetBottom() ? ct.getBottom() : ct.addNewBottom();
        if(color != nullpr.setColor(color.getCTColor());
        else pr.unsetColor();

        int idx = _stylesSource.putBorder(new XSSFCellBorder(ct, _theme));

        _cellXf.setBorderId(idx);
        _cellXf.setApplyBorder(true);
    }
View Full Code Here


     */
    private CTBorder getCTBorder(){
        CTBorder ct;
        if(_cellXf.getApplyBorder()) {
            int idx = (int)_cellXf.getBorderId();
            XSSFCellBorder cf = _stylesSource.getBorderAt(idx);

            ct = (CTBorder)cf.getCTBorder().copy();
        } else {
            ct = CTBorder.Factory.newInstance();
        }
        return ct;
    }
View Full Code Here

        CTBorderPr pr = ct.isSetLeft() ? ct.getLeft() : ct.addNewLeft();
        if(color != nullpr.setColor(color.getCTColor());
        else pr.unsetColor();

        int idx = _stylesSource.putBorder(new XSSFCellBorder(ct, _theme));

        _cellXf.setBorderId(idx);
        _cellXf.setApplyBorder(true);
    }
View Full Code Here

        CTBorderPr pr = ct.isSetRight() ? ct.getRight() : ct.addNewRight();
        if(color != nullpr.setColor(color.getCTColor());
        else pr.unsetColor();

        int idx = _stylesSource.putBorder(new XSSFCellBorder(ct, _theme));

        _cellXf.setBorderId(idx);
        _cellXf.setApplyBorder(true);
    }
View Full Code Here

        CTBorderPr pr = ct.isSetTop() ? ct.getTop() : ct.addNewTop();
        if(color != nullpr.setColor(color.getCTColor());
        else pr.unsetColor();

        int idx = _stylesSource.putBorder(new XSSFCellBorder(ct, _theme));

        _cellXf.setBorderId(idx);
        _cellXf.setApplyBorder(true);
    }
View Full Code Here

    stylesTable = new StylesTable();

    ctStylesheet = stylesTable.getCTStylesheet();

    ctBorderA = CTBorder.Factory.newInstance();
    XSSFCellBorder borderA = new XSSFCellBorder(ctBorderA);
    long borderId = stylesTable.putBorder(borderA);
    assertEquals(1, borderId);

    XSSFCellBorder borderB = new XSSFCellBorder();
    assertEquals(1, stylesTable.putBorder(borderB));

    ctFill = CTFill.Factory.newInstance();
    XSSFCellFill fill = new XSSFCellFill(ctFill);
    long fillId = stylesTable.putFill(fill);
View Full Code Here

            }

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

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

    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();
    xf.setXfId(0);
View Full Code Here

    stylesTable = new StylesTable();

    ctStylesheet = stylesTable.getCTStylesheet();

    ctBorderA = CTBorder.Factory.newInstance();
    XSSFCellBorder borderA = new XSSFCellBorder(ctBorderA);
    long borderId = stylesTable.putBorder(borderA);
    assertEquals(1, borderId);

    XSSFCellBorder borderB = new XSSFCellBorder();
    assertEquals(1, stylesTable.putBorder(borderB));

    ctFill = CTFill.Factory.newInstance();
    XSSFCellFill fill = new XSSFCellFill(ctFill);
    long fillId = stylesTable.putFill(fill);
View Full Code Here

      for (CTFill fill : doc.getStyleSheet().getFills().getFillArray()) {
        fills.add(new XSSFCellFill(fill));
      }
      if(doc.getStyleSheet().getBorders() != null)
      for (CTBorder border : doc.getStyleSheet().getBorders().getBorderArray()) {
        borders.add(new XSSFCellBorder(border));
      }
      if(doc.getStyleSheet().getCellXfs() != null)
      for (CTXf xf : doc.getStyleSheet().getCellXfs().getXfArray()) {
        xfs.add(xf);
      }
View Full Code Here

TOP

Related Classes of org.apache.poi.xssf.usermodel.extensions.XSSFCellBorder

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.