use of org.apache.poi.hssf.record.HCenterRecord in project poi by apache.
the class TestHSSFSheet method horizontallyCenter.
/**
* Test horizontally centered output.
*/
@Test
public void horizontallyCenter() throws IOException {
HSSFWorkbook wb = new HSSFWorkbook();
HSSFSheet s = wb.createSheet();
HCenterRecord record = s.getSheet().getPageSettings().getHCenter();
assertFalse(record.getHCenter());
assertFalse(s.getHorizontallyCenter());
s.setHorizontallyCenter(true);
assertTrue(record.getHCenter());
assertTrue(s.getHorizontallyCenter());
wb.close();
}
use of org.apache.poi.hssf.record.HCenterRecord in project poi by apache.
the class HSSFChart method createHCenterRecord.
private HCenterRecord createHCenterRecord() {
HCenterRecord r = new HCenterRecord();
r.setHCenter(false);
return r;
}
Aggregations