package cn.pluss.platform.util.excel.model;

import org.apache.poi.xssf.usermodel.XSSFCellStyle;
import org.apache.poi.xssf.usermodel.XSSFSheet;

import java.time.format.DateTimeFormatter;

/**
 * @author Djh
 */
public class Sheet {

    private int mergeCount = 0;

    private XSSFSheet sheet;

    private XSSFCellStyle cellStyle;

    private DateTimeFormatter dateTimeFormatter;

    public int getMergeCount() {
        return mergeCount;
    }

    public void setMergeCount(int mergeCount) {
        this.mergeCount = mergeCount;
    }

    public XSSFSheet getSheet() {
        return sheet;
    }

    public void setSheet(XSSFSheet sheet) {
        this.sheet = sheet;
    }

    public XSSFCellStyle getCellStyle() {
        return cellStyle;
    }

    public void setCellStyle(XSSFCellStyle cellStyle) {
        this.cellStyle = cellStyle;
    }

    public DateTimeFormatter getDateTimeFormatter() {
        return dateTimeFormatter;
    }

    public void setDateTimeFormatter(DateTimeFormatter dateTimeFormatter) {
        this.dateTimeFormatter = dateTimeFormatter;
    }

    public Sheet(XSSFSheet sheet) {
        this.sheet = sheet;
    }

    public void addRow(Row row) {
        row.add2Sheet(this);
    }

    public void mergeCountIncrement() {
        mergeCount++;
    }
}
