Package org.apache.poi.hssf.record

Examples of org.apache.poi.hssf.record.HCenterRecord


            throws Exception
    {
        HSSFWorkbook wb = new HSSFWorkbook();
        HSSFSheet s = wb.createSheet();
        Sheet sheet = s.getSheet();
        HCenterRecord record =
                (HCenterRecord) sheet.findFirstRecordBySid(HCenterRecord.sid);

        assertEquals(false, record.getHCenter());
        s.setHorizontallyCenter(true);
        assertEquals(true, record.getHCenter());

    }   
View Full Code Here


   */
  public void testHorizontallyCenter() {
    HSSFWorkbook wb = new HSSFWorkbook();
    HSSFSheet s = wb.createSheet();
    Sheet sheet = s.getSheet();
    HCenterRecord record =
        (HCenterRecord) sheet.findFirstRecordBySid(HCenterRecord.sid);

    assertEquals(false, record.getHCenter());
    s.setHorizontallyCenter(true);
    assertEquals(true, record.getHCenter());
  }
View Full Code Here

     * @param value true to horizontally center, false otherwise.
     */

    public void setHorizontallyCenter(boolean value)
    {
        HCenterRecord record =
                (HCenterRecord) sheet.findFirstRecordBySid(HCenterRecord.sid);

        record.setHCenter(value);
    }
View Full Code Here

     * Determine whether printed output for this sheet will be horizontally centered.
     */

    public boolean getHorizontallyCenter()
    {
        HCenterRecord record =
                (HCenterRecord) sheet.findFirstRecordBySid(HCenterRecord.sid);

        return record.getHCenter();
    }
View Full Code Here

     * @param value true to horizontally center, false otherwise.
     */

    public void setHorizontallyCenter(boolean value)
    {
        HCenterRecord record =
                (HCenterRecord) sheet.findFirstRecordBySid(HCenterRecord.sid);

        record.setHCenter(value);
    }
View Full Code Here

     * Determine whether printed output for this sheet will be horizontally centered.
     */

    public boolean getHorizontallyCenter()
    {
        HCenterRecord record =
                (HCenterRecord) sheet.findFirstRecordBySid(HCenterRecord.sid);

        return record.getHCenter();
    }
View Full Code Here

            throws Exception
    {
        HSSFWorkbook wb = new HSSFWorkbook();
        HSSFSheet s = wb.createSheet();
        Sheet sheet = s.getSheet();
        HCenterRecord record =
                (HCenterRecord) sheet.findFirstRecordBySid(HCenterRecord.sid);

        assertEquals(false, record.getHCenter());
        s.setHorizontallyCenter(true);
        assertEquals(true, record.getHCenter());

    }   
View Full Code Here

  /**
   * creates the HCenter Record and sets it to false (don't horizontally center)
   */
  private static HCenterRecord createHCenter() {
    HCenterRecord retval = new HCenterRecord();

    retval.setHCenter(false);
    return retval;
  }
View Full Code Here

   * Excel in this regard.
   */
  public void testMissingHeaderFooter() {
    // initialise PSB with some records, but not the header / footer
    Record[] recs = {
        new HCenterRecord(),
        new VCenterRecord(),
    };
    RecordStream rs = new RecordStream(Arrays.asList(recs), 0);
    PageSettingsBlock psb = new PageSettingsBlock(rs);

View Full Code Here

      throws Exception
  {
    HSSFWorkbook wb = new HSSFWorkbook();
    HSSFSheet s = wb.createSheet();
    Sheet sheet = s.getSheet();
    HCenterRecord record =
        (HCenterRecord) sheet.findFirstRecordBySid(HCenterRecord.sid);

    assertEquals(false, record.getHCenter());
    s.setHorizontallyCenter(true);
    assertEquals(true, record.getHCenter());

  }
View Full Code Here

TOP

Related Classes of org.apache.poi.hssf.record.HCenterRecord

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.