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

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


                NO_CTRL));

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

        CellSelectionEvent event = (CellSelectionEvent) listener
                .getReceivedEvents().get(0);
        assertEquals(1, event.getColumnPosition());
        assertEquals(5, event.getRowPosition());
    }
View Full Code Here


        nattable.addLayerListener(new ILayerListener() {

            // Default selection behavior selects cells by default.
            public void handleLayerEvent(ILayerEvent event) {
                if (event instanceof CellSelectionEvent) {
                    CellSelectionEvent cellEvent = (CellSelectionEvent) event;
                    log("Selected cell: ["
                            + cellEvent.getRowPosition()
                            + ", "
                            + cellEvent.getColumnPosition()
                            + "], "
                            + nattable.getDataValueByPosition(
                                    cellEvent.getColumnPosition(),
                                    cellEvent.getRowPosition()));
                }
            }
        });

        // Events are fired whenever selection occurs. These can be use to
View Full Code Here

    public void fireCellSelectionEvent(int columnPosition, int rowPosition,
            boolean forcingEntireCellIntoViewport, boolean withShiftMask,
            boolean withControlMask) {

        final CellSelectionEvent selectionEvent = new CellSelectionEvent(this,
                columnPosition, rowPosition, withShiftMask, withControlMask);
        fireLayerEvent(selectionEvent);
    }
View Full Code Here

            // Default selection behavior selects cells by default.
            @Override
            public void handleLayerEvent(ILayerEvent event) {
                if (event instanceof CellSelectionEvent) {
                    CellSelectionEvent cellEvent = (CellSelectionEvent) event;
                    log("Selected cell: ["
                            + cellEvent.getRowPosition()
                            + ", "
                            + cellEvent.getColumnPosition()
                            + "], "
                            + natTable.getDataValueByPosition(
                                    cellEvent.getColumnPosition(),
                                    cellEvent.getRowPosition()));
                } else if (event instanceof ColumnSelectionEvent) {
                    ColumnSelectionEvent columnEvent = (ColumnSelectionEvent) event;
                    log("Selected Column: "
                            + columnEvent.getColumnPositionRanges());
                } else if (event instanceof RowSelectionEvent) {
View Full Code Here

TOP

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

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.