Package com.vaadin.tests.widgetset.server

Examples of com.vaadin.tests.widgetset.server.RoundTripTester


@Widgetset(TestingWidgetSet.NAME)
public class RoundTripTest extends AbstractTestUI {

    @Override
    protected void setup(VaadinRequest request) {
        final RoundTripTester roundTripTester = new RoundTripTester();
        final TextField payloadSize = new TextField("Payload size (bytes)");
        payloadSize.setConverter(Integer.class);
        payloadSize.setConvertedValue(10000);
        if (request.getParameter("payload") != null) {
            payloadSize.setValue(request.getParameter("payload"));
        }
        addComponent(payloadSize);
        final TextField testDuration = new TextField("Test duration (ms)");
        testDuration.setConverter(Integer.class);
        testDuration.setConvertedValue(10000);
        addComponent(testDuration);
        if (request.getParameter("duration") != null) {
            testDuration.setValue(request.getParameter("duration"));
        }

        Button start = new Button("Start test");
        start.addClickListener(new ClickListener() {

            @Override
            public void buttonClick(ClickEvent event) {
                roundTripTester.start(
                        (Integer) testDuration.getConvertedValue(),
                        (Integer) payloadSize.getConvertedValue());
            }
        });
        addComponent(roundTripTester);
View Full Code Here

TOP

Related Classes of com.vaadin.tests.widgetset.server.RoundTripTester

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.