All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.alibaba.excel.write.style.row.SimpleRowHeightStyleStrategy Maven / Gradle / Ivy

There is a newer version: 4.0.3
Show newest version
package com.alibaba.excel.write.style.row;

import org.apache.poi.ss.usermodel.Row;

/**
 * Set the head column high and content column high
 *
 * @author Jiaju Zhuang
 */
public class SimpleRowHeightStyleStrategy extends AbstractRowHeightStyleStrategy {
    private Short headRowHeight;
    private Short contentRowHeight;

    public SimpleRowHeightStyleStrategy(Short headRowHeight, Short contentRowHeight) {
        this.headRowHeight = headRowHeight;
        this.contentRowHeight = contentRowHeight;
    }

    @Override
    protected void setHeadColumnHeight(Row row, int relativeRowIndex) {
        if (headRowHeight != null) {
            row.setHeightInPoints(headRowHeight);
        }
    }

    @Override
    protected void setContentColumnHeight(Row row, int relativeRowIndex) {
        if (contentRowHeight != null) {
            row.setHeightInPoints(contentRowHeight);
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy