Example usage for org.apache.poi.ss.usermodel CellStyle setAlignment

List of usage examples for org.apache.poi.ss.usermodel CellStyle setAlignment

Introduction

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

Prototype

void setAlignment(HorizontalAlignment align);

Source Link

Document

set the type of horizontal alignment for the cell

Usage

From source file:com.globalsight.everest.qachecks.DITAQAChecker.java

License:Apache License

private CellStyle getUnlockedStyle(Workbook p_workbook) throws Exception {
    if (unlockedStyle == null) {
        Font font = p_workbook.createFont();
        font.setFontName("Arial");
        font.setFontHeightInPoints((short) 10);

        CellStyle style = p_workbook.createCellStyle();
        style.setFont(font);//from  w w w  .  j av  a2 s.  c o m
        style.setLocked(false);
        style.setWrapText(true);
        style.setAlignment(CellStyle.ALIGN_LEFT);
        style.setVerticalAlignment(CellStyle.VERTICAL_CENTER);

        unlockedStyle = style;
    }

    return unlockedStyle;
}

From source file:com.globalsight.everest.qachecks.QAChecker.java

License:Apache License

private CellStyle getContentStyle(Workbook p_workbook) {
    if (m_contentStyle == null) {
        CellStyle style = p_workbook.createCellStyle();
        style.setWrapText(true);/*www. j ava2s .  c  o  m*/
        style.setAlignment(CellStyle.ALIGN_LEFT);
        style.setVerticalAlignment(CellStyle.VERTICAL_CENTER);
        Font font = p_workbook.createFont();
        font.setFontName("Arial");
        font.setFontHeightInPoints((short) 10);
        style.setFont(font);

        m_contentStyle = style;
    }

    return m_contentStyle;
}

From source file:com.globalsight.everest.qachecks.QAChecker.java

License:Apache License

private CellStyle getRtlContentStyle(Workbook p_workbook) {
    if (m_rtlContentStyle == null) {
        Font font = p_workbook.createFont();
        font.setFontName("Arial");
        font.setFontHeightInPoints((short) 10);

        CellStyle style = p_workbook.createCellStyle();
        style.setFont(font);//  w  w  w.j  a va 2s . co  m
        style.setWrapText(true);
        style.setAlignment(CellStyle.ALIGN_RIGHT);
        style.setVerticalAlignment(CellStyle.VERTICAL_CENTER);

        m_rtlContentStyle = style;
    }

    return m_rtlContentStyle;
}

From source file:com.globalsight.everest.qachecks.QAChecker.java

License:Apache License

private CellStyle getUnlockedStyle(Workbook p_workbook) {
    if (m_unlockedStyle == null) {
        Font font = p_workbook.createFont();
        font.setFontName("Arial");
        font.setFontHeightInPoints((short) 10);

        CellStyle style = p_workbook.createCellStyle();
        style.setFont(font);//  www  .  j  a v a2  s.co  m
        style.setLocked(false);
        style.setWrapText(true);
        style.setAlignment(CellStyle.ALIGN_LEFT);
        style.setVerticalAlignment(CellStyle.VERTICAL_CENTER);

        m_unlockedStyle = style;
    }

    return m_unlockedStyle;
}

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

License:Apache License

private CellStyle getContentStyle(Workbook p_workbook) throws Exception {
    if (contentStyle == null) {
        CellStyle style = p_workbook.createCellStyle();
        style.setWrapText(true);//from w  w w .j a v a2  s.co  m
        style.setAlignment(CellStyle.ALIGN_LEFT);
        style.setVerticalAlignment(CellStyle.VERTICAL_CENTER);
        Font font = p_workbook.createFont();
        font.setFontName("Arial");
        font.setFontHeightInPoints((short) 10);
        style.setFont(font);

        contentStyle = style;
    }

    return contentStyle;
}

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

License:Apache License

private CellStyle getContentStyle(Workbook p_workbook) {
    if (contentStyle == null) {
        CellStyle style = p_workbook.createCellStyle();
        style.setWrapText(true);/* w  ww .  j  av a  2 s.  co m*/
        style.setAlignment(CellStyle.ALIGN_LEFT);
        style.setVerticalAlignment(CellStyle.VERTICAL_CENTER);
        Font font = p_workbook.createFont();
        font.setFontName("Arial");
        font.setFontHeightInPoints((short) 10);
        style.setFont(font);

        contentStyle = style;
    }

    return contentStyle;
}

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

License:Apache License

private CellStyle getRtlContentStyle(Workbook p_workbook) {
    if (rtlContentStyle == null) {
        Font font = p_workbook.createFont();
        font.setFontName("Arial");
        font.setFontHeightInPoints((short) 10);

        CellStyle style = p_workbook.createCellStyle();
        style.setFont(font);//from   w w w  .j  av  a  2  s  .c o m
        style.setWrapText(true);
        style.setAlignment(CellStyle.ALIGN_RIGHT);
        style.setVerticalAlignment(CellStyle.VERTICAL_CENTER);

        rtlContentStyle = style;
    }

    return rtlContentStyle;
}

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

License:Apache License

private CellStyle getUnlockedStyle(Workbook p_workbook) {
    if (unlockedStyle == null) {
        Font font = p_workbook.createFont();
        font.setFontName("Arial");
        font.setFontHeightInPoints((short) 10);

        CellStyle style = p_workbook.createCellStyle();
        style.setFont(font);/*from   w  ww . ja  v  a2 s .  c o  m*/
        style.setLocked(false);
        style.setWrapText(true);
        style.setAlignment(CellStyle.ALIGN_LEFT);
        style.setVerticalAlignment(CellStyle.VERTICAL_CENTER);

        unlockedStyle = style;
    }

    return unlockedStyle;
}

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

License:Apache License

private CellStyle getUnlockedRightStyle(Workbook p_workbook) {
    if (unlockedRightStyle == null) {
        Font font = p_workbook.createFont();
        font.setFontName("Arial");
        font.setFontHeightInPoints((short) 10);

        CellStyle style = p_workbook.createCellStyle();
        style.setFont(font);//from   w  w  w  .  j a v a 2s  . c om
        style.setLocked(false);
        style.setWrapText(true);
        style.setAlignment(CellStyle.ALIGN_RIGHT);
        style.setVerticalAlignment(CellStyle.VERTICAL_CENTER);

        unlockedRightStyle = style;
    }

    return unlockedRightStyle;
}

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

License:Apache License

private CellStyle getUnlockedRightStyle(Workbook p_workbook) throws Exception {
    if (unlockedRightStyle == null) {
        Font font = p_workbook.createFont();
        font.setFontName("Arial");
        font.setFontHeightInPoints((short) 10);

        CellStyle style = p_workbook.createCellStyle();
        style.setFont(font);//from w  w  w.  j  a  v  a  2s.co  m
        style.setLocked(false);
        style.setWrapText(true);
        style.setAlignment(CellStyle.ALIGN_RIGHT);
        style.setVerticalAlignment(CellStyle.VERTICAL_CENTER);

        unlockedRightStyle = style;
    }

    return unlockedRightStyle;
}