Package com.vaadin.ui

Examples of com.vaadin.ui.TextArea


        gl.setWidth("564px");
        gl.setStyleName("borders");
        gl.setSpacing(true);
        gl.setHideEmptyRowsAndColumns(true);
        addContent(gl, 4);
        TextArea largeTextarea = new TextArea("Large textarea");
        largeTextarea.setWidth("100%");
        largeTextarea.setHeight("99%");
        gl.addComponent(largeTextarea, 0, 3, 3, 3);

        gl.addLayoutClickListener(new LayoutClickListener() {

            @Override
View Full Code Here


        setMainWindow(main);

        final VerticalLayout lo = new VerticalLayout();
        lo.setSizeUndefined();
        lo.setWidth("100%");
        TextArea tf = new TextArea();
        tf.setValue("The textfield should fill the window."
                + "\n - Try to resize window\n - Try to push REdo button");
        tf.setRows(10);
        tf.setWidth("100%");
        lo.addComponent(tf);
        Window subWin = new Window(
                "This window should initially be as wide as the caption", lo);
        main.addWindow(subWin);
        // subWin.setWidth("500px");
View Full Code Here

        createTextFieldWith("Input prompt", null, "Input prompt");
        createTextFieldWith("Small", Reindeer.TEXTFIELD_SMALL, null);
        createTextFieldWith("Big", ChameleonTheme.TEXTFIELD_BIG, null);
        createTextFieldWith("Search", ChameleonTheme.TEXTFIELD_SEARCH, null);

        TextArea ta = new TextArea();
        ta.setId("textfield" + debugIdCounter++);
        addComponent(ta);

        PasswordField pf = new PasswordField();
        pf.setId("textfield" + debugIdCounter++);
        addComponent(pf);
View Full Code Here

        role.addItem(NotificationRole.ALERT);
        role.addItem(NotificationRole.STATUS);
        role.setValue(role.getItemIds().iterator().next());
        addComponent(role);

        tf = new TextArea("Text", "Hello world");
        tf.setRows(10);
        addComponent(tf);
        type = new ComboBox();
        type.setNullSelectionAllowed(false);
        type.addContainerProperty(CAPTION, String.class, "");
View Full Code Here

        });

        captionField = createTextField("Caption");
        final TextField whereField = createTextField("Where");
        final TextArea descriptionField = createTextArea("Description");
        descriptionField.setRows(3);

        final ComboBox styleNameField = createStyleNameComboBox();

        formLayout.addComponent(startDateField);
        formLayout.addComponent(endDateField);
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

        VerticalLayout layout = new VerticalLayout();
        p.setContent(layout);
        layout.setSizeFull();

        for (int i = 0; i < COMPONENTS; i++) {
            TextArea tf = new TextArea();
            if (r.nextBoolean()) {
                tf.setCaption("Caption");
            }
            if (r.nextBoolean()) {
                tf.setRequired(true);
            }
            if (r.nextBoolean()) {
                tf.setComponentError(new UserError("Error"));
            }

            tf.setRows(2);
            tf.setSizeFull();

            layout.setComponentAlignment(tf, Alignment.BOTTOM_LEFT);
            layout.addComponent(tf);

        }
View Full Code Here

        panel.setHeight("100%");
        panel.setStyleName(Reindeer.PANEL_LIGHT);

        panelLayout.setCaption("Content caption");

        TextArea textArea = new TextArea("TextArea caption");
        textArea.setWidth("300px");
        textArea.setHeight("500px");
        panelLayout.addComponent(textArea);

        getLayout().addComponent(actions);
        getLayout().addComponent(panel);
        getLayout().setExpandRatio(panel, 1);
View Full Code Here

            // Setup top layout with controls and fields
            HorizontalLayout topLayout = new HorizontalLayout();
            topLayout.setSpacing(true);

            // Foobar Content
            final TextArea smsContent = new TextArea("Foobar Content");
            topLayout.addComponent(smsContent);
            topLayout.setExpandRatio(smsContent, 1);
            smsContent.setRows(3);
            smsContent.setColumns(40);
            // topLayout.setWidth("100%");
            this.addComponent(topLayout);

            // Foobar phone #
            final TextField smsNumber = new TextField("Foobar Phone #");
View Full Code Here

        ol.setSpacing(true);

        // ol.setWidth("");
        ol.setCaption("OverFilled with fixed width (" + ol.getWidth()
                + "px) and fixed height (" + ol.getHeight() + "px)");
        TextArea tf;

        for (int i = 0; i < 5; i++) {
            tf = new TextArea("200x200px Field");
            tf.setCaption("This one has a caption");
            tf.setValue("200x200 TextField");
            tf.setWidth("200px");
            tf.setHeight("200px");
            tf.setRequired(true);
            // tf.setComponentError(new UserError("It's broken!"));

            // tf.setHeight("100%");
            // tf.setWidth("100px");
            tf.setRows(2);
            ol.addComponent(tf);
        }

        return ol;
    }
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.