本文整理了Java中com.google.gwt.user.client.Element.getChildNodes()
方法的一些代码示例,展示了Element.getChildNodes()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Element.getChildNodes()
方法的具体详情如下:
包路径:com.google.gwt.user.client.Element
类名称:Element
方法名:getChildNodes
暂无
代码示例来源:origin: com.googlecode.gwt-test-utils/gwt-test-utils
@PatchMethod
static int getDOMRowCount(HTMLTable table, com.google.gwt.user.client.Element element) {
return element.getChildNodes().getLength();
}
代码示例来源:origin: com.extjs/gxt
/**
* Inserts the child element as the last child.
*
* @param child the element to insert
* @return this
*/
public El insertLast(Element child) {
int idx = dom.getChildNodes().getLength();
insertChild(child, idx);
return this;
}
代码示例来源:origin: org.kuali.student.core/ks-common-ui
@Override
public void clear() {
super.clear();
for (int i = 0; i < listElement.getChildNodes().getLength(); i++) {
listElement.removeChild(listElement.getChildNodes().getItem(i));
}
}
代码示例来源:origin: com.extjs/gxt
/**
* Returns the group elements.
*/
@SuppressWarnings({"unchecked", "rawtypes"})
public NodeList<Element> getGroups() {
if (!enableGrouping) {
return new JsArray().getJsObject().cast();
}
return (NodeList) mainBody.dom.getChildNodes();
}
代码示例来源:origin: com.extjs/gxt
public Element getJointElement(TreeNode node) {
if (node.joint == null) {
node.joint = ((NodeList<Element>) getElementContainer(node).getChildNodes().cast()).getItem(1);
}
return node.joint;
}
代码示例来源:origin: com.googlecode.gwt-test-utils/gwt-test-utils
@PatchMethod
static Element getRow(RowFormatter rowFormatter, Element elem, int row) {
return elem.getChildNodes().getItem(row).cast();
}
代码示例来源:origin: org.kuali.student.core/ks-common-ui
@Override
public boolean remove(Widget w) {
int widgetIndex = super.getWidgetIndex(w);
super.remove(w);
listElement.removeChild(listElement.getChildNodes().getItem(widgetIndex));
return true;
}
代码示例来源:origin: gwt-test-utils/gwt-test-utils
@PatchMethod
static int getDOMCellCount(HTMLTable table, com.google.gwt.user.client.Element element, int row) {
return element.getChildNodes().getItem(row).getChildNodes().getLength();
}
代码示例来源:origin: com.extjs/gxt
public Element getTextElement(TreeNode node) {
if (node.text == null) {
node.text = getElementContainer(node) != null
? ((NodeList<Element>) getElementContainer(node).getChildNodes().cast()).getItem(4) : null;
}
return node.text;
}
代码示例来源:origin: com.extjs/gxt
protected void cleanup(El row) {
NodeList<Node> cn = row.dom.getChildNodes();
for (int i = cn.getLength() - 1; i >= 0; i--) {
Element td = (Element) cn.getItem(i);
if (!td.hasChildNodes()) {
row.dom.removeChild(td);
}
}
}
代码示例来源:origin: com.extjs/gxt
public Element getCheckElement(TreeNode node) {
if (node.check == null) {
node.check = getElementContainer(node) != null
? ((NodeList<Element>) getElementContainer(node).getChildNodes().cast()).getItem(2) : null;
}
return node.check;
}
代码示例来源:origin: com.extjs/gxt
public Element getIconElement(TreeNode node) {
if (node.icon == null) {
node.icon = getElementContainer(node) != null
? ((NodeList<Element>) getElementContainer(node).getChildNodes().cast()).getItem(3) : null;
}
return node.icon;
}
代码示例来源:origin: com.googlecode.gwt-test-utils/gwt-test-utils
@PatchMethod
static int getDOMCellCount(HTMLTable table, com.google.gwt.user.client.Element element, int row) {
return element.getChildNodes().getItem(row).getChildNodes().getLength();
}
代码示例来源:origin: com.extjs/gxt
protected NodeList<Element> getRows() {
if (!hasRows()) {
return new JsArray().getJsObject().cast();
}
return mainBody.dom.getChildNodes().cast();
}
代码示例来源:origin: com.extjs/gxt
protected void cleanup(El target) {
NodeList<Node> cn = target.dom.getChildNodes();
for (int i = cn.getLength() - 1; i >= 0; i--) {
if (!cn.getItem(i).hasChildNodes()) {
target.dom.removeChild(cn.getItem(i));
}
}
}
代码示例来源:origin: org.eclipse.che.core/che-core-ide-app
@Override
public String getText() {
String text = "";
NodeList<Node> nodes = consoleLines.getElement().getChildNodes();
for (int i = 0; i < nodes.getLength(); i++) {
Node node = nodes.getItem(i);
Element element = node.cast();
text += element.getInnerText() + "\r\n";
}
return text;
}
代码示例来源:origin: stephenh/tessell
@Override
public void remove(final String text) {
final NodeList<Node> nodes = getElement().getChildNodes();
for (int i = 0; i < nodes.getLength(); i++) {
final Node node = nodes.getItem(i);
if (Element.is(node)) {
final Element element = Element.as(node);
if (element.getInnerText().equals(text)) {
getElement().removeChild(node);
break;
}
}
}
}
代码示例来源:origin: stephenh/tessell
@Override
public void clear() {
final NodeList<Node> nodes = getElement().getChildNodes();
for (int i = 0; i < nodes.getLength(); i++) {
final Node node = nodes.getItem(i);
if (Element.is(node)) {
getElement().removeChild(node);
}
}
}
代码示例来源:origin: stephenh/tessell
@Override
public String remove(final int index) {
final Node node = getElement().getChildNodes().getItem(index);
if (Element.is(node)) {
final Element element = Element.as(node);
getElement().removeChild(node);
return element.getInnerText();
} else {
return null;
}
}
代码示例来源:origin: com.extjs/gxt
protected Element insertCell(Component c, El side, int pos) {
Element td = DOM.createTD();
td.setClassName("x-toolbar-cell");
td.setAttribute("role", "presentation");
Element point;
if (pos >= side.dom.getChildNodes().getLength()) {
point = null;
} else {
point = side.getChild(pos) != null ? side.getChild(pos).dom : null;
}
side.insertBefore(td, point);
return td;
}
内容来源于网络,如有侵权,请联系作者删除!