Search in sources :

Example 6 with BaseColor

use of com.itextpdf.text.BaseColor in project bamboobsc by billchen198318.

the class OrganizationReportPdfCommand method setCellBackgroundColor.

private void setCellBackgroundColor(PdfPCell cell, String color) throws Exception {
    int[] rgb = SimpleUtils.getColorRGB2(color);
    cell.setBackgroundColor(new BaseColor(rgb[0], rgb[1], rgb[2]));
}
Also used : BaseColor(com.itextpdf.text.BaseColor)

Example 7 with BaseColor

use of com.itextpdf.text.BaseColor in project bamboobsc by billchen198318.

the class PersonalReportPdfCommand method setCellBackgroundColor.

private void setCellBackgroundColor(PdfPCell cell, String color) throws Exception {
    int[] rgb = SimpleUtils.getColorRGB2(color);
    cell.setBackgroundColor(new BaseColor(rgb[0], rgb[1], rgb[2]));
}
Also used : BaseColor(com.itextpdf.text.BaseColor)

Example 8 with BaseColor

use of com.itextpdf.text.BaseColor in project bamboobsc by billchen198318.

the class PersonalReportPdfCommand method getFont.

private Font getFont(String color, boolean bold) throws Exception {
    Font font = FontFactory.getFont(BscConstants.PDF_ITEXT_FONT, BaseFont.IDENTITY_H, BaseFont.EMBEDDED);
    int[] rgb = SimpleUtils.getColorRGB2(color);
    BaseColor baseColor = new BaseColor(rgb[0], rgb[1], rgb[2]);
    font.setSize(9);
    font.setColor(baseColor);
    return font;
}
Also used : BaseColor(com.itextpdf.text.BaseColor) BaseFont(com.itextpdf.text.pdf.BaseFont) Font(com.itextpdf.text.Font)

Aggregations

BaseColor (com.itextpdf.text.BaseColor)8 Font (com.itextpdf.text.Font)4 BaseFont (com.itextpdf.text.pdf.BaseFont)3 ScriptCoverageStatistics (com.github.timurstrekalov.saga.core.model.ScriptCoverageStatistics)1 Chunk (com.itextpdf.text.Chunk)1 Document (com.itextpdf.text.Document)1 DocumentException (com.itextpdf.text.DocumentException)1 Phrase (com.itextpdf.text.Phrase)1 Rectangle (com.itextpdf.text.Rectangle)1 PdfContentByte (com.itextpdf.text.pdf.PdfContentByte)1 PdfWriter (com.itextpdf.text.pdf.PdfWriter)1 Color (java.awt.Color)1 PreviewController (org.gephi.preview.api.PreviewController)1 PreviewProperties (org.gephi.preview.api.PreviewProperties)1 LongTask (org.gephi.utils.longtask.spi.LongTask)1