/** * {@inheritDoc} */ @Override public void setText(final String txt) { text.setData(txt); }
/** * {@inheritDoc} */ @Override public void setText(final String txt) { text.setData(txt); }
/** * {@inheritDoc} */ @Override public void setText(final String txt) { text.setData(txt); }
/** * {@inheritDoc} */ @Override public void setText(final String txt) { text.setData(txt); }
/** * The character data of the node that implements this interface. The DOM * implementation may not put arbitrary limits on the amount of data * that may be stored in a <code>CharacterData</code> node. However, * implementation limits may mean that the entirety of a node's data may * not fit into a single <code>DOMString</code>. In such cases, the user * may call <code>substringData</code> to retrieve the data in * appropriately sized pieces. * @exception DOMException * NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly. */ public final void setData(String value) throws JavaScriptException { ((Text)ot.cast()).setData(value); };
/** * The character data of the node that implements this interface. The DOM * implementation may not put arbitrary limits on the amount of data * that may be stored in a <code>CharacterData</code> node. However, * implementation limits may mean that the entirety of a node's data may * not fit into a single <code>DOMString</code>. In such cases, the user * may call <code>substringData</code> to retrieve the data in * appropriately sized pieces. * @exception DOMException * NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly. */ public final void setData(String value) throws JavaScriptException { ((Text)ot.cast()).setData(value); };
public static Text newText(String data, Document ownerDocument) { Text text = newNode(Node.TEXT_NODE).cast(); JavaScriptObjects.setProperty(text, JsoProperties.NODE_OWNER_DOCUMENT, ownerDocument); text.setData(data); return text; }
public static Text newText(String data, Document ownerDocument) { Text text = newNode(Node.TEXT_NODE).cast(); JavaScriptObjects.setProperty(text, JsoProperties.NODE_OWNER_DOCUMENT, ownerDocument); text.setData(data); return text; }
@PatchMethod static void setNodeValue(Node node, String nodeValue) { switch (node.getNodeType()) { case Node.DOCUMENT_NODE: // nothing to do break; case Node.ELEMENT_NODE: // nothing to do break; case Node.TEXT_NODE: Text text = node.cast(); text.setData(nodeValue); break; } }
@PatchMethod static void setNodeValue(Node node, String nodeValue) { switch (node.getNodeType()) { case Node.DOCUMENT_NODE: // nothing to do break; case Node.ELEMENT_NODE: // nothing to do break; case Node.TEXT_NODE: Text text = node.cast(); text.setData(nodeValue); break; } }
@PatchMethod static JavaScriptObject createCDATASection(JavaScriptObject jsObject, String data) { Document document = jsObject.cast(); Text text = JsoUtils.newNode(com.google.gwt.xml.client.Node.CDATA_SECTION_NODE).cast(); JavaScriptObjects.setProperty(text, JsoProperties.NODE_OWNER_DOCUMENT, document); text.setData(data); return text; }
@PatchMethod static JavaScriptObject createCDATASection(JavaScriptObject jsObject, String data) { Document document = jsObject.cast(); Text text = JsoUtils.newNode(com.google.gwt.xml.client.Node.CDATA_SECTION_NODE).cast(); JavaScriptObjects.setProperty(text, JsoProperties.NODE_OWNER_DOCUMENT, document); text.setData(data); return text; }
@PatchMethod static void setNodeValue(JavaScriptObject jsObject, String nodeValue) { Node n = jsObject.cast(); switch (n.getNodeType()) { case Node.TEXT_NODE: Text text = n.cast(); text.setData(nodeValue); break; case Node.ELEMENT_NODE: Element element = n.cast(); element.setInnerText(nodeValue); break; case Node.DOCUMENT_NODE: // nothing to do break; } }
@PatchMethod static void setNodeValue(JavaScriptObject jsObject, String nodeValue) { Node n = jsObject.cast(); switch (n.getNodeType()) { case Node.TEXT_NODE: Text text = n.cast(); text.setData(nodeValue); break; case Node.ELEMENT_NODE: Element element = n.cast(); element.setInnerText(nodeValue); break; case Node.DOCUMENT_NODE: // nothing to do break; } }
styleText.<Text>cast().setData(styleText.<Text>cast().getData() + " ");
styleText.<Text>cast().setData(styleText.<Text>cast().getData() + " ");
public void testRepairsWherePossible() throws HtmlInserted, HtmlMissing { ContentDocument dom = TestEditors.createTestDocument(); c = dom.debugGetRawDocument(); ContentElement root = c.getDocumentElement(); m = dom.getContext().rendering().getNodeManager(); // TODO(danilatos): Expand this and other test cases String s1 = "some text", s2 = "other writings", s3 = "more information"; ContentTextNode t1 = c.createTextNode(s1, root, null); Text n1 = t1.getImplNodelet(), n1b; n1b = n1.splitText(1); n1b.setData(s1); n1.removeFromParent(); try { m.findTextWrapper(n1b, false); fail("Expected exception when not repairing"); } catch (HtmlInserted e) { } catch (HtmlMissing e) { } checkWrapper(t1, n1b, true); }
public void testRepairsWherePossible() throws HtmlInserted, HtmlMissing { ContentDocument dom = TestEditors.createTestDocument(); c = dom.debugGetRawDocument(); ContentElement root = c.getDocumentElement(); m = dom.getContext().rendering().getNodeManager(); // TODO(danilatos): Expand this and other test cases String s1 = "some text", s2 = "other writings", s3 = "more information"; ContentTextNode t1 = c.createTextNode(s1, root, null); Text n1 = t1.getImplNodelet(), n1b; n1b = n1.splitText(1); n1b.setData(s1); n1.removeFromParent(); try { m.findTextWrapper(n1b, false); fail("Expected exception when not repairing"); } catch (HtmlInserted e) { } catch (HtmlMissing e) { } checkWrapper(t1, n1b, true); }