Examples of handleLayerEvent()


Examples of org.eclipse.nebula.widgets.nattable.layer.event.ILayerEventHandler.handleLayerEvent()

    @SuppressWarnings({ "unchecked", "rawtypes" })
    public void handleLayerEvent(ILayerEvent event) {
        for (Class<? extends ILayerEvent> eventClass : eventHandlers.keySet()) {
            if (eventClass.isInstance(event)) {
                ILayerEventHandler eventHandler = eventHandlers.get(eventClass);
                eventHandler.handleLayerEvent(event);
            }
        }

        // Pass on the event to our parent
        if (event.convertToLocal(this)) {
View Full Code Here

Examples of org.eclipse.nebula.widgets.nattable.selection.event.SelectionLayerStructuralChangeEventHandler.handleLayerEvent()

    public void shouldClearSelectionIfASelectedRowIsModified() throws Exception {
        selectionModel.addSelection(2, 3);

        SelectionLayerStructuralChangeEventHandler handler = new SelectionLayerStructuralChangeEventHandler(
                selectionLayer);
        handler.handleLayerEvent(new RowDeleteEvent(dataLayer, 3));

        Assert.assertTrue(selectionModel.isEmpty());
    }

    @Test
View Full Code Here

Examples of org.eclipse.nebula.widgets.nattable.selection.event.SelectionLayerStructuralChangeEventHandler.handleLayerEvent()

            throws Exception {
        selectionModel.addSelection(2, 3);

        SelectionLayerStructuralChangeEventHandler handler = new SelectionLayerStructuralChangeEventHandler(
                selectionLayer);
        handler.handleLayerEvent(new RowDeleteEvent(dataLayer, 5));

        Assert.assertFalse(selectionModel.isEmpty());
        Assert.assertTrue(selectionModel.isRowPositionSelected(3));
    }
View Full Code Here

Examples of org.eclipse.nebula.widgets.nattable.selection.event.SelectionLayerStructuralChangeEventHandler.handleLayerEvent()

            throws Exception {
        selectionModel.addSelection(3, 4);

        SelectionLayerStructuralChangeEventHandler handler = new SelectionLayerStructuralChangeEventHandler(
                selectionLayer);
        handler.handleLayerEvent(new RowDeleteEvent(dataLayer, 5));

        Assert.assertFalse(selectionModel.isEmpty());
        Assert.assertTrue(selectionModel.isRowPositionSelected(4));
    }
View Full Code Here

Examples of org.eclipse.nebula.widgets.nattable.selection.event.SelectionLayerStructuralChangeEventHandler.handleLayerEvent()

    public void shouldClearSelectionIfListIsCleared() {
        selectionModel.addSelection(3, 4);

        SelectionLayerStructuralChangeEventHandler handler = new SelectionLayerStructuralChangeEventHandler(
                selectionLayer);
        handler.handleLayerEvent(new RowDeleteEvent(dataLayer, new Range(0, 9)));

        Assert.assertTrue(selectionModel.isEmpty());
    }

    @Test
View Full Code Here

Examples of org.eclipse.nebula.widgets.nattable.selection.event.SelectionLayerStructuralChangeEventHandler.handleLayerEvent()

        rows.add(5);
        rows.add(6);
        rows.add(7);
        rows.add(8);
        rows.add(9);
        handler.handleLayerEvent(new HideRowPositionsEvent(dataLayer, rows));

        Assert.assertTrue(selectionModel.isEmpty());
    }
}
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.