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

Examples of org.eclipse.nebula.widgets.nattable.selection.event.RowSelectionEvent


                NO_CTRL));

        assertEquals(1, listener.getEventsCount());
        assertTrue(listener.containsInstanceOf(RowSelectionEvent.class));

        RowSelectionEvent event = (RowSelectionEvent) listener
                .getReceivedEvents().get(0);
        assertEquals(5, event.getRowPositionRanges().iterator().next().start);
        assertEquals(6, event.getRowPositionRanges().iterator().next().end);

        // Select additional rows with shift
        nattable.doCommand(new SelectRowsCommand(nattable, 5, 7, WITH_SHIFT,
                NO_CTRL));
        assertEquals(2, listener.getEventsCount());
        assertTrue(listener.containsInstanceOf(RowSelectionEvent.class));

        event = (RowSelectionEvent) listener.getReceivedEvents().get(1);
        assertEquals(1, event.getRowPositionRanges().size());

        assertEquals(5, event.getRowPositionRanges().iterator().next().start);
        assertEquals(8, event.getRowPositionRanges().iterator().next().end);
    }
View Full Code Here


        for (Range range : changedRowRanges) {
            for (int i = range.start; i < range.end; i++) {
                changedRows.add(Integer.valueOf(i));
            }
        }
        selectionLayer.fireLayerEvent(new RowSelectionEvent(selectionLayer,
                changedRows, rowPositionToMoveIntoViewport));
    }
View Full Code Here

        // the backing data from the IRowDataProvider. Example:
        // rowDataProvider.getRowObject(natTable.getRowIndexByPosition(selectedRowPosition));
        nattable.addLayerListener(new ILayerListener() {
            public void handleLayerEvent(ILayerEvent event) {
                if (event instanceof RowSelectionEvent) {
                    RowSelectionEvent rowEvent = (RowSelectionEvent) event;
                    log("Selected Row: "
                            + ObjectUtils.toString(rowEvent
                                    .getRowPositionRanges()));
                }
            }
        });
View Full Code Here

        for (Range range : changedRowRanges) {
            for (int i = range.start; i < range.end; i++) {
                changedRows.add(Integer.valueOf(i));
            }
        }
        selectionLayer.fireLayerEvent(new RowSelectionEvent(selectionLayer,
                changedRows, rowPositionToMoveIntoViewport));
    }
View Full Code Here

TOP

Related Classes of org.eclipse.nebula.widgets.nattable.selection.event.RowSelectionEvent

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.