本文整理了Java中com.google.gwt.dom.client.Element.getLastChild()
方法的一些代码示例,展示了Element.getLastChild()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Element.getLastChild()
方法的具体详情如下:
包路径:com.google.gwt.dom.client.Element
类名称:Element
方法名:getLastChild
暂无
代码示例来源:origin: com.google.gwt/gwt-servlet
/**
* Resize the column group element.
*
* @param columns the number of columns
* @param growOnly true to only grow, false to shrink if needed
*/
void resizeColumnGroup(int columns, boolean growOnly) {
// The colgroup should always have at least one element. See
// prepareColumnGroup() for more details.
columns = Math.max(columns, 1);
int num = columnGroup.getChildCount();
if (num < columns) {
for (int i = num; i < columns; i++) {
columnGroup.appendChild(Document.get().createColElement());
}
} else if (!growOnly && num > columns) {
for (int i = num; i > columns; i--) {
columnGroup.removeChild(columnGroup.getLastChild());
}
}
}
代码示例来源:origin: com.vaadin.external.gwt/gwt-user
/**
* Resize the column group element.
*
* @param columns the number of columns
* @param growOnly true to only grow, false to shrink if needed
*/
void resizeColumnGroup(int columns, boolean growOnly) {
// The colgroup should always have at least one element. See
// prepareColumnGroup() for more details.
columns = Math.max(columns, 1);
int num = columnGroup.getChildCount();
if (num < columns) {
for (int i = num; i < columns; i++) {
columnGroup.appendChild(Document.get().createColElement());
}
} else if (!growOnly && num > columns) {
for (int i = num; i > columns; i--) {
columnGroup.removeChild(columnGroup.getLastChild());
}
}
}
代码示例来源:origin: net.wetheinter/gwt-user
/**
* Resize the column group element.
*
* @param columns the number of columns
* @param growOnly true to only grow, false to shrink if needed
*/
void resizeColumnGroup(int columns, boolean growOnly) {
// The colgroup should always have at least one element. See
// prepareColumnGroup() for more details.
columns = Math.max(columns, 1);
int num = columnGroup.getChildCount();
if (num < columns) {
for (int i = num; i < columns; i++) {
columnGroup.appendChild(Document.get().createColElement());
}
} else if (!growOnly && num > columns) {
for (int i = num; i > columns; i--) {
columnGroup.removeChild(columnGroup.getLastChild());
}
}
}
代码示例来源:origin: org.eclipse.che.core/che-core-ide-ui
container.insertFirst(renderNode(child, 0));
} else if (index == getNodeStorage().getRootCount() - event.getNodes().size()) {
com.google.gwt.dom.client.Node lastChild = container.getLastChild();
container.insertAfter(renderNode(child, 0), lastChild);
} else {
container.insertFirst(renderNode(child, parentDepth));
} else if (index == parentChildCount - event.getNodes().size()) {
com.google.gwt.dom.client.Node lastChild = container.getLastChild();
container.insertAfter(renderNode(child, parentDepth), lastChild);
} else {
代码示例来源:origin: org.eclipse.che.core/che-core-ide-app
divElement.setClassName(treeStyles.treeStylesCss().vcsHeadContainer());
divElement.setId("git.reference.name");
nodeContainer.insertBefore(divElement, nodeContainer.getLastChild());
代码示例来源:origin: apache/incubator-wave
protected void assertStructure(ContentElement e,
ContentElement parent, ContentNode prev, ContentNode next,
ContentNode first, ContentNode last) {
assertStructure(e, parent, prev, next);
assertSame(first, c.getFirstChild(e));
assertSame(last, c.getLastChild(e));
assertSame(first == null ? null : first.getImplNodelet(), e.getImplNodelet().getFirstChild());
assertSame(last == null ? null : last.getImplNodelet(), e.getImplNodelet().getLastChild());
}
代码示例来源:origin: SwellRT/swellrt
protected void assertStructure(ContentElement e,
ContentElement parent, ContentNode prev, ContentNode next,
ContentNode first, ContentNode last) {
assertStructure(e, parent, prev, next);
assertSame(first, c.getFirstChild(e));
assertSame(last, c.getLastChild(e));
assertSame(first == null ? null : first.getImplNodelet(), e.getImplNodelet().getFirstChild());
assertSame(last == null ? null : last.getImplNodelet(), e.getImplNodelet().getLastChild());
}
代码示例来源:origin: SwellRT/swellrt
public void testWrapperElementPointToNodeletPoint() {
ContentDocument dom = TestEditors.createTestDocument();
c = dom.debugGetRawDocument();
ContentElement root = c.getDocumentElement();
m = dom.getContext().rendering().getNodeManager();
Element rootNodelet = root.getImplNodelet();
// meta element, null impl nodelet
ContentElement n1 = c.createElement("m", root, null);
n1.setImplNodelets(null, null);
// regular node
ContentNode n2 = c.createElement("a", root, null);
// basic check
assertSame(null, m.wrapperElementPointToNodeletPoint(
Point.<ContentNode>end(root)).getNodeAfter());
// check left-biasing
rootNodelet.appendChild(Document.get().createBRElement());
assertSame(rootNodelet.getLastChild(), m.wrapperElementPointToNodeletPoint(
Point.<ContentNode>end(root)).getNodeAfter());
// basic check
assertSame(n2.getImplNodelet(), m.wrapperElementPointToNodeletPoint(
Point.inElement(root, n2)).getNodeAfter());
// search-rightwards for next impl nodelet check (n1 has null impl nodelet)
assertSame(n2.getImplNodelet(), m.wrapperElementPointToNodeletPoint(
Point.<ContentNode>inElement(root, n1)).getNodeAfter());
}
代码示例来源:origin: apache/incubator-wave
public void testWrapperElementPointToNodeletPoint() {
ContentDocument dom = TestEditors.createTestDocument();
c = dom.debugGetRawDocument();
ContentElement root = c.getDocumentElement();
m = dom.getContext().rendering().getNodeManager();
Element rootNodelet = root.getImplNodelet();
// meta element, null impl nodelet
ContentElement n1 = c.createElement("m", root, null);
n1.setImplNodelets(null, null);
// regular node
ContentNode n2 = c.createElement("a", root, null);
// basic check
assertSame(null, m.wrapperElementPointToNodeletPoint(
Point.<ContentNode>end(root)).getNodeAfter());
// check left-biasing
rootNodelet.appendChild(Document.get().createBRElement());
assertSame(rootNodelet.getLastChild(), m.wrapperElementPointToNodeletPoint(
Point.<ContentNode>end(root)).getNodeAfter());
// basic check
assertSame(n2.getImplNodelet(), m.wrapperElementPointToNodeletPoint(
Point.inElement(root, n2)).getNodeAfter());
// search-rightwards for next impl nodelet check (n1 has null impl nodelet)
assertSame(n2.getImplNodelet(), m.wrapperElementPointToNodeletPoint(
Point.<ContentNode>inElement(root, n1)).getNodeAfter());
}
内容来源于网络,如有侵权,请联系作者删除!