Package prefuse.data

Examples of prefuse.data.CascadedTable$Listener


            public boolean getBoolean(Tuple t) {
                return t.getFloat(HEADERS[3]) < thresh;
            }
        };
       
        CascadedTable ft = new CascadedTable(t, p);
       
        for ( int i=0, r=0; i<NROWS; ++i ) {
            float val = ((Float)TABLE[3][i]).floatValue();
            if ( val < thresh ) {
                try {
                    for ( int c=0; c<NCOLS; ++c ) {
                        Object o1 = TABLE[c][i];
                        Object o2 = ft.get(r, HEADERS[c]);
                        assertEquals(o1, o2);
                    }
                    ++r;
                } catch ( Exception e ) {
                    fail("Caught exception: "+e);
                }
            }
        }
       
        // add an extra column to the cascaded table
        String name = "test";
        ft.addColumn(name, double.class, new Double(Math.PI));
        TableIterator iter = ft.iterator();
        while ( iter.hasNext() ) {
            int row = iter.nextInt();
            iter.setDouble(name, Math.E);
            assertTrue(Math.E == ft.getDouble(row, name));
        }
       
        int nr = t.addRow();
        t.setFloat(nr, HEADERS[3], 0.5f);
        t.setInt(nr, HEADERS[0], 77);
View Full Code Here

TOP

Related Classes of prefuse.data.CascadedTable$Listener

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.