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

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

Introduction

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

Prototype

@Removal(version = "4.2")
@Deprecated
VerticalAlignment getVerticalAlignmentEnum();

Source Link

Document

get the type of vertical alignment for the cell

Usage

From source file:org.tiefaces.components.websheet.utility.CellStyleUtility.java

License:MIT License

/**
 * Gets the vertical alignment from cell.
 * //from  w w w .  j av  a  2  s.  c o m
 * @param cellStyle
 *            the cell style
 *
 * @return the vertical alignment from cell
 */
private static String getVerticalAlignmentFromCell(final CellStyle cellStyle) {

    String style = "";
    switch (cellStyle.getVerticalAlignmentEnum()) {
    case TOP:
        style = TieConstants.VERTICAL_ALIGN_TOP;
        break;
    case CENTER:
        style = TieConstants.VERTICAL_ALIGN_CENTER;
        break;
    case BOTTOM:
        style = TieConstants.VERTICAL_ALIGN_BOTTOM;
        break;
    default:
        break;
    }
    return style;
}

From source file:uk.co.certait.test.ExcelToHtmlConverter.java

License:Apache License

private void styleContents(CellStyle style) {
    styleOut("text-align", style.getAlignmentEnum(), HALIGN);
    styleOut("vertical-align", style.getVerticalAlignmentEnum(), VALIGN);
    fontStyle(style);// ww  w . ja v  a  2s . c  o  m
    borderStyles(style);
    helper.colorStyles(style, out);
}