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

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


        assertEquals(2, listener.getEventsCount());
        assertTrue(listener.containsInstanceOf(ColumnSelectionEvent.class));
        assertTrue(listener
                .containsInstanceOf(ColumnHeaderSelectionEvent.class));

        ColumnSelectionEvent event = (ColumnSelectionEvent) listener
                .getReceivedEvents().get(0);
        assertEquals(5, event.getColumnPositionRanges().iterator().next().start);
        assertEquals(6, event.getColumnPositionRanges().iterator().next().end);
    }
View Full Code Here


        this.columnHeaderLayer = columnHeaderLayer;
    }

    public void handleLayerEvent(ILayerEvent event) {
        if (event instanceof ColumnSelectionEvent) {
            ColumnSelectionEvent selectionEvent = (ColumnSelectionEvent) event;
            ColumnHeaderSelectionEvent colHeaderSelectionEvent = new ColumnHeaderSelectionEvent(
                    columnHeaderLayer, selectionEvent.getColumnPositionRanges());
            columnHeaderLayer.fireLayerEvent(colHeaderSelectionEvent);
        }
    }
View Full Code Here

        });

        nattable.addLayerListener(new ILayerListener() {
            public void handleLayerEvent(ILayerEvent event) {
                if (event instanceof ColumnSelectionEvent) {
                    ColumnSelectionEvent columnEvent = (ColumnSelectionEvent) event;
                    log("Selected Column: "
                            + columnEvent.getColumnPositionRanges());
                }
            }
        });
    }
View Full Code Here

        }

        // Set last selected column position to the recently clicked column
        selectionLayer.setLastSelectedCell(columnPosition, rowPosition);

        selectionLayer.fireLayerEvent(new ColumnSelectionEvent(selectionLayer,
                columnPosition));
    }
View Full Code Here

                            + "], "
                            + 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) {
                    // directly ask the SelectionLayer about the selected rows
                    // and access the data via IRowDataProvider
                    Collection<Range> selections = selectionLayer
                            .getSelectedRowPositions();
View Full Code Here

TOP

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

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.