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;
}
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();
}
Aggregations