Examples of TextArea


Examples of com.vaadin.ui.TextArea

    @Override
    public void setup() {
        Label label = new Label(
                "Test of calculation of cursor position of TextArea");
        TextArea textArea = new TextArea();
        addListener(textArea);
        addComponent(label);
        addComponent(textArea);
        addComponent(cursorPosition);
        cursorPosition.setValue("?");
View Full Code Here

Examples of com.vaadin.ui.TextArea

public class TextDisappearsOnBlur extends TestBase {

    @Override
    protected void setup() {
        TextArea ta = new TextArea();
        addComponent(ta);

        // All three are required for the bug to manifest
        ta.setMaxLength(50);
        ta.setImmediate(true);
        ta.setRequired(true);
    }
View Full Code Here

Examples of com.vaadin.ui.TextArea

        to.addListener(inputEventListener);
        to.setTextChangeEventMode(TextChangeEventMode.TIMEOUT);
        to.setTextChangeTimeout(3000);
        getLayout().addComponent(to);

        TextArea ta = new TextArea("Default text area");
        ta.addListener(inputEventListener);
        getLayout().addComponent(ta);

        VaadinDeveloperNameField vd = new VaadinDeveloperNameField();
        vd.addListener(inputEventListener);
        getLayout().addComponent(vd);
View Full Code Here

Examples of com.vaadin.ui.TextArea

        ts = new Accordion();
        ts.setSizeFull();
        ts.setWidth("300px");

        TextArea l = new TextArea("DSFS");
        l.setRows(2);
        l.setStyleName("red");
        l.setSizeFull();
        ts.addTab(l, "100% h component", null);

        Label testContent = new Label(
                "TabSheet by default uses caption, icon, errors etc. from Components. ");

        testContent.setCaption("Introduction to test");

        ts.addTab(testContent);

        // main.addComponent(ts);

        ts = new Accordion();
        ts.setSizeFull();
        ts.setHeight("200px");
        ts.setWidth("300px");

        l = new TextArea("DSFS");
        l.setRows(2);
        l.setStyleName("red");
        l.setSizeFull();
        ts.addTab(l, "200px h component", null);

        testContent = new Label(
                "TabSheet by default uses caption, icon, errors etc. from Components. ");

        testContent.setCaption("Introduction to test");

        ts.addTab(testContent);

        main.addComponent(ts);

        ts = new Accordion();
        ts.setSizeFull();
        ts.setHeight("50%");
        ts.setWidth("300px");

        l = new TextArea("DSFS");
        l.setRows(2);
        l.setStyleName("red");
        l.setSizeFull();
        ts.addTab(l, "50% h component", null);

        testContent = new Label(
                "TabSheet by default uses caption, icon, errors etc. from Components. ");
View Full Code Here

Examples of com.vaadin.ui.TextArea

        // Spacer between toolbar and text
        panelContent.addComponent(new Label("<hr/>", ContentMode.HTML));

        // The text to edit
        TextArea textLabel = new TextArea(null, text);
        textLabel.setWidth("100%");
        textLabel.setHeight("200px");

        // IMPORTANT: We are here setting the style name of the label, we are
        // going to use this in our injected styles to target the label
        textLabel.setStyleName("text-label");

        panelContent.addComponent(textLabel);

        return editor;
    }
View Full Code Here

Examples of com.vaadin.ui.TextArea

        tree.addItem("Item 1");
        fields.add(tree);
        fields.add(new TwinColSelect());
        fields.add(new PasswordField());
        fields.add(new TextField());
        fields.add(new TextArea());
        fields.add(new RichTextArea());
        fields.add(new CheckBox());
        fields.add(new Slider());

        clearTabIndexes.click();
View Full Code Here

Examples of com.vaadin.ui.TextArea

    protected void init(VaadinRequest request) {
        final VerticalLayout layout = new VerticalLayout();
        layout.setMargin(true);
        setContent(layout);

        final TextArea message = new TextArea("",
                "The system is going down for maintenance in 10 minutes");
        layout.addComponent(message);

        final Button button = new Button("Broadcast");
        layout.addComponent(button);
        button.addClickListener(new Button.ClickListener() {
            @Override
            public void buttonClick(ClickEvent event) {
                Broadcaster.broadcast(message.getValue());
            }
        });

        // Register broadcast listener
        Broadcaster.register(this);
View Full Code Here

Examples of com.vaadin.ui.TextArea

        Label hello = new Label(
                "<span class='hello'>Hello</span> <span class='world'>world</span>",
                ContentMode.HTML);
        addComponent(hello);

        final TextArea cssToInject = new TextArea();
        cssToInject.setImmediate(true);
        addComponent(cssToInject);

        Button inject = new Button("Inject!", new Button.ClickListener() {

            @Override
            public void buttonClick(ClickEvent event) {
                stylesheet.add(cssToInject.getValue());
                cssToInject.setValue("");
            }
        });
        addComponent(inject);

        Button injectRandom = new Button("Inject as resource!",
                new Button.ClickListener() {

                    @Override
                    public void buttonClick(ClickEvent event) {

                        final String css = cssToInject.getValue();

                        stylesheet.add(new StreamResource(
                                new StreamResource.StreamSource() {

                                    @Override
                                    public InputStream getStream() {
                                        return new ByteArrayInputStream(css
                                                .getBytes());
                                    }
                                }, UUID.randomUUID().toString() + ".css"));

                        cssToInject.setValue("");
                    }
                });
        addComponent(injectRandom);

        addComponent(new Button("Inject initial again!",
View Full Code Here

Examples of com.vaadin.ui.TextArea

@Push
public class SendMultibyteCharacters extends AbstractTestUI {

    @Override
    protected void setup(VaadinRequest request) {
        TextArea textArea = new TextArea();
        textArea.setImmediate(true);

        addComponent(textArea);
    }
View Full Code Here

Examples of com.vaadin.ui.TextArea

        // ol.setWidth("500px");
        ol.setMargin(true);
        ol.setSpacing(true);
        ol.setWidth("");
        ol.setCaption("Dynamic width and dynamic height");
        TextArea tf;

        tf = new TextArea("100% high TextField");
        tf.setCaption(null);
        tf.setRequired(true);
        tf.setValue("100% high Field");
        tf.setHeight("100%");
        tf.setWidth("100px");
        tf.setRows(2);
        ol.addComponent(tf);

        tf = new TextArea("100% high TextField");
        tf.setCaption("100% high TextField");
        tf.setRequired(true);
        tf.setValue("100% high Field");
        tf.setHeight("100%");
        tf.setWidth("100px");
        tf.setRows(2);
        ol.addComponent(tf);

        for (int i = 1; i < 4; i++) {
            int w = i * 100;
            tf = new TextArea("Field " + i);
            tf.setRows(2);
            tf.setValue(w + "px high, " + w + "px wide TextField, valign: "
                    + valignName[i % 3]);
            tf.setWidth(w + "px");
            tf.setHeight(w + "px");
            ol.addComponent(tf);
            if (i % 3 == 0) {
                ol.setComponentAlignment(tf, Alignment.TOP_LEFT);
            } else if (i % 3 == 1) {
                ol.setComponentAlignment(tf, Alignment.MIDDLE_LEFT);
            } else {
                ol.setComponentAlignment(tf, Alignment.BOTTOM_LEFT);
            }

        }

        tf = new TextArea("100% high TextField");
        tf.setValue("100% high 100px wide");
        tf.setRows(2);
        tf.setHeight("100%");
        tf.setWidth("100px");
        ol.addComponent(tf);
        return ol;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.