Package prefuse.data.column

Examples of prefuse.data.column.Column


     * @param field the data field to check
     * @return true if the {@link #setString(int, String, String)} method can
     * safely be used for the given field, false otherwise.
     */
    public final boolean canSetString(String field) {
        Column col = getColumn(field);
        return ( col==null ? false : col.canSetString() );
    }
View Full Code Here


     * @return true if the data field can return primitive <code>Date</code>
     * values, false otherwise. If true, the {@link #getDate(int, String)}
     * method can be used safely.
     */
    public final boolean canGetDate(String field) {
        Column col = getColumn(field);
        return ( col==null ? false : col.canGetDate() );
    }
View Full Code Here

     * @param field the data field to check
     * @return true if the {@link #setDate(int, String, Date)} method can
     * safely be used for the given field, false otherwise.
     */
    public final boolean canSetDate(String field) {
        Column col = getColumn(field);
        return ( col==null ? false : col.canSetDate() );
    }
View Full Code Here

    protected void filterColumns() {
        if ( m_parent == null ) return;
       
        for ( int i=0; i<m_pnames.size(); ++i ) {
            String name = (String)m_pnames.get(i);
            Column col = m_parent.getColumn(name);
            boolean contained = m_names.contains(name);
            boolean removedFromParent = (col == null);
            if (removedFromParent || !m_colFilter.include(col, name) || contained ) {
                m_pnames.remove(i--);
                if ( !contained ) {
                    ((ColumnEntry)m_entries.get(name)).dispose();
                    m_entries.remove(name);
                }
               
                // fire notification
                fireTableEvent(m_rows.getMinimumRow(),
                               m_rows.getMaximumRow(),
                               i, EventConstants.DELETE);
            }
        }
       
        m_pnames.clear();

        Iterator pcols = m_parent.getColumnNames();
        for ( int i=0, j=m_columns.size(); pcols.hasNext(); ++i ) {
            String name = (String)pcols.next();
            Column col  = m_parent.getColumn(i);
           
            if ( m_colFilter.include(col, name) && !m_names.contains(name) ) {
                m_pnames.add(name);
                ColumnEntry entry = (ColumnEntry)m_entries.get(name);
                if ( entry == null ) {
View Full Code Here

    /*
     * Test method for 'edu.berkeley.guir.prefuse.data.Table.getColumn()'
     */
    public void testGetColumn() {
        for ( int c=0; c<NCOLS; ++c ) {
            Column col1 = t.getColumn(c);
            Column col2 = t.getColumn(HEADERS[c]);
            assertEquals(col1, col2);
        }
    }
View Full Code Here

        String[] names = { "polygon", "boolean" };
        Class[]  types = { GeneralPath.class, boolean.class };
       
        for ( int i=0; i < names.length; ++i ) {
            t.addColumn(names[i], types[i]);
            Column col = t.getColumn(names[i]);
            assertTrue(col.getRowCount() >= t.getRowCount());
            assertTrue(col.canSet(types[i]));
            assertFalse(col.canSet(Math.class));
           
            assertEquals(NCOLS+i+1, t.getColumnCount());
            assertEquals(types[i], t.getColumnType(names[i]));
        }
    }
View Full Code Here

TOP

Related Classes of prefuse.data.column.Column

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.