Package com.vaadin.ui.Component

Examples of com.vaadin.ui.Component.Listener


        EasyMock.verify(listener, errorHandler);
    }

    @Test
    public void fireEvent_multipleListenersAndException_errorHandlerCalled() {
        Listener listener2 = EasyMock.createMock(Component.Listener.class);
        router.addListener(Component.Event.class, listener2,
                COMPONENT_EVENT_METHOD);

        listener.componentEvent(EasyMock.<Component.Event> anyObject());
        EasyMock.expectLastCall().andThrow(
                new RuntimeException("listener failed"));
        errorHandler.error(EasyMock.<ErrorEvent> anyObject());
        // second listener should be called despite an error in the first
        listener2.componentEvent(EasyMock.<Component.Event> anyObject());

        EasyMock.replay(component, listener, listener2, errorHandler);
        router.fireEvent(new Component.Event(component), errorHandler);
        EasyMock.verify(listener, listener2, errorHandler);
    }
View Full Code Here


    protected void setup() {
        final StateHolder stateHolder = new StateHolder();

        // Button
        Button button = new Button("Make data source read-only");
        button.addListener(new Listener() {
            @Override
            public void componentEvent(Event event) {
                stateHolder.buttonClicked();
            }
        });
View Full Code Here

TOP

Related Classes of com.vaadin.ui.Component.Listener

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.