You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

ContainerComponent.java 677B

1234567891011121314151617181920212223242526
  1. package com.itmill.toolkit.terminal.gwt.client.ui;
  2. import com.google.gwt.xml.client.Node;
  3. import com.google.gwt.xml.client.NodeList;
  4. import com.itmill.toolkit.terminal.gwt.client.Client;
  5. abstract class ContainerComponent extends Component {
  6. public ContainerComponent(int id, Client c) {
  7. super(id, c);
  8. }
  9. abstract void appendChild(Component c);
  10. public void renderChildNodes(Node n, Client cli) {
  11. NodeList children = n.getChildNodes();
  12. for(int i = 0; i < children.getLength(); i++) {
  13. Node child = children.item(i);
  14. if(Component.isComponent(child.getNodeName())) {
  15. Component c = Component.createComponent(child, cli);
  16. c.appendTo(this);
  17. }
  18. }
  19. }
  20. }