Examples of XGridControl


Examples of com.sun.star.awt.grid.XGridControl

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

        // some cursor traveling
        final XGridControl gridControl = UnoRuntime.queryInterface( XGridControl.class, control );
        gridControl.goToCell( 0, 0 );
        assertEquals( "wrong 'current column' (1)", 0, gridControl.getCurrentColumn() );
        assertEquals( "wrong 'current row' (1)", 0, gridControl.getCurrentRow() );
        gridControl.goToCell( columnCount - 1, rowCount - 1 );
        assertEquals( "wrong 'current column' (2)", dataModel.getColumnCount() - 1, gridControl.getCurrentColumn() );
        assertEquals( "wrong 'current row' (2)", dataModel.getRowCount() - 1, gridControl.getCurrentRow() );

        // removing the last column, while the active cell is in this very last column, is expected to adjust
        // the active cell
        columnModel.removeColumn( columnCount - 1 );
        assertEquals( "removed the last and active column, active column was not adjusted!",
            columnCount - 2, gridControl.getCurrentColumn() );
        // same holds for rows
        dataModel.removeRow( rowCount - 1 );
        assertEquals( "removed the last and active row, active row was not adjusted!",
            rowCount - 2, gridControl.getCurrentRow() );
    }
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.