Package com.lowagie.text

Examples of com.lowagie.text.Table


  {
    Document document = new Document(new Rectangle(455, 600), 0, 0, 0, 0);
    RtfWriter2.getInstance(document, System.out);
    document.open();

    Table table = new Table (7, 2);
    boolean[][] occupiedCells = new boolean[7][2];
    float[] cellWidths = { 10, 10, 10, 10, 10, 10, 10 };
    table.setWidths(cellWidths);

    addCell(occupiedCells, table, 0, 0, 4, 2);
    addCell(occupiedCells, table, 4, 0, 2, 2);
    addCell(occupiedCells, table, 6, 0, 1, 1);
    addCell(occupiedCells, table, 6, 1, 1, 1);
View Full Code Here


      final SheetLayout sheetLayout = contentProducer.getSheetLayout();
      final int columnCount = contentProducer.getColumnCount();
      if (table == null)
      {
        final int rowCount = contentProducer.getRowCount();
        table = new Table(columnCount, rowCount);
        table.setAutoFillEmptyCells(false);
        table.setWidth(100); // span the full page..
        // and finally the content ..

        final float[] cellWidths = new float[columnCount];
View Full Code Here

    public static Table newDescription(String description) throws DocumentException {
        if ( description == null || "".equals( description ) ) {
            description = " - ";
        }

        Table table = newTable();

        Cell headerCell = newHeaderCell( "Description",
                                         CATEGORIES_TEXT );
        table.addCell( headerCell );

        table.addCell( newCell( description ) );

        return table;
    }
View Full Code Here

        return table;
    }

    private static Table newTable() throws BadElementException {
        Table table = new Table( 1 );

        table.setBorderWidthTop( 1 );
        table.setBorderWidthLeft( 1 );
        table.setBorderWidthRight( 1 );
        table.setBorderWidthBottom( 0 );
        table.setWidth( 100 );
        table.setPadding( 3 );
        table.setAlignment( Table.ALIGN_LEFT );

        return table;
    }
View Full Code Here

        }
    }

    public static Table newRuleTable(DrlRuleParser drl) throws BadElementException,
                                                     DocumentException {
        Table table = newTable();

        Cell headerCell = newHeaderCell( "Attributes",
                                         CATEGORIES_TEXT );
        table.addCell( headerCell );

        for ( String s : drl.getHeader() ) {
            table.addCell( newCell( INDENT + s.trim() ) );
        }

        table.addCell( newHeaderCell( INDENT + "WHEN",
                                      BODY_TEXT ) );
        for ( String s : drl.getLhs() ) {
            table.addCell( newCell( INDENT + INDENT + s.trim() ) );
        }

        table.addCell( newHeaderCell( INDENT + "THEN",
                                      BODY_TEXT ) );
        for ( String s : drl.getRhs() ) {
            table.addCell( newCell( INDENT + INDENT + s.trim() ) );
        }
        // table.addCell( newEmptyWhenThenCell( "END" ) );

        return table;
    }
View Full Code Here

    }

    public static Table newTable(final String topic,
                                 Collection<String> items) throws BadElementException,
                                                          DocumentException {
        Table table = newTable();

        Cell headerCell = newHeaderCell( topic,
                                         CATEGORIES_TEXT );
        table.addCell( headerCell );

        if ( items.isEmpty() ) {
            table.addCell( newCell( " - " ) );
        } else {
            for ( String s : items ) {
                table.addCell( newCell( s ) );
            }
        }

        return table;
    }
View Full Code Here

      final SheetLayout sheetLayout = contentProducer.getSheetLayout();
      final int columnCount = contentProducer.getColumnCount();
      if (table == null)
      {
        final int rowCount = contentProducer.getRowCount();
        table = new Table(columnCount, rowCount);
        table.setAutoFillEmptyCells(false);
        table.setWidth(100); // span the full page..
        // and finally the content ..

        final float[] cellWidths = new float[columnCount];
View Full Code Here

    public static Table newDescription(String description) throws DocumentException {
        if ( description == null || "".equals( description ) ) {
            description = " - ";
        }

        Table table = newTable();

        Cell headerCell = newHeaderCell( "Description",
                                         CATEGORIES_TEXT );
        table.addCell( headerCell );

        table.addCell( newCell( description ) );

        return table;
    }
View Full Code Here

        return table;
    }

    private static Table newTable() throws BadElementException {
        Table table = new Table( 1 );

        table.setBorderWidthTop( 1 );
        table.setBorderWidthLeft( 1 );
        table.setBorderWidthRight( 1 );
        table.setBorderWidthBottom( 0 );
        table.setWidth( 100 );
        table.setPadding( 3 );
        table.setAlignment( Table.ALIGN_LEFT );

        return table;
    }
View Full Code Here

        }
    }

    public static Table newRuleTable(DrlRuleParser drl) throws BadElementException,
                                                     DocumentException {
        Table table = newTable();

        Cell headerCell = newHeaderCell( "Attributes",
                                         CATEGORIES_TEXT );
        table.addCell( headerCell );

        for ( String s : drl.getHeader() ) {
            table.addCell( newCell( INDENT + s.trim() ) );
        }

        table.addCell( newHeaderCell( INDENT + "WHEN",
                                      BODY_TEXT ) );
        for ( String s : drl.getLhs() ) {
            table.addCell( newCell( INDENT + INDENT + s.trim() ) );
        }

        table.addCell( newHeaderCell( INDENT + "THEN",
                                      BODY_TEXT ) );
        for ( String s : drl.getRhs() ) {
            table.addCell( newCell( INDENT + INDENT + s.trim() ) );
        }
        // table.addCell( newEmptyWhenThenCell( "END" ) );

        return table;
    }
View Full Code Here

TOP

Related Classes of com.lowagie.text.Table

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.