Package prefuse.data.io

Examples of prefuse.data.io.DelimitedTextTableReader


        // prepare data
        byte[] data = TAB_DELIMITED_DATA.getBytes();
        InputStream is = new ByteArrayInputStream(data);
       
        // parse data
        TableReader ctr = new DelimitedTextTableReader();
        Table t = null;
        try {
            t = ctr.readTable(is);
        } catch ( DataIOException e ) {
            e.printStackTrace();
            fail("Data Read Exception");
        }
       
View Full Code Here


    public void init() {
        // load the data
        Table t = null;
        try {
            t = new DelimitedTextTableReader().readTable("/fec.txt");
        } catch ( Exception e ) {
            e.printStackTrace();
            System.exit(1);
        }
        this.getContentPane().add(new prefuse.demos.Congress(t));
View Full Code Here


public class ZipDecode extends JPrefuseApplet {

    public void init() {
        DelimitedTextTableReader tr = new DelimitedTextTableReader();
        Table t = null;
        try {
            t = tr.readTable("/zipcode.txt");       
        } catch ( DataIOException e ) {
            e.printStackTrace();
            System.exit(1);
        }
        this.setContentPane(new prefuse.demos.ZipDecode(t));
View Full Code Here

    public static ScatterPlot demo(String data, String xfield,
                                   String yfield, String sfield)
    {
        Table table = null;
        try {
            table = new DelimitedTextTableReader().readTable(data);
        } catch ( Exception e ) {
            e.printStackTrace();
            return null;
        }
        ScatterPlot scatter = new ScatterPlot(table, xfield, yfield, sfield);
View Full Code Here

            return null;
        }
    }
   
    public static JFrame demo(String table) throws DataIOException {
        DelimitedTextTableReader tr = new DelimitedTextTableReader();
        Table t = tr.readTable(table);       
        ZipDecode zd = new ZipDecode(t);
       
        JFrame frame = new JFrame("p r e f u s e  |  z i p d e c o d e");
        frame.getContentPane().add(zd);
        frame.pack();
View Full Code Here

   
    public static JFrame demo() {
        // load the data
        Table t = null;
        try {
            t = new DelimitedTextTableReader().readTable("/fec.txt");
        } catch ( Exception e ) {
            e.printStackTrace();
            System.exit(1);
        }
       
View Full Code Here

        jfc.setFileFilter(ff);

        // Pipe-Delimited
        ff = new SimpleFileFilter("txt",
                "Pipe-Delimited Text File (*.txt)",
                new DelimitedTextTableReader("|"));
        ff.addExtension("gz");
        jfc.setFileFilter(ff);

        // Tab-Delimited
        ff = new SimpleFileFilter("txt",
                "Tab-Delimited Text File (*.txt)",
                new DelimitedTextTableReader());
        ff.addExtension("gz");
        jfc.setFileFilter(ff);
       
        int retval = jfc.showOpenDialog(c);
        if (retval != JFileChooser.APPROVE_OPTION)
View Full Code Here

   
    public static JComponent demo() {
        String datafile = "/amazon.txt";
        Table data = null;
        try {
            data = (new DelimitedTextTableReader()).readTable(datafile);
            data.addColumn("image","CONCAT('/images/',id,'.01.MZZZZZZZ.jpg')");
        } catch (Exception e) {
            e.printStackTrace();
            System.exit(1);
        }
View Full Code Here

TOP

Related Classes of prefuse.data.io.DelimitedTextTableReader

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.