Example usage for com.vaadin.ui AbstractField setSizeFull

List of usage examples for com.vaadin.ui AbstractField setSizeFull

Introduction

In this page you can find the example usage for com.vaadin.ui AbstractField setSizeFull.

Prototype

@Override
    public void setSizeFull() 

Source Link

Usage

From source file:org.vaadin.tori.component.AuthoringComponent.java

License:Apache License

private AbstractField<String> buildEditor() {
    AbstractField<String> result = null;
    if (Page.getCurrent().getWebBrowser().isAndroid()) {
        result = new TextArea();
    } else {// ww  w  .  j av  a 2  s .com
        result = new BBCodeWysiwygEditor(true, true);

        result.addValueChangeListener(new ValueChangeListener() {
            @Override
            public void valueChange(final ValueChangeEvent event) {
                if (!ignoreInputChanges) {
                    listener.inputValueChanged(editor.getValue());
                }
            }
        });

        ((BBCodeWysiwygEditor) result).addBlurListener(new BlurListener() {
            @Override
            public void blur(final BlurEvent event) {
                UI.getCurrent().setPollInterval(ToriUI.DEFAULT_POLL_INTERVAL);
            }
        });

        ((BBCodeWysiwygEditor) result).addFocusListener(new FocusListener() {
            @Override
            public void focus(final FocusEvent event) {
                UI.getCurrent().setPollInterval(3000);
            }
        });
    }
    result.setSizeFull();
    return result;
}