Examples of XSSFCellFill


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

     */
    public short getFillPattern() {
        if(!_cellXf.getApplyFill()) return 0;

        int fillIndex = (int)_cellXf.getFillId();
        XSSFCellFill fill = _stylesSource.getFillAt(fillIndex);

        STPatternType.Enum ptrn = fill.getPatternType();
        if(ptrn == null) return CellStyle.NO_FILL;
        return (short)(ptrn.intValue() - 1);
    }
View Full Code Here

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

        } else {
            if(ptrn == null) ptrn = ct.addNewPatternFill();
            ptrn.setBgColor(color.getCTColor());
        }

        int idx = _stylesSource.putFill(new XSSFCellFill(ct));

        _cellXf.setFillId(idx);
        _cellXf.setApplyFill(true);
    }
View Full Code Here

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

        } else {
            if(ptrn == null) ptrn = ct.addNewPatternFill();
            ptrn.setFgColor(color.getCTColor());
        }

        int idx = _stylesSource.putFill(new XSSFCellFill(ct));

        _cellXf.setFillId(idx);
        _cellXf.setApplyFill(true);
    }
View Full Code Here

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

     */
    private CTFill getCTFill(){
        CTFill ct;
        if(_cellXf.getApplyFill()) {
            int fillIndex = (int)_cellXf.getFillId();
            XSSFCellFill cf = _stylesSource.getFillAt(fillIndex);

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

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

        CTFill ct = getCTFill();
        CTPatternFill ptrn = ct.isSetPatternFill() ? ct.getPatternFill() : ct.addNewPatternFill();
        if(fp == NO_FILL && ptrn.isSetPatternType()) ptrn.unsetPatternType();
        else ptrn.setPatternType(STPatternType.Enum.forInt(fp + 1));

        int idx = _stylesSource.putFill(new XSSFCellFill(ct));

        _cellXf.setFillId(idx);
        _cellXf.setApplyFill(true);
    }
View Full Code Here

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

     */
    public XSSFColor getFillBackgroundXSSFColor() {
        if(!_cellXf.getApplyFill()) return null;

        int fillIndex = (int)_cellXf.getFillId();
        XSSFCellFill fg = _stylesSource.getFillAt(fillIndex);

        XSSFColor fillBackgroundColor = fg.getFillBackgroundColor();
        if (fillBackgroundColor != null && _theme != null) {
            _theme.inheritFromThemeAsRequired(fillBackgroundColor);
        }
        return fillBackgroundColor;
    }
View Full Code Here

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

     */
    public XSSFColor getFillForegroundXSSFColor() {
        if(!_cellXf.getApplyFill()) return null;

        int fillIndex = (int)_cellXf.getFillId();
        XSSFCellFill fg = _stylesSource.getFillAt(fillIndex);

        XSSFColor fillForegroundColor = fg.getFillForegroundColor();
        if (fillForegroundColor != null && _theme != null) {
            _theme.inheritFromThemeAsRequired(fillForegroundColor);
        }
        return fillForegroundColor;
    }
View Full Code Here

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

     */
    public short getFillPattern() {
        if(!_cellXf.getApplyFill()) return 0;

        int fillIndex = (int)_cellXf.getFillId();
        XSSFCellFill fill = _stylesSource.getFillAt(fillIndex);

        STPatternType.Enum ptrn = fill.getPatternType();
        if(ptrn == null) return CellStyle.NO_FILL;
        return (short)(ptrn.intValue() - 1);
    }
View Full Code Here

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

        } else {
            if(ptrn == null) ptrn = ct.addNewPatternFill();
            ptrn.setBgColor(color.getCTColor());
        }

        int idx = _stylesSource.putFill(new XSSFCellFill(ct));

        _cellXf.setFillId(idx);
        _cellXf.setApplyFill(true);
    }
View Full Code Here

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

        } else {
            if(ptrn == null) ptrn = ct.addNewPatternFill();
            ptrn.setFgColor(color.getCTColor());
        }

        int idx = _stylesSource.putFill(new XSSFCellFill(ct));

        _cellXf.setFillId(idx);
        _cellXf.setApplyFill(true);
    }
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.