Examples of TextArea


Examples of com.vaadin.ui.TextArea

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

Examples of com.vaadin.ui.TextArea

        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

Examples of com.vaadin.ui.TextArea

        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

Examples of com.vaadin.ui.TextArea

        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

Examples of com.vaadin.ui.TextArea

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

Examples of com.vaadin.ui.TextArea

    @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

Examples of com.vaadin.ui.TextArea

            Window dialog = new Window("Dialog - width defined by content",
                    layout);
            layout.setHeight(null);
            layout.setWidth("100%");

            TextArea ta = new TextArea();
            ta.setValue("The textfield should fill the window (except margins)."
                    + "\n - Try to resize the window\n");
            ta.setRows(5);
            ta.setWidth("100%");
            layout.addComponent(ta);

            dialog.setPositionX(20);
            dialog.setPositionY(100);
            getMainWindow().addWindow(dialog);
        }

        {
            VerticalLayout layout = new VerticalLayout();
            layout.setMargin(true);
            Window dialog = new Window("Dialog - size defined by content",
                    layout);
            layout.setHeight("100%");
            layout.setWidth("100%");

            TextArea ta = new TextArea();
            ta.setValue("The textfield should fill the window (except margins)."
                    + "\n - Try to resize the window\n");
            ta.setWidth("100%");
            ta.setHeight("100%");
            ta.setRows(5);
            layout.addComponent(ta);

            dialog.setPositionX(20);
            dialog.setPositionY(300);
            getMainWindow().addWindow(dialog);
View Full Code Here

Examples of com.vaadin.ui.TextArea

    @Override
    public void setup() {
        HorizontalLayout layout = new HorizontalLayout();

        TextArea area1 = new TextArea("Wrapping");
        area1.setWordwrap(true); // The default
        area1.setValue(LoremIpsum.get(50) + "\n" + "Another row");

        final TextArea area2 = new TextArea("Nonwrapping");
        area2.setWordwrap(false);
        area2.setValue(LoremIpsum.get(50) + "\n" + "Another row");

        layout.addComponent(area1);
        layout.addComponent(area2);
        layout.setSpacing(true);

        addComponent(layout);

        CheckBox onoff = new CheckBox("Wrap state for the right field");
        onoff.setValue(false);
        onoff.addListener(new Property.ValueChangeListener() {
            @Override
            public void valueChange(ValueChangeEvent event) {
                boolean wrap = (Boolean) event.getProperty().getValue();
                area2.setWordwrap(wrap);
                if (wrap) {
                    area2.setCaption("Wrapping");
                } else {
                    area2.setCaption("Nonwrapping");
                }

            }
        });
        onoff.setImmediate(true);
View Full Code Here

Examples of com.vaadin.ui.TextArea

        final Label pollIndicator = new Label();
        pollIndicator.setId("pollIndicator");

        final TextField textField = new TextField("height");

        final TextArea textArea = new TextArea();
        textArea.setHeight(TEXTAREAHEIGHT + "px");
        textArea.setWidth(TEXTAREAWIDTH + "px");
        textArea.setValue("This is a text.");

        Button button = new Button("Change Height", new ClickListener() {

            @Override
            public void buttonClick(ClickEvent event) {

                textArea.setHeight(textField.getValue());
            }
        });

        addComponent(layout);
View Full Code Here

Examples of com.vaadin.ui.TextArea

    private TextArea textArea;
    private int position;

    @Override
    protected void setup() {
        textArea = new TextArea();
        textArea.setValue("saddddddddddd     fdgdfgfdgfd\n"
                + "aasddddddddddd\n" + "dsaffffffdsf\n" + "sdf\n"
                + "dsfsdfsdfsdfsd\n\n" + "ffffffffffffffffffff\n"
                + "sdfdsfdsfsdfsdfsd  xxxxxxxxxxxxxxxx\n" + "sdgfsd\n"
                + "dsf\n" + "ds\n" + "fds\n" + "fds\nfs");
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.