Package com.vaadin.tests.util

Examples of com.vaadin.tests.util.Log


        });
        layout.addComponent(l);
        layout.addComponent(b);

        getMainWindow().addWindow(centered);
        log = new Log(5);
        addComponent(log);
        getMainWindow().addListener(new ClickListener() {

            @Override
            public void click(ClickEvent event) {
View Full Code Here


        final Table tbl = new Table("", createDataSource());
        tbl.setImmediate(true);
        tbl.setColumnCollapsingAllowed(true);

        log = new Log(5);

        controls.addComponent(new Button("Fixed size (200x200)",
                new Button.ClickListener() {
                    @Override
                    public void buttonClick(ClickEvent event) {
View Full Code Here

public class TextFieldInputPromptAndClickShortcut extends TestBase {

    @Override
    protected void setup() {
        final Log log = new Log(5);

        final TextField textField = new TextField();
        Button button = new Button("Show Text", new ClickListener() {
            @Override
            public void buttonClick(ClickEvent event) {
                log.log("Field value: " + textField.getValue());
            }
        });
        button.setClickShortcut(KeyCode.ESCAPE);

        final CheckBox inputPromptSelection = new CheckBox("Input prompt");
        inputPromptSelection.setImmediate(true);
        inputPromptSelection.addListener(new ValueChangeListener() {
            @Override
            public void valueChange(ValueChangeEvent event) {
                if (event.getProperty().getValue() == Boolean.TRUE) {
                    textField.setInputPrompt("Input prompt");
                } else {
                    textField.setInputPrompt(null);
                }
                log.log("Set input prompt: " + textField.getInputPrompt());
            }
        });
        inputPromptSelection.setImmediate(true);

        addComponent(textField);
View Full Code Here

            log.setCaption(null);
        }
    }

    private void createLog() {
        log = new Log(5).setNumberLogRows(true);
        log.setData(log.getCaption());
        log.setStyleName(BaseTheme.CLIP);
        getLayout().addComponent(log, 1);
    }
View Full Code Here

        }
    }

    @Override
    protected void setup() {
        final Log log = new Log(5);
        addComponent(log);

        final BeanItemContainer<Person> container = new BeanItemContainer<Person>(
                Person.class, Arrays.asList(new Person("Joe"), new Person(
                        "William"), new Person("Jack"), new Person("Averell"),
                        new Person("Bob"), new Person("Grat"), new Person(
                                "Bill"), new Person("Emmett")));
        final Table table = new Table("Table", container);
        table.setSelectable(true);
        table.setMultiSelect(true);
        table.setImmediate(true);
        addComponent(table);

        Button showButton = new Button("Show selection");
        showButton.addListener(new Button.ClickListener() {
            @Override
            public void buttonClick(Button.ClickEvent clickEvent) {
                Collection<?> selection = (Collection<?>) table.getValue();
                log.log("Selection: " + selection);
            }
        });
        addComponent(showButton);

        Button removeButton = new Button("Remove selection");
View Full Code Here

    private BackgroundLogger logger = null;

    @Override
    protected void setup(VaadinRequest request) {
        log = new Log(20);
        log.setNumberLogRows(true);
        TextField pollingInterval = new TextField("Poll interval",
                new MethodProperty<Integer>(this, "pollInterval"));
        pollingInterval.setImmediate(true);
        pollingInterval.setValue("-1");
View Full Code Here

        edit.addItem("Paste", this);
        mb.addItem("Help", this);

        addComponent(mb);

        log = new Log(5);
        addComponent(log);
    }
View Full Code Here

            }

        });
        form.getFooter().addComponent(printState);

        log = new Log(7);
        log.log("Test app started");
        printState();

        addComponent(form);
        addComponent(log);
View Full Code Here

@SuppressWarnings("serial")
public class TreeFocusGaining extends TestBase {

    @Override
    protected void setup() {
        final Log log = new Log(5);

        TextField textField = new TextField(
                "My value should get to server when tree is clicked");
        addComponent(textField);
        textField.addListener(new Property.ValueChangeListener() {

            @Override
            public void valueChange(ValueChangeEvent event) {
                log.log("TF value now:" + event.getProperty().getValue());
            }
        });

        Tree tree = new Tree("Simple selectable tree (immediate)");
        tree.addItem("Item1");
        addComponent(tree);
        tree.addListener(new Property.ValueChangeListener() {

            @Override
            public void valueChange(ValueChangeEvent event) {
                log.log("Tree value now:" + event.getProperty().getValue());
            }
        });
        tree.setImmediate(true);

        tree = new Tree("Simple tree with itemm click listener");
        tree.addItem("Item1");
        tree.addListener(new ItemClickEvent.ItemClickListener() {
            @Override
            public void itemClick(ItemClickEvent event) {
                log.log("Item click event");
            }
        });
        addComponent(tree);

        addComponent(log);
View Full Code Here

    }

    @Override
    protected void setup() {
        addComponent(new Label("<br/><br/>", ContentMode.HTML));
        log = new Log(8);
        addComponent(log);
        df = new MyDateField();
        df.setId("DateField");
        df.setRequired(true);
        df.setLocale(new Locale("fi", "FI"));
View Full Code Here

TOP

Related Classes of com.vaadin.tests.util.Log

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.