Examples of TableBuilder


Examples of org.nasutekds.server.util.table.TableBuilder

        out.println(DESCRIPTION_OPTIONS_MANDATORY);
        out.print(" s -- ");
        out.println(DESCRIPTION_OPTIONS_SINGLE);
        out.println();

        TableBuilder table = new TableBuilder();
        table.appendHeading(INFO_DSCFG_HEADING_PROPERTY_NAME.get());
        table.appendHeading(INFO_DSCFG_HEADING_PROPERTY_OPTIONS.get());
        table.appendHeading(INFO_DSCFG_HEADING_PROPERTY_SYNTAX.get());
        table.appendHeading(INFO_CLI_HEADING_PROPERTY_DEFAULT_VALUE.get());
        for (AdministratorProperty adminUserProp : userAdminProperties.keySet())
        {
          if (userAdminProperties.get(adminUserProp).isHidden())
          {
            continue;
          }
          table.startRow();
          table.appendCell(adminUserProp.getAttributeName());
          table.appendCell(getPropertyOptionSummary(userAdminProperties
              .get(adminUserProp)));
          table.appendCell(adminUserProp.getAttributeSyntax());
          if (userAdminProperties.get(adminUserProp).getDefaultValue() != null)
          {
            table.appendCell(userAdminProperties.get(adminUserProp)
                .getDefaultValue());
          }
          else
          {
            table.appendCell("-");
          }
        }
        TextTablePrinter printer = new TextTablePrinter(outStream);
        table.print(printer);
        returnCode = SUCCESSFUL;
      }
      // -----------------------
      // ERROR
      // -----------------------
View Full Code Here

Examples of org.odftoolkit.simple.table.Table.TableBuilder

  public void testGetTableBuilder() {
    try {
      TextDocument doc = TextDocument.newTextDocument();
      Header header = doc.getHeader();
     
      TableBuilder tabBuilder = header.getTableBuilder();
      Table tab = tabBuilder.newTable();
      Assert.assertNotNull(tab);
      Assert.assertTrue(2 == tab.getRowCount());
      Assert.assertTrue(5 == tab.getColumnCount());
     
      //validate
View Full Code Here

Examples of org.odftoolkit.simple.table.Table.TableBuilder

      TextDocument doc = TextDocument.newTextDocument();
      Header header = doc.getHeader();
     
      OdfElement odfEle = header.getVariableContainerElement();
     
      TableBuilder tb = header.getTableBuilder();
      Table tab = tb.newTable();
     
      Assert.assertNotNull(tab);
      Assert.assertTrue(2 == tab.getRowCount());
      Assert.assertTrue(5 == tab.getColumnCount());
     
View Full Code Here

Examples of org.odftoolkit.simple.table.Table.TableBuilder

      //TextDocument doc = TextDocument.loadDocument(ResourceUtilities.getTestResourceAsStream("headerFooterHidden.odt"));
      TextDocument doc = TextDocument.newTextDocument();
      Footer footer = doc.getFooter();
      //Table tab = footer.addTable();
     
      TableBuilder tb = footer.getTableBuilder();
      Table tab = tb.newTable();
     
      Assert.assertNotNull(tab);
      Assert.assertTrue(2 == tab.getRowCount());
      Assert.assertTrue(5 == tab.getColumnCount());
     
View Full Code Here

Examples of org.odftoolkit.simple.table.Table.TableBuilder

      //TextDocument doc = TextDocument.loadDocument(ResourceUtilities.getTestResourceAsStream("headerFooterHidden.odt"));
      TextDocument doc = TextDocument.newTextDocument();
      Footer footer = doc.getFooter();
      OdfElement odfEle = footer.getVariableContainerElement();
     
      TableBuilder tb = footer.getTableBuilder();
      Table tab = tb.newTable();
     
      Assert.assertNotNull(tab);
      Assert.assertTrue(2 == tab.getRowCount());
      Assert.assertTrue(5 == tab.getColumnCount());
     
View Full Code Here

Examples of org.odftoolkit.simple.table.Table.TableBuilder

public class TableBuilderTest {
   
    @Test
    public void testCreateTable() throws Exception {
        TextDocument textDoc = TextDocument.newTextDocument();
        TableBuilder tableBuilder = textDoc.getTableBuilder();
        Table table = tableBuilder.newTable(4, 3, 2, 1);
        assertEquals(4, table.getRowCount());
        assertEquals(3, table.getColumnCount());
        assertEquals(2, table.getHeaderRowCount());
        assertEquals(1, table.getHeaderColumnCount());
        assertNotNull(table.getCellByPosition(1, 1));
View Full Code Here

Examples of org.odftoolkit.simple.table.Table.TableBuilder

    }
   
    @Test
    public void testAppendRow() throws Exception {
        TextDocument textDoc = TextDocument.newTextDocument();
        TableBuilder tableBuilder = textDoc.getTableBuilder();
        Table table = tableBuilder.newTable(4, 3, 2, 1);
        assertEquals(4, table.getRowCount());
        Row row = table.appendRow();
        assertNotNull(row);
        assertEquals(5, table.getRowCount());
        assertNotNull(table.getCellByPosition(1, 1));
View Full Code Here

Examples of org.odftoolkit.simple.table.Table.TableBuilder

    }
   
    @Test
    public void test363() throws Exception {
        TextDocument document = TextDocument.newTextDocument();
        TableBuilder tableBuilder = document.getTableBuilder();
        Table docBuiltTable1 = tableBuilder.newTable(2, 5, 1, 5);
        assertNotNull(docBuiltTable1.getCellByPosition(1,1));
        Table docBuiltTable2 = tableBuilder.newTable(1, 5, 1, 5);
        docBuiltTable2.appendRow();
        assertNotNull(docBuiltTable2.getCellByPosition(1,1));
    }
View Full Code Here

Examples of org.odftoolkit.simple.table.Table.TableBuilder

  public void testGetTableBuilder() {
    try {
      TextDocument doc = TextDocument.newTextDocument();
      Header header = doc.getHeader();
     
      TableBuilder tabBuilder = header.getTableBuilder();
      Table tab = tabBuilder.newTable();
      Assert.assertNotNull(tab);
      Assert.assertTrue(2 == tab.getRowCount());
      Assert.assertTrue(5 == tab.getColumnCount());
     
      //validate
View Full Code Here

Examples of org.odftoolkit.simple.table.Table.TableBuilder

      TextDocument doc = TextDocument.newTextDocument();
      Header header = doc.getHeader();
     
      OdfElement odfEle = header.getVariableContainerElement();
     
      TableBuilder tb = header.getTableBuilder();
      Table tab = tb.newTable();
     
      Assert.assertNotNull(tab);
      Assert.assertTrue(2 == tab.getRowCount());
      Assert.assertTrue(5 == tab.getColumnCount());
     
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.