com.google.gwt.dom.client.Element.getLastChild()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(6.0k)|赞(0)|评价(0)|浏览(243)

本文整理了Java中com.google.gwt.dom.client.Element.getLastChild()方法的一些代码示例,展示了Element.getLastChild()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Element.getLastChild()方法的具体详情如下:
包路径:com.google.gwt.dom.client.Element
类名称:Element
方法名:getLastChild

Element.getLastChild介绍

暂无

代码示例

代码示例来源:origin: com.google.gwt/gwt-servlet

  1. /**
  2. * Resize the column group element.
  3. *
  4. * @param columns the number of columns
  5. * @param growOnly true to only grow, false to shrink if needed
  6. */
  7. void resizeColumnGroup(int columns, boolean growOnly) {
  8. // The colgroup should always have at least one element. See
  9. // prepareColumnGroup() for more details.
  10. columns = Math.max(columns, 1);
  11. int num = columnGroup.getChildCount();
  12. if (num < columns) {
  13. for (int i = num; i < columns; i++) {
  14. columnGroup.appendChild(Document.get().createColElement());
  15. }
  16. } else if (!growOnly && num > columns) {
  17. for (int i = num; i > columns; i--) {
  18. columnGroup.removeChild(columnGroup.getLastChild());
  19. }
  20. }
  21. }

代码示例来源:origin: com.vaadin.external.gwt/gwt-user

  1. /**
  2. * Resize the column group element.
  3. *
  4. * @param columns the number of columns
  5. * @param growOnly true to only grow, false to shrink if needed
  6. */
  7. void resizeColumnGroup(int columns, boolean growOnly) {
  8. // The colgroup should always have at least one element. See
  9. // prepareColumnGroup() for more details.
  10. columns = Math.max(columns, 1);
  11. int num = columnGroup.getChildCount();
  12. if (num < columns) {
  13. for (int i = num; i < columns; i++) {
  14. columnGroup.appendChild(Document.get().createColElement());
  15. }
  16. } else if (!growOnly && num > columns) {
  17. for (int i = num; i > columns; i--) {
  18. columnGroup.removeChild(columnGroup.getLastChild());
  19. }
  20. }
  21. }

代码示例来源:origin: net.wetheinter/gwt-user

  1. /**
  2. * Resize the column group element.
  3. *
  4. * @param columns the number of columns
  5. * @param growOnly true to only grow, false to shrink if needed
  6. */
  7. void resizeColumnGroup(int columns, boolean growOnly) {
  8. // The colgroup should always have at least one element. See
  9. // prepareColumnGroup() for more details.
  10. columns = Math.max(columns, 1);
  11. int num = columnGroup.getChildCount();
  12. if (num < columns) {
  13. for (int i = num; i < columns; i++) {
  14. columnGroup.appendChild(Document.get().createColElement());
  15. }
  16. } else if (!growOnly && num > columns) {
  17. for (int i = num; i > columns; i--) {
  18. columnGroup.removeChild(columnGroup.getLastChild());
  19. }
  20. }
  21. }

代码示例来源:origin: org.eclipse.che.core/che-core-ide-ui

  1. container.insertFirst(renderNode(child, 0));
  2. } else if (index == getNodeStorage().getRootCount() - event.getNodes().size()) {
  3. com.google.gwt.dom.client.Node lastChild = container.getLastChild();
  4. container.insertAfter(renderNode(child, 0), lastChild);
  5. } else {
  6. container.insertFirst(renderNode(child, parentDepth));
  7. } else if (index == parentChildCount - event.getNodes().size()) {
  8. com.google.gwt.dom.client.Node lastChild = container.getLastChild();
  9. container.insertAfter(renderNode(child, parentDepth), lastChild);
  10. } else {

代码示例来源:origin: org.eclipse.che.core/che-core-ide-app

  1. divElement.setClassName(treeStyles.treeStylesCss().vcsHeadContainer());
  2. divElement.setId("git.reference.name");
  3. nodeContainer.insertBefore(divElement, nodeContainer.getLastChild());

代码示例来源:origin: apache/incubator-wave

  1. protected void assertStructure(ContentElement e,
  2. ContentElement parent, ContentNode prev, ContentNode next,
  3. ContentNode first, ContentNode last) {
  4. assertStructure(e, parent, prev, next);
  5. assertSame(first, c.getFirstChild(e));
  6. assertSame(last, c.getLastChild(e));
  7. assertSame(first == null ? null : first.getImplNodelet(), e.getImplNodelet().getFirstChild());
  8. assertSame(last == null ? null : last.getImplNodelet(), e.getImplNodelet().getLastChild());
  9. }

代码示例来源:origin: SwellRT/swellrt

  1. protected void assertStructure(ContentElement e,
  2. ContentElement parent, ContentNode prev, ContentNode next,
  3. ContentNode first, ContentNode last) {
  4. assertStructure(e, parent, prev, next);
  5. assertSame(first, c.getFirstChild(e));
  6. assertSame(last, c.getLastChild(e));
  7. assertSame(first == null ? null : first.getImplNodelet(), e.getImplNodelet().getFirstChild());
  8. assertSame(last == null ? null : last.getImplNodelet(), e.getImplNodelet().getLastChild());
  9. }

代码示例来源:origin: SwellRT/swellrt

  1. public void testWrapperElementPointToNodeletPoint() {
  2. ContentDocument dom = TestEditors.createTestDocument();
  3. c = dom.debugGetRawDocument();
  4. ContentElement root = c.getDocumentElement();
  5. m = dom.getContext().rendering().getNodeManager();
  6. Element rootNodelet = root.getImplNodelet();
  7. // meta element, null impl nodelet
  8. ContentElement n1 = c.createElement("m", root, null);
  9. n1.setImplNodelets(null, null);
  10. // regular node
  11. ContentNode n2 = c.createElement("a", root, null);
  12. // basic check
  13. assertSame(null, m.wrapperElementPointToNodeletPoint(
  14. Point.<ContentNode>end(root)).getNodeAfter());
  15. // check left-biasing
  16. rootNodelet.appendChild(Document.get().createBRElement());
  17. assertSame(rootNodelet.getLastChild(), m.wrapperElementPointToNodeletPoint(
  18. Point.<ContentNode>end(root)).getNodeAfter());
  19. // basic check
  20. assertSame(n2.getImplNodelet(), m.wrapperElementPointToNodeletPoint(
  21. Point.inElement(root, n2)).getNodeAfter());
  22. // search-rightwards for next impl nodelet check (n1 has null impl nodelet)
  23. assertSame(n2.getImplNodelet(), m.wrapperElementPointToNodeletPoint(
  24. Point.<ContentNode>inElement(root, n1)).getNodeAfter());
  25. }

代码示例来源:origin: apache/incubator-wave

  1. public void testWrapperElementPointToNodeletPoint() {
  2. ContentDocument dom = TestEditors.createTestDocument();
  3. c = dom.debugGetRawDocument();
  4. ContentElement root = c.getDocumentElement();
  5. m = dom.getContext().rendering().getNodeManager();
  6. Element rootNodelet = root.getImplNodelet();
  7. // meta element, null impl nodelet
  8. ContentElement n1 = c.createElement("m", root, null);
  9. n1.setImplNodelets(null, null);
  10. // regular node
  11. ContentNode n2 = c.createElement("a", root, null);
  12. // basic check
  13. assertSame(null, m.wrapperElementPointToNodeletPoint(
  14. Point.<ContentNode>end(root)).getNodeAfter());
  15. // check left-biasing
  16. rootNodelet.appendChild(Document.get().createBRElement());
  17. assertSame(rootNodelet.getLastChild(), m.wrapperElementPointToNodeletPoint(
  18. Point.<ContentNode>end(root)).getNodeAfter());
  19. // basic check
  20. assertSame(n2.getImplNodelet(), m.wrapperElementPointToNodeletPoint(
  21. Point.inElement(root, n2)).getNodeAfter());
  22. // search-rightwards for next impl nodelet check (n1 has null impl nodelet)
  23. assertSame(n2.getImplNodelet(), m.wrapperElementPointToNodeletPoint(
  24. Point.<ContentNode>inElement(root, n1)).getNodeAfter());
  25. }

相关文章

Element类方法