Package org.eclipse.nebula.widgets.nattable.reorder.event

Examples of org.eclipse.nebula.widgets.nattable.reorder.event.ColumnReorderEvent


        final Set<Rectangle> expectedPositions = new HashSet<Rectangle>();
        expectedPositions.add(new Rectangle(0, 0, 20, 20));

        reorderLayer.addLayerListener(new ILayerListener() {
            public void handleLayerEvent(ILayerEvent event) {
                ColumnReorderEvent multiReorder = (ColumnReorderEvent) event;
                assertTrue(multiReorder.getChangedPositionRectangles()
                        .containsAll(expectedPositions));
            }
        });

        // Reorder to beginning of grid
View Full Code Here


        final Set<Rectangle> expectedPositions = new HashSet<Rectangle>();
        expectedPositions.add(new Rectangle(0, 0, 20, 20));

        reorderLayer.addLayerListener(new ILayerListener() {
            public void handleLayerEvent(ILayerEvent event) {
                ColumnReorderEvent multiReorder = (ColumnReorderEvent) event;
                assertTrue(multiReorder.getChangedPositionRectangles()
                        .containsAll(expectedPositions));
            }
        });

        // Reorder from beginning of grid
View Full Code Here

    /**
     * - - - + before: 0 1 2 3 4 5 6 7 8 after: 0 1 5 6 2 3 4 7 8 - + + +
     */
    @Test
    public void testReorderRightColumnDiffs() {
        event = new ColumnReorderEvent(dataLayer, Arrays.asList(new Integer[] {
                2, 3, 4 }), 7, true);

        Collection<StructuralDiff> columnDiffs = event.getColumnDiffs();
        Assert.assertNotNull(columnDiffs);
        Assert.assertEquals(2, columnDiffs.size());
View Full Code Here

    /**
     * - - - + before: 0 1 2 3 4 5 6 7 8 after: 0 1 5 6 2 3 4 7 8 - + + +
     */
    @Test
    public void testReorderRightConvertToLocal() {
        event = new ColumnReorderEvent(dataLayer, Arrays.asList(new Integer[] {
                2, 3, 4 }), 7, true);
        event.convertToLocal(viewportLayer);

        Collection<StructuralDiff> columnDiffs = event.getColumnDiffs();
        Assert.assertNotNull(columnDiffs);
View Full Code Here

     * + - - - before: 0 1 2 3 4 5 6 7 8 9 10 after: 0 1 7 8 9 2 3 4 5 6 10 + +
     * + -
     */
    @Test
    public void testReorderLeftColumnDiffs() {
        event = new ColumnReorderEvent(dataLayer, Arrays.asList(new Integer[] {
                7, 8, 9 }), 2, true);

        Collection<StructuralDiff> columnDiffs = event.getColumnDiffs();
        Assert.assertNotNull(columnDiffs);
        Assert.assertEquals(2, columnDiffs.size());
View Full Code Here

     * + - - - before: 0 1 2 3 4 5 6 7 8 9 10 after: 0 1 7 8 9 2 3 4 5 6 10 + +
     * + -
     */
    @Test
    public void testReorderLeftConvertToLocal() {
        event = new ColumnReorderEvent(dataLayer, Arrays.asList(new Integer[] {
                7, 8, 9 }), 2, true);
        event.convertToLocal(viewportLayer);

        Collection<StructuralDiff> columnDiffs = event.getColumnDiffs();
        Assert.assertNotNull(columnDiffs);
View Full Code Here

    }

    public void reorderColumnPosition(int fromColumnPosition,
            int toColumnPosition, boolean reorderToLeftEdge) {
        moveColumn(fromColumnPosition, toColumnPosition, reorderToLeftEdge);
        fireLayerEvent(new ColumnReorderEvent(this, fromColumnPosition,
                toColumnPosition, reorderToLeftEdge));
    }
View Full Code Here

                moveColumn(fromColumnPositionInt, targetColumnPosition++,
                        reorderToLeftEdge);
            }
        }

        fireLayerEvent(new ColumnReorderEvent(this, fromColumnPositions,
                toColumnPosition, reorderToLeftEdge));
    }
View Full Code Here

TOP

Related Classes of org.eclipse.nebula.widgets.nattable.reorder.event.ColumnReorderEvent

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.