Example usage for org.apache.poi.ss.util CellUtil ALIGNMENT

List of usage examples for org.apache.poi.ss.util CellUtil ALIGNMENT

Introduction

In this page you can find the example usage for org.apache.poi.ss.util CellUtil ALIGNMENT.

Prototype

String ALIGNMENT

To view the source code for org.apache.poi.ss.util CellUtil ALIGNMENT.

Click Source Link

Usage

From source file:org.haplo.jsinterface.generate.KGenerateXLS.java

License:Mozilla Public License

private void styleAlign(SheetStyleInstruction i) {
    HorizontalAlignment align = null;/*w  w w  .j  a  v  a 2s  .  c o  m*/
    if (i.colour instanceof CharSequence) {
        switch (i.colour.toString()) {
        case "CENTRE":
        case "CENTER":
            align = HorizontalAlignment.CENTER;
            break;
        case "RIGHT":
            align = HorizontalAlignment.RIGHT;
            break;
        }
    }
    if (align == null) {
        return;
    }
    HashMap<String, Object> properties = new HashMap<String, Object>(1);
    properties.put(CellUtil.ALIGNMENT, align);
    styleApplyToRegion(i, properties);
}