List of usage examples for com.google.gwt.dom.client TextAreaElement as
public static TextAreaElement as(Element elem)
From source file:bz.davide.dmweb.shared.view.TextAreaView.java
License:Open Source License
public void setText(String value) { if (AbstractHtmlElementView.clientSide) { TextAreaElement.as(this.getElement()).setValue(value); } else {/*w w w . j a v a 2s .c o m*/ this.setElementAttribute("value", value); } }
From source file:bz.davide.dmweb.shared.view.TextAreaView.java
License:Open Source License
public String getValue() { return TextAreaElement.as(this.getElement()).getValue(); }
From source file:com.dianaui.universal.core.client.ui.TextArea.java
License:Apache License
/** * This constructor may be used by subclasses to explicitly use an existing * element. This element must be a <textarea> element. * * @param element the element to be used *///ww w . j av a2s.c om protected TextArea(final Element element) { super(element.<Element>cast()); TextAreaElement.as(element); element.addClassName(Styles.FORM_CONTROL); }
From source file:com.github.gwtbootstrap.client.ui.TextArea.java
License:Apache License
/** * This constructor may be used by subclasses to explicitly use an existing * element. This element must be a <textarea> element. * // www .ja va2 s.c o m * @param element * the element to be used */ protected TextArea(Element element) { super(element.<Element>cast()); TextAreaElement.as(element); }
From source file:fr.putnami.pwt.core.widget.client.InputTextArea.java
License:Open Source License
@Override public int getMaxLength() { String maxLengthAtt = TextAreaElement.as(this.getElement()).getAttribute("maxLength"); if (maxLengthAtt != null && maxLengthAtt.length() > 0) { return Integer.valueOf(maxLengthAtt); }// w w w . ja v a2 s .c om return -1; }
From source file:fr.putnami.pwt.core.widget.client.InputTextArea.java
License:Open Source License
public void setRows(int rows) { this.rows = rows; TextAreaElement.as(this.getElement()).setRows(rows); }
From source file:fr.putnami.pwt.core.widget.client.InputTextArea.java
License:Open Source License
public int setRows() { return TextAreaElement.as(this.getElement()).getRows(); }
From source file:org.geomajas.codemirror.client.CodeMirrorWrapper.java
License:Open Source License
/** * Convenience method creating a new GWT object wrapping the TextAreaElement with given id. * @param id/*w ww .ja v a2 s . c om*/ * @param config * @return CodeMirrorWrapper */ public static CodeMirrorWrapper fromTextArea(String id, Config config) { return fromTextArea(TextAreaElement.as(Document.get().getElementById(id)), config); }
From source file:org.primordion.xholon.io.console.XholonConsole.java
License:Open Source License
/** * Get the contents of the command, as typed in by the user into the XholonConsole GUI. * @return The String typed in by the user, or only the selected part of the String. *//* w w w .j a v a 2s.c o m*/ protected String getCommand() { /*JTextPane jTextPane = (JTextPane)commandPane.getVal_Object(); String contents = jTextPane.getSelectedText(); if (contents == null) { contents = jTextPane.getText(); }*/ Element ele = commandPane.getElement().getFirstChildElement(); //consoleLog(ele); // pre //String contents = ele.getInnerText(); // textarea TextAreaElement ta = TextAreaElement.as(ele); String contents = ta.getValue(); //consoleLog(contents); return contents; }
From source file:org.primordion.xholon.io.console.XholonConsole.java
License:Open Source License
/** * Set the result of the query into the XholonConsole GUI, * and make it visible to the user.//from w w w. j a v a 2 s.c o m * For now, the resultPane and commandPane are the same. * @param result * @param replace whether to replace current text (true), or append to end of current text (false) */ public void setResult(String result, boolean replace) { //Window.alert(result); // get the element Element ele = commandPane.getElement().getFirstChildElement(); // <pre> //ele.setInnerText(ele.getInnerText() + result); // these leave the escaped chars in the text //ele.setInnerHTML(ele.getInnerHTML() + result); //ele.setInnerText(ele.getInnerText() + SafeHtmlUtils.htmlEscape(result)); // textarea TextAreaElement ta = TextAreaElement.as(ele); if (replace) { ta.setValue(result); } else { ta.setValue(ta.getValue() + result); } // optionally scroll to the bottom of the text area if (isTerminalEnabled()) { ta.setScrollTop(ta.getScrollHeight()); } }