Example usage for org.apache.poi.ss.usermodel Font U_NONE

List of usage examples for org.apache.poi.ss.usermodel Font U_NONE

Introduction

In this page you can find the example usage for org.apache.poi.ss.usermodel Font U_NONE.

Prototype

byte U_NONE

To view the source code for org.apache.poi.ss.usermodel Font U_NONE.

Click Source Link

Document

not underlined

Usage

From source file:com.globalsight.everest.webapp.pagehandler.administration.reports.generator.ScorecardReportGenerator.java

License:Apache License

private CellStyle getUnder4Style(Workbook p_workbook) {
    if (under4Style == null) {
        Font font = p_workbook.createFont();
        font.setColor(IndexedColors.BLACK.getIndex());
        font.setUnderline(Font.U_NONE);
        font.setFontName("Arial");
        font.setFontHeightInPoints((short) 9);

        CellStyle cs = p_workbook.createCellStyle();
        cs.setFont(font);/*  www .j  a  v a2 s.  com*/
        cs.setWrapText(true);
        cs.setFillPattern(CellStyle.SOLID_FOREGROUND);
        cs.setFillForegroundColor(IndexedColors.LIGHT_ORANGE.getIndex());
        cs.setBorderTop(CellStyle.BORDER_THIN);
        cs.setBorderRight(CellStyle.BORDER_THIN);
        cs.setBorderBottom(CellStyle.BORDER_THIN);
        cs.setBorderLeft(CellStyle.BORDER_THIN);
        cs.setVerticalAlignment(CellStyle.VERTICAL_CENTER);

        under4Style = cs;
    }

    return under4Style;
}

From source file:com.globalsight.everest.webapp.pagehandler.administration.reports.generator.ScorecardReportGenerator.java

License:Apache License

private CellStyle getUnder3Style(Workbook p_workbook) {
    if (under3Style == null) {
        Font font = p_workbook.createFont();
        font.setColor(IndexedColors.BLACK.getIndex());
        font.setUnderline(Font.U_NONE);
        font.setFontName("Arial");
        font.setFontHeightInPoints((short) 9);

        CellStyle cs = p_workbook.createCellStyle();
        cs.setFont(font);//from  w  w  w  . j a  v a 2s .c  o  m
        cs.setWrapText(true);
        cs.setFillPattern(CellStyle.SOLID_FOREGROUND);
        cs.setFillForegroundColor(IndexedColors.ROSE.getIndex());
        cs.setBorderTop(CellStyle.BORDER_THIN);
        cs.setBorderRight(CellStyle.BORDER_THIN);
        cs.setBorderBottom(CellStyle.BORDER_THIN);
        cs.setBorderLeft(CellStyle.BORDER_THIN);
        cs.setVerticalAlignment(CellStyle.VERTICAL_CENTER);

        under3Style = cs;
    }

    return under3Style;
}

From source file:com.globalsight.everest.webapp.pagehandler.administration.reports.generator.SummaryReportGenerator.java

License:Apache License

private CellStyle getHeaderStyle(Workbook p_workbook, Short top, Short right, Short bottom, Short left) {
    Font headerFont = p_workbook.createFont();
    headerFont.setColor(IndexedColors.BLACK.getIndex());
    headerFont.setUnderline(Font.U_NONE);
    headerFont.setFontName("Arial");
    headerFont.setFontHeightInPoints((short) 9);

    CellStyle cs = p_workbook.createCellStyle();
    cs.setFont(headerFont);/*from   w w  w. j  ava2  s  .  c  o m*/
    cs.setWrapText(true);
    if (top != null) {
        cs.setBorderTop(top);
    }
    if (right != null) {
        cs.setBorderRight(right);
    }
    if (bottom != null) {
        cs.setBorderBottom(bottom);
    }
    if (left != null) {
        cs.setBorderLeft(left);
    }

    return cs;
}

From source file:com.globalsight.everest.webapp.pagehandler.administration.reports.generator.SummaryReportGenerator.java

License:Apache License

private CellStyle getCommonHeaderStyle(Workbook p_workbook) {
    Font headerFont = p_workbook.createFont();
    headerFont.setColor(IndexedColors.BLACK.getIndex());
    headerFont.setUnderline(Font.U_NONE);
    headerFont.setFontName("Arial");
    headerFont.setFontHeightInPoints((short) 9);

    CellStyle cs = p_workbook.createCellStyle();
    cs.setFont(headerFont);/*from  w w w  .  j  ava2 s .  com*/
    cs.setWrapText(true);
    cs.setBorderTop(CellStyle.BORDER_THIN);
    cs.setBorderRight(CellStyle.BORDER_THIN);
    cs.setBorderBottom(CellStyle.BORDER_THIN);
    cs.setBorderLeft(CellStyle.BORDER_THIN);
    return cs;
}

From source file:com.globalsight.everest.webapp.pagehandler.administration.reports.generator.TranslationsEditReportGenerator.java

License:Apache License

/**
 * Add title to the sheet/*from www .  jav a  2  s.  c  om*/
 * 
 * @param p_workBook
 * @param p_sheet
 *            the sheet
 * @throws Exception
 */
private void addTitle(Workbook p_workBook, Sheet p_sheet) throws Exception {
    Font titleFont = p_workBook.createFont();
    titleFont.setUnderline(Font.U_NONE);
    titleFont.setFontName("Times");
    titleFont.setFontHeightInPoints((short) 14);
    titleFont.setBoldweight(Font.BOLDWEIGHT_BOLD);
    CellStyle cs = p_workBook.createCellStyle();
    cs.setFont(titleFont);

    Row titleRow = getRow(p_sheet, 0);
    Cell titleCell = getCell(titleRow, 0);
    titleCell.setCellValue(m_bundle.getString("lb_translation_edit_report"));
    titleCell.setCellStyle(cs);
}

From source file:com.globalsight.everest.webapp.pagehandler.administration.reports.generator.TranslationVerificationReportGenerator.java

License:Apache License

/**
 * Add title to the sheet/*  ww  w  . j  av  a  2  s . c  om*/
 * 
 * @param p_workBook
 * @param p_sheet
 *            the sheet
 * @throws Exception
 */
private void addTitle(Workbook p_workBook, Sheet p_sheet) throws Exception {
    Font titleFont = p_workBook.createFont();
    titleFont.setUnderline(Font.U_NONE);
    titleFont.setFontName("Times");
    titleFont.setFontHeightInPoints((short) 14);
    titleFont.setBoldweight(Font.BOLDWEIGHT_BOLD);
    CellStyle cs = p_workBook.createCellStyle();
    cs.setFont(titleFont);

    Row titleRow = getRow(p_sheet, 0);
    Cell titleCell = getCell(titleRow, 0);
    titleCell.setCellValue(m_bundle.getString("lb_translation_verification_report"));
    titleCell.setCellStyle(cs);
}

From source file:com.globalsight.everest.webapp.pagehandler.administration.reports.JobAttributeReportHelper.java

License:Apache License

private void addTitle() throws Exception {
    // title font is black bold on white
    Font titleFont = workbook.createFont();
    titleFont.setUnderline(Font.U_NONE);
    titleFont.setFontName("Arial");
    titleFont.setFontHeightInPoints((short) 14);
    titleFont.setBoldweight(Font.BOLDWEIGHT_BOLD);
    CellStyle titleStyle = workbook.createCellStyle();
    titleStyle.setFont(titleFont);/* w w  w  . ja  v  a  2 s . c o  m*/

    Row titleRow = getRow(0);
    Cell cell_A = getCell(titleRow, 0);
    cell_A.setCellValue(bundle.getString("lb_job_attributes"));
    cell_A.setCellStyle(titleStyle);
    sheet.setColumnWidth(0, 20 * 256);
}

From source file:com.globalsight.everest.webapp.pagehandler.administration.reports.JobAttributeReportHelper.java

License:Apache License

private void writeTotal() throws Exception {
    Font totalFont = workbook.createFont();
    totalFont.setBoldweight(Font.BOLDWEIGHT_BOLD);
    totalFont.setColor(IndexedColors.BLACK.getIndex());
    totalFont.setUnderline(Font.U_NONE);
    totalFont.setFontName("Arial");
    totalFont.setFontHeightInPoints((short) 9);

    CellStyle totalStyle = workbook.createCellStyle();
    totalStyle.setFont(totalFont);/*from   w w  w. j  a v  a  2s  .c  o m*/

    Set<Integer> keys = totalCells.keySet();

    if (keys.size() > 0) {
        row++;
        Cell cell_B = getCell(getRow(row), 1);
        cell_B.setCellValue(bundle.getString("lb_total"));
        cell_B.setCellStyle(totalStyle);

        for (Integer key : keys) {
            Cell cell = getCell(getRow(row), key - 1);
            cell.setCellFormula(getTotalFormula(key, totalCells.get(key)));
            cell.setCellStyle(totalStyle);
        }
    }
}

From source file:com.globalsight.everest.webapp.pagehandler.administration.reports.JobAttributeReportHelper.java

License:Apache License

private CellStyle getHeaderStyle(Boolean isSuper) throws Exception {
    if (isSuper && headerStyleSuper != null) {
        return headerStyleSuper;
    }//from   w  w w. j ava  2 s. co  m

    if (!isSuper && headerStyle != null) {
        return headerStyle;
    }

    Font font = workbook.createFont();
    font.setBoldweight(Font.BOLDWEIGHT_BOLD);
    if (isSuper) {
        font.setColor(IndexedColors.ORANGE.getIndex());
    } else {
        font.setColor(IndexedColors.BLACK.getIndex());
    }
    font.setUnderline(Font.U_NONE);
    font.setFontName("Arial");
    font.setFontHeightInPoints((short) 9);

    CellStyle cs = workbook.createCellStyle();
    cs.setFont(font);
    cs.setWrapText(true);
    cs.setFillPattern(CellStyle.SOLID_FOREGROUND);
    cs.setFillForegroundColor(IndexedColors.GREY_25_PERCENT.getIndex());
    cs.setBorderTop(CellStyle.BORDER_THIN);
    cs.setBorderRight(CellStyle.BORDER_THIN);
    cs.setBorderBottom(CellStyle.BORDER_THIN);
    cs.setBorderLeft(CellStyle.BORDER_THIN);

    if (isSuper) {
        headerStyleSuper = cs;
        return headerStyleSuper;
    } else {
        headerStyle = cs;
        return headerStyle;
    }
}

From source file:com.globalsight.everest.webapp.pagehandler.administration.reports.JobStatusXlsReportProcessor.java

License:Apache License

private CellStyle getTitleStyle(Workbook p_workbook) {
    if (titleStyle == null) {
        Font titleFont = p_workbook.createFont();
        titleFont.setUnderline(Font.U_NONE);
        titleFont.setFontName("Times");
        titleFont.setFontHeightInPoints((short) 14);
        titleFont.setBoldweight(Font.BOLDWEIGHT_BOLD);

        CellStyle cs = p_workbook.createCellStyle();
        cs.setFont(titleFont);/*from   www.  j  av a 2 s .c  o m*/

        titleStyle = cs;
    }

    return titleStyle;
}