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 "";
}
}