Search in sources :

Example 1 with VCenterRecord

use of org.apache.poi.hssf.record.VCenterRecord in project poi by apache.

the class HSSFChart method createVCenterRecord.

private VCenterRecord createVCenterRecord() {
    VCenterRecord r = new VCenterRecord();
    r.setVCenter(false);
    return r;
}
Also used : VCenterRecord(org.apache.poi.hssf.record.VCenterRecord)

Example 2 with VCenterRecord

use of org.apache.poi.hssf.record.VCenterRecord in project poi by apache.

the class TestHSSFSheet method verticallyCenter.

/**
     * Test vertically centered output.
     */
@Test
public void verticallyCenter() throws IOException {
    HSSFWorkbook wb = new HSSFWorkbook();
    HSSFSheet s = wb.createSheet();
    VCenterRecord record = s.getSheet().getPageSettings().getVCenter();
    assertFalse(record.getVCenter());
    assertFalse(s.getVerticallyCenter());
    s.setVerticallyCenter(true);
    assertTrue(record.getVCenter());
    assertTrue(s.getVerticallyCenter());
    wb.close();
}
Also used : VCenterRecord(org.apache.poi.hssf.record.VCenterRecord) Test(org.junit.Test)

Aggregations

VCenterRecord (org.apache.poi.hssf.record.VCenterRecord)2 Test (org.junit.Test)1