Package org.apache.poi.hssf.record

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


     */
    @Test
    public void horizontallyCenter() {
        HSSFWorkbook wb = new HSSFWorkbook();
        HSSFSheet s = wb.createSheet();
        HCenterRecord record = s.getSheet().getPageSettings().getHCenter();

        assertFalse(record.getHCenter());
        s.setHorizontallyCenter(true);
        assertTrue(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

        return r;
    }

    private HCenterRecord createHCenterRecord()
    {
        HCenterRecord r = new HCenterRecord();
        r.setHCenter(false);
        return r;
    }
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

    return r;
  }

  private HCenterRecord createHCenterRecord()
  {
    HCenterRecord r = new HCenterRecord();
    r.setHCenter(false);
    return r;
  }
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

    return r;
  }

  private HCenterRecord createHCenterRecord()
  {
    HCenterRecord r = new HCenterRecord();
    r.setHCenter(false);
    return r;
  }
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

    Record contB1 = new ContinueRecord(HexRead.readFromString("FE ED"));
    Record contB2 = new ContinueRecord(HexRead.readFromString("FA CE"));
    Record[] recs = {
        new HeaderRecord("&LSales Figures"),
        new FooterRecord("&LInventory"),
        new HCenterRecord(),
        new VCenterRecord(),
        plsA,
        plsB, contB1, contB2, // make sure continuing PLS is still OK
    };
    RecordStream rs = new RecordStream(Arrays.asList(recs), 0);
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.