Package com.sun.star.awt.grid

Examples of com.sun.star.awt.grid.XMutableGridDataModel.addRow()


        test.cleanup();

        // a somehwat less straight-forward test: the data model is expected to implicitly increase its column count
        // when you add a row which has more columns than currently known
        final XMutableGridDataModel dataModel = DefaultGridDataModel.create( m_context );
        dataModel.addRow( 0, new Object[] { 1 } );
        assertEquals( "unexpected column count after adding the most simple row", 1, dataModel.getColumnCount() );
        dataModel.addRow( 1, new Object[] { 1, 2 } );
        assertEquals( "implicit extension of the column count doesn't work", 2, dataModel.getColumnCount() );
    }
View Full Code Here


        // a somehwat less straight-forward test: the data model is expected to implicitly increase its column count
        // when you add a row which has more columns than currently known
        final XMutableGridDataModel dataModel = DefaultGridDataModel.create( m_context );
        dataModel.addRow( 0, new Object[] { 1 } );
        assertEquals( "unexpected column count after adding the most simple row", 1, dataModel.getColumnCount() );
        dataModel.addRow( 1, new Object[] { 1, 2 } );
        assertEquals( "implicit extension of the column count doesn't work", 2, dataModel.getColumnCount() );
    }

    // -----------------------------------------------------------------------------------------------------------------
    @Test
View Full Code Here

        assertNotNull( columnModel );
        assertEquals( 0, columnModel.getColumnCount() );

        final int columnCount = 3;
        final int rowCount = 2;
        dataModel.addRow( null, new Object[] { 1, 2, 3 } );
        dataModel.addRow( null, new Object[] { 6, 5, 4 } );

        assertEquals( columnCount, dataModel.getColumnCount() );
        assertEquals( columnCount, columnModel.getColumnCount() );
View Full Code Here

        assertEquals( 0, columnModel.getColumnCount() );

        final int columnCount = 3;
        final int rowCount = 2;
        dataModel.addRow( null, new Object[] { 1, 2, 3 } );
        dataModel.addRow( null, new Object[] { 6, 5, 4 } );

        assertEquals( columnCount, dataModel.getColumnCount() );
        assertEquals( columnCount, columnModel.getColumnCount() );

        // some cursor traveling
View Full Code Here

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.