Package org.odftoolkit.simple.table

Examples of org.odftoolkit.simple.table.TableContainer


      String filePath = ResourceUtilities.getAbsolutePath("headerFooterHidden.odt");
      File file = new File(filePath);
      TextDocument tdocument = TextDocument.loadDocument(file);
      Assert.assertNotNull(tdocument);
     
      TableContainer tablecon = tdocument.getTableContainerImpl();
      OdfElement odfeleA = tablecon.getTableContainerElement();
      OdfElement odfeleB = tdocument.getTableContainerElement();
      Assert.assertEquals(odfeleA, odfeleB);
    } catch (Exception e) {
      LOG.log(Level.SEVERE, e.getMessage(), e);
      Assert.fail(e.getMessage());
View Full Code Here


  @Test
  public void testAddTable() {
    try {
      doc = PresentationDocument.loadDocument(ResourceUtilities.getTestResourceAsStream(TEST_PRESENTATION_FILE_MAIN));
      // add table.
      TableContainer container = doc.newSlide(2, "title_plus_text", Slide.SlideLayout.TITLE_PLUS_TEXT);
      Table table = container.addTable();
      table.setTableName("SlideTable");
      String slideTableCellValue = "SlideTable Cell String";
      table.getCellByPosition(0, 0).setStringValue(slideTableCellValue);
      doc.save(ResourceUtilities.newTestOutputFile("SlideTableOutput.odp"));
     
View Full Code Here

  public void testNewSlideTitle_subtitle() {
    try {
      //Creates an empty presentation document.
      doc = PresentationDocument.newPresentationDocument();
     
      TableContainer container = doc.newSlide(0, "testlayout", Slide.SlideLayout.TITLE_SUBTITLE);
      Table table = container.addTable();
      table.setTableName("SlideTable");
      String slideTableCellValue = " Cell[0,0]";
      table.getCellByPosition(0, 0).setStringValue(slideTableCellValue);
      String slideTableCellValue1 = " Cell[0,1]";
      table.getCellByPosition(0, 1).setStringValue(slideTableCellValue1);
View Full Code Here

      String filePath = ResourceUtilities.getAbsolutePath("headerFooterHidden.odt");
      File file = new File(filePath);
      TextDocument tdocument = TextDocument.loadDocument(file);
      Assert.assertNotNull(tdocument);
     
      TableContainer tablecon = tdocument.getTableContainerImpl();
      OdfElement odfeleA = tablecon.getTableContainerElement();
      OdfElement odfeleB = tdocument.getTableContainerElement();
      Assert.assertEquals(odfeleA, odfeleB);
    } catch (Exception e) {
      LOG.log(Level.SEVERE, e.getMessage(), e);
      Assert.fail(e.getMessage());
View Full Code Here

TOP

Related Classes of org.odftoolkit.simple.table.TableContainer

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.