Package org.gwtoolbox.widget.client.form.editor

Source Code of org.gwtoolbox.widget.client.form.editor.LongTextEditor

package org.gwtoolbox.widget.client.form.editor;

import com.google.gwt.user.client.ui.TextArea;

/**
* @author Uri Boness
*/
public class LongTextEditor extends AbstractFocusWidgetEditor<String, TextArea> {

    public LongTextEditor() {
        this(new TextArea());
    }

    public LongTextEditor(TextArea textArea) {
        this(textArea, "", true);
    }

    public LongTextEditor(String defaultText) {
        this(defaultText, true);
    }

    public LongTextEditor(boolean enabled) {
        this("", enabled);
    }

    public LongTextEditor(String defaultText, boolean enabled) {
        this(new TextArea(), defaultText, enabled);
    }

    protected LongTextEditor(TextArea textArea, String defaultText, boolean enabled) {
        super(textArea, defaultText, enabled);
        getWidget().setStylePrimaryName("LongTextEditor");
    }

    public String doGetValue() {
        return getWidget().getText();
    }

    public void doSetValue(String text) {
        getWidget().setText(text);
    }

    protected String getNullValue() {
        return "";
    }

}
TOP

Related Classes of org.gwtoolbox.widget.client.form.editor.LongTextEditor

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.