Package com.google.gwt.user.client.ui

Examples of com.google.gwt.user.client.ui.TreeItem$TreeItemImplIE6


      front = newFront;
    }
  }

  private void populateTree(Tree t, int numBranches, int numNodes, TreeType type) {
    TreeItem root = t.addItem("root");

    ArrayList front = new ArrayList();
    front.add(add(root, type));
    int count = 0;
    while (true) {
View Full Code Here


    }
  }

  private TreeItem profileAdd(TreeItem parent, TreeType type) {
    if (type == TreeType.TEXT) {
      TreeItem item = new TreeItem();
      item.setText("text");
      parent.addItem(item);
      return item;
    } else if (type == TreeType.HTML) {
      TreeItem item = new TreeItem("<h1>html</h1>");
      parent.addItem(item);
      return item;
    } else if (type == TreeType.CHECKBOX) {
      return parent.addItem(new CheckBox("myBox"));
    } else {
View Full Code Here

    }
  }

  private void profileCreateTree(Tree t, int numBranches, int numNodes,
      TreeType type) {
    TreeItem root = t.addItem("root");

    ArrayList front = new ArrayList();
    front.add(profileAdd(root, type));
    int count = 0;
    while (true) {
View Full Code Here

  private TreeItem add(TreeItem parent, TreeType type) {
    if (type == TreeType.TEXT) {
      return parent.addItem("text");
    } else if (type == TreeType.HTML) {
      TreeItem item = new TreeItem();
      item.setHTML("<h1>html</h1>");
      parent.addItem(item);
      return item;
    } else if (type == TreeType.CHECKBOX) {
      return parent.addItem(new CheckBox("myBox"));
    } else {
View Full Code Here

    }
  }

  private void createTree(int numBranches, int numNodes, TreeType type) {
    Tree t = new Tree();
    TreeItem root = t.addItem("root");

    ArrayList front = new ArrayList();
    front.add(add(root, type));
    int count = 0;
    while (true) {
View Full Code Here

    // Create a new tree
    Tree dynamicTree = new Tree();

    // Add some default tree items
    for (int i = 0; i < 5; i++) {
      TreeItem item = dynamicTree.addItem("Item " + i);

      // Temporarily add an item so we can expand this node
      item.addItem("");
    }

    // Add a handler that automatically generates some children
    dynamicTree.addOpenHandler(new OpenHandler<TreeItem>() {
      public void onOpen(OpenEvent<TreeItem> event) {
        TreeItem item = event.getTarget();
        if (item.getChildCount() == 1) {
          // Close the item immediately
          item.setState(false, false);

          // Add a random number of children to the item
          String itemText = item.getText();
          int numChildren = Random.nextInt(5) + 2;
          for (int i = 0; i < numChildren; i++) {
            TreeItem child = item.addItem(itemText + "." + i);
            child.addItem("");
          }

          // Remove the temporary item when we finish loading
          item.getChild(0).remove();
View Full Code Here

    tree.setAnimationEnabled(true);
  }
 
  private void initTree() {
    tree.removeItems();
    allOntsTreeItem = new TreeItem(ALL_ONTOLOGIES);
    tree.addItem(allOntsTreeItem);
  }
View Full Code Here

    }

    if ( loginResult != null ) {
      allOntsTreeItem.addItem(new AuthorItem(REGISTERED_BY_ME, loginResult.getUserName(), loginResult.getUserId()));
   
      TreeItem registerByTreeItem = new TreeItem(REGISTERED_BY);

      allOntsTreeItem.addItem(registerByTreeItem);
   
      List<String> usernames = new ArrayList<String>();
      usernames.addAll(authors.keySet());
      usernames.remove(loginResult.getUserName());
      Collections.sort(usernames);
      for ( String author : usernames ) {
        registerByTreeItem.addItem(new AuthorItem(author, author, authors.get(author)))
      }
    }
    allOntsTreeItem.setState(true);
   
    if ( types.size() > 0 ) {
      Collections.sort(types);
      TreeItem typeItem = new TreeItem("Type");
      tree.addItem(typeItem);
      for ( String type : types ) {
        typeItem.addItem(new TypeItem(type));
      }
      typeItem.setState(true);
    }
   
    if ( authorities.size() > 0 ) {
      Collections.sort(authorities);
      TreeItem authItem = new TreeItem("Authority");
      tree.addItem(authItem);
      for ( String auth : authorities ) {
        authItem.addItem(new AuthorityItem(auth));
      }
    }
   
  }
View Full Code Here

    });
  }

  public void add(final WidgetProvider cog, String title) {
    cogs.put(title, cog);
    TreeItem item = new TreeItem(title);
    leftTree.addItem(item);
  }
View Full Code Here

      content = new InfoWindowContent.MapBlowupContent();
    } else {

      // The default case
      Tree tree = new Tree();
      TreeItem foo = new TreeItem("Foo");
      tree.addItem(foo);
      TreeItem bar = new TreeItem("bar");
      foo.addItem(bar);
      bar.addItem("baz");
      bar.addItem("gwt");
      // max-height must be set in advance so info window is sized appropriately
      tree.setSize("217px", "104px");
      content = new InfoWindowContent(tree);
    }
View Full Code Here

TOP

Related Classes of com.google.gwt.user.client.ui.TreeItem$TreeItemImplIE6

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.