Package org.eclipse.nebula.widgets.nattable.search.strategy

Examples of org.eclipse.nebula.widgets.nattable.search.strategy.ColumnSearchStrategy


    }

    @Test
    public void shouldAccessCellsInSelectedColumn() {
        // Choose three columns for searching
        ColumnSearchStrategy columnSearchStrategy = new ColumnSearchStrategy(
                new int[] { 2, 5, 8 }, configRegistry);
        columnSearchStrategy
                .setComparator(new CellValueAsStringComparator<Comparable<String>>());
        PositionCoordinate[] cellsToSearch = columnSearchStrategy
                .getColumnCellsToSearch(layer);

        PositionCoordinate cell = cellsToSearch[0];
        Assert.assertEquals(2, cell.columnPosition);
        cell = cellsToSearch[5];
View Full Code Here


        Assert.assertEquals(15, cellsToSearch.length);
    }

    @Test
    public void shouldSearchAllBodyCellsForColumnInSelection() {
        ColumnSearchStrategy columnSearchStrategy = new ColumnSearchStrategy(
                new int[] { 2, 5, 8 }, configRegistry);
        columnSearchStrategy
                .setComparator(new CellValueAsStringComparator<Comparable<String>>());
        columnSearchStrategy.setContextLayer(layer);
        PositionCoordinate cell = columnSearchStrategy.executeSearch("[2,2]");
        Assert.assertEquals(2, cell.getColumnPosition());
        Assert.assertEquals(2, cell.getRowPosition());
    }
View Full Code Here

TOP

Related Classes of org.eclipse.nebula.widgets.nattable.search.strategy.ColumnSearchStrategy

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.