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

gutenberg.itext.DefaultBodyCellStyler Maven / Gradle / Ivy

package gutenberg.itext;

import com.itextpdf.text.BaseColor;
import com.itextpdf.text.Font;
import com.itextpdf.text.pdf.PdfPCell;

/**
 * @author @aloyer
 */
public class DefaultBodyCellStyler extends CellStyler {
    private final Styles styles;

    public DefaultBodyCellStyler(Styles styles) {
        super(null);
        this.styles = styles;
    }

    @Override
    public PdfPCell applyStyle(PdfPCell cell) {
        cell.setBorderColor(styles.getColor(Styles.TABLE_BODY_CELL_BORDER_COLOR).or(BaseColor.BLACK));
        return cell;
    }

    @Override
    public Font cellFont() {
        return styles.getFont(Styles.TABLE_BODY_FONT).get();
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy