Package net.sf.jpluck.test

Source Code of net.sf.jpluck.test.TableTest

package net.sf.jpluck.test;

import java.awt.Color;
import java.io.File;

import net.sf.jpluck.plucker.Document;
import net.sf.jpluck.plucker.TableCell;
import net.sf.jpluck.plucker.TableRecord;
import net.sf.jpluck.plucker.TableRow;
import net.sf.jpluck.plucker.TextRecord;

public class TableTest {
    public static void main(String[] args) throws Exception {
        TextRecord home = new TextRecord("home");
        home.addParagraph().addTable("table");

        TableRecord table = new TableRecord("table", 1, Color.GREEN);

        TableRow row = table.addRow();
        TableCell cell = row.addCell();
        cell.addText("nw");
        cell=row.addCell();
        cell.addText("ne");

        row = table.addRow();
    cell = row.addCell();
        cell.addText("sw");
        cell = row.addCell();
        cell.addText("se");

        Document document = new Document("Table test");
        document.setCompression(Document.NO_COMPRESSION);
        document.addRecord(home);
        document.setHome(home);
        document.addRecord(table);
        document.write(new File(args[0]));

    }
}
TOP

Related Classes of net.sf.jpluck.test.TableTest

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.