Package com.vaadin.ui

Examples of com.vaadin.ui.TextArea


    }

    private void createUI(AbstractOrderedLayout layout) {
        layout.setSizeFull();

        TextArea tf = new TextArea();
        tf.setCaption("A text field");
        tf.setSizeFull();
        tf.setRows(2);

        layout.addComponent(tf);
    }
View Full Code Here


        captionField = createTextField("Caption");
        captionField.setInputPrompt("Event name");
        captionField.setRequired(true);
        final TextField whereField = createTextField("Where");
        whereField.setInputPrompt("Address or location");
        final TextArea descriptionField = createTextArea("Description");
        descriptionField.setInputPrompt("Describe the event");
        descriptionField.setRows(3);
        // descriptionField.setRequired(true);

        final ComboBox styleNameField = createStyleNameComboBox();
        styleNameField.setInputPrompt("Choose calendar");
        styleNameField.setTextInputAllowed(false);
View Full Code Here

        f.setNullRepresentation("");
        return f;
    }

    private TextArea createTextArea(String caption) {
        TextArea f = new TextArea(caption);
        f.setNullRepresentation("");
        return f;
    }
View Full Code Here

        });

        mainWin.addComponent(tx);
        mainWin.addComponent(b);

        final TextArea tx2 = new TextArea(
                "Textfield with maxlenght 10, multirow ");
        mainWin.addComponent(tx2);
        tx2.setImmediate(true);
        tx2.setRows(5);
        tx2.setMaxLength(10);

        Button b2 = new Button("Check value");
        b2.addListener(new Button.ClickListener() {

            @Override
            public void buttonClick(ClickEvent event) {
                l.setValue("Length: " + tx2.getValue().toString().length()
                        + " Content: " + tx2.getValue());
            }
        });

        mainWin.addComponent(tx);
        mainWin.addComponent(b);
View Full Code Here

public class OverriddenDecendants extends AbstractTestUI {

    @Override
    protected void setup(VaadinRequest request) {

        TextArea normalTextArea = new TextArea();
        normalTextArea.setRows(10);
        normalTextArea.setWordwrap(true);

        getLayout().addComponent(normalTextArea);

        // @DelegateToWidget will not work with overridden state in connector
        SuperTextArea superTextArea = new SuperTextArea();
View Full Code Here

        p.setHeight("500px");
        layout.setSizeFull();

        w.addComponent(p);

        tf1 = new TextArea();
        tf1.setRows(5);
        tf1.setSizeFull();
        tf1.setValue(contents);
        tf1.setCaption("TextField caption");
        layout.addComponent(tf1);

        /*
         *
         * OrderedLayout
         */

        VerticalLayout layout2 = new VerticalLayout();
        Panel p2 = new Panel(layout2);
        p2.setCaption("OrderedLayout");
        p2.setWidth("500px");
        p2.setHeight("500px");
        layout2.setSizeFull();

        w.addComponent(p2);

        tf2 = new TextArea();
        tf2.setRows(5);
        tf2.setSizeFull();
        tf2.setValue(contents);
        tf2.setCaption("TextField caption");
        layout2.addComponent(tf2);

        /*
         *
         * GridLayout
         */

        VerticalLayout p3l = new VerticalLayout();
        p3l.setMargin(true);
        Panel p3 = new Panel(p3l);
        p3.setCaption("GridLayout");
        p3.setWidth("500px");
        p3.setHeight("500px");
        // p3.setContent(new GridLayout());
        p3l.setSizeFull();
        p3l.setMargin(false);

        GridLayout gl = new GridLayout();
        gl.setSizeFull();
        gl.setMargin(false);
        p3l.addComponent(gl);
        w.addComponent(p3);

        tf3 = new TextArea();
        tf3.setRows(5);
        tf3.setSizeFull();
        tf3.setValue(contents);
        tf3.setCaption("TextField caption");
        // p3.getContent().addComponent(tf3);
View Full Code Here

        Panel contentScroller = new Panel(contentLayout);
        contentScroller.setStyleName(Reindeer.PANEL_LIGHT);
        contentScroller.setSizeFull();

        TextArea performanceReportArea = new TextArea();
        performanceReportArea.setWidth("200px");
        TestUtils.installPerformanceReporting(performanceReportArea);

        VerticalLayout leftBar = new VerticalLayout();
        leftBar.setSizeUndefined();
        leftBar.addComponent(new Label("This is the left bar"));
View Full Code Here

        content = new Label("Full-sized Label");
        content.setSizeFull();
        addDnDPanel(content);

        content = new TextArea(null, "200x100px TextArea");
        content.setWidth("200px");
        content.setHeight("100px");
        addDnDPanel(content);
    }
View Full Code Here

public class DragAndDropFocusObtain extends AbstractTestUI {

    @Override
    protected void setup(VaadinRequest request) {
        VerticalLayout dndLayout = new VerticalLayout();
        TextArea area = new TextArea();
        area.setValue("text");
        dndLayout.addComponent(area);

        DragAndDropWrapper wrapper = new DragAndDropWrapper(dndLayout);
        wrapper.setDragStartMode(DragStartMode.COMPONENT);
        addComponent(wrapper);
View Full Code Here

    @Override
    protected void setup(VaadinRequest request) {
        VerticalLayout dndLayout = new VerticalLayout();

        TextArea area = new TextArea();
        area.setValue("text");

        dndLayout.addComponent(area);
        DragAndDropWrapper wrapper = new DragAndDropWrapper(dndLayout);
        wrapper.setDragStartMode(DragStartMode.WRAPPER);
        addComponent(wrapper);
View Full Code Here

TOP

Related Classes of com.vaadin.ui.TextArea

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.