Package com.google.gwt.widgetideas.client

Examples of com.google.gwt.widgetideas.client.FastTree$DefaultResources


  /**
   * Creates a lazy tree.
   */
  protected Widget lazyTree() {
    FastTree t = new FastTree();
    lazyCreateChild(t, 0, 50);
    return t;
  }
View Full Code Here


    }));

    table.setWidget(row, 1, new Button("Fast tree", new ClickListener() {
      public void onClick(Widget sender) {
        long time = System.currentTimeMillis();
        FastTree t = new FastTree();
        profileCreateTree(t, Integer.parseInt(branches.getText()),
            Integer.parseInt(nodes.getText()),
            TreeType.getType(type.getSelectedIndex()));
        table.setWidget(widgetRow, 1, t);
        Window.alert("Elapsed time: " + (System.currentTimeMillis() - time));
View Full Code Here

        HasAlignment.ALIGN_TOP);
    return table;
  }

  protected Widget verboseTree() {
    FastTree tree = new FastTree();
    verboseTreeItem(tree, 10);
    return tree;
  }
View Full Code Here

    panel.setStyleName("nav-Tree-title");
    wrapper = new MyStackPanel();
    wrapper.setHeight("250px");

    final FastTree contents = new FastTree();
    wrapper.add(contents, "<b>People</b>", true);

    wrapper.add(new Label("None"), "<b>Academics</b>", true);
    navBar.add(wrapper);

    FastTreeItem students = contents.addItem("Students");
    students.addItem("Jill");
    students.addItem("Jack");
    students.addItem("Molly");
    students.addItem("Ms. Muffat");

    FastTreeItem teachers = contents.addItem("Teachers");
    teachers.addItem("Mrs Black");
    teachers.addItem("Mr White");

    FastTreeItem admin = contents.addItem("Administrators");
    admin.addItem("The Soup Nazi");
    admin.addItem("The Grand High Supreme Master Pubba");
    return navBar;
  }
View Full Code Here

    FastTreeItem root = new FastTreeItem("root");
    root.addItem("item0");
    root.addItem("item1");
    root.addItem("item2");
    root.addItem(new CheckBox("item3"));
    FastTree t = new FastTree();

    // tree2
    FastTreeItem root2 = new FastTreeItem("child root");
    root2.addItem("child item0");
    root2.addItem("child item1");
    root2.addItem("child item2");
    root2.addItem(new CheckBox("child item3"));

    // nest the trees
    root.addItem(root2);
    t.addItem(root);
    t.addFocusListener(new FocusListener() {

      public void onFocus(Widget sender) {
        report("on focus tree");
      }
View Full Code Here

      front = newFront;
    }
  }

  private Widget textTreeInScroll() {
    FastTree tree = new FastTree();
    populateTree(tree, 4, 100, TreeType.TEXT);
    ScrollPanel sp = new ScrollPanel(tree);
    sp.setSize("200px", "200px");
    return sp;
  }
View Full Code Here

    FastTreeItem root = new FastTreeItem("root");
    root.addItem("item0");
    root.addItem("item1");
    root.addItem("item2");
    root.addItem(new CheckBox("item3"));
    FastTree t = new FastTree();

    // tree2
    FastTreeItem root2 = new FastTreeItem("child root");
    root2.addItem("child item0");
    root2.addItem("child item1");
    root2.addItem("child item2");
    root2.addItem(new CheckBox("child item3"));
    FastTree t2 = new FastTree();

    // nest the trees
    t2.addItem(root2);
    FastTreeItem item = new FastTreeItem(t2);
    root.addItem(item);
    t.addItem(root);

    return t;
View Full Code Here

    return t;
  }

  private Widget treeWithVarietyWidgets() {
    FastTree t = new FastTree();
    FastTreeItem item = t.addItem("Text");
    item.addItem(new TextBox());
    ListBox lb = new ListBox();
    for (int i = 0; i < 100; i++) {
      lb.addItem(i + "");
    }
View Full Code Here

    return t;
  }

  private Widget widgetTreeInScroll() {
    FastTree tree = new FastTree();
    populateTree(tree, 4, 100, TreeType.CHECKBOX);
    ScrollPanel sp = new ScrollPanel(tree);
    DOM.setStyleAttribute(sp.getElement(), "position", "relative");
    sp.setSize("400px", "100px");
    sp.setAlwaysShowScrollBars(true);
View Full Code Here

  private Widget zoomingTree() {
    VerticalPanel p = new VerticalPanel();
    final TextBox b = new TextBox();

    p.add(b);
    final FastTree tree = new FastTree();
    final HashMap<String, FastTreeItem> treeItems = new HashMap<String, FastTreeItem>();

    b.addKeyboardListener(new KeyboardListener() {

      public void onKeyDown(Widget sender, char keyCode, int modifiers) {
        if (keyCode == KEY_ENTER) {
          String value = b.getText().trim();
          FastTreeItem chosen = treeItems.get(value);
          if (chosen == null) {
            Window.alert("No such tree item exists");
          }
          tree.setSelectedItem(chosen);
          tree.ensureSelectedItemVisible();
        }
      }

      public void onKeyPress(Widget sender, char keyCode, int modifiers) {
      }

      public void onKeyUp(Widget sender, char keyCode, int modifiers) {
      }
    });
    ScrollPanel scroller = new ScrollPanel();

    for (int i = 0; i < 10; i++) {
      FastTreeItem item = tree.addItem("" + i);
      treeItems.put("" + i, item);
      for (int j = 0; j < 5; j++) {
        String value = "" + i + "." + j;
        FastTreeItem subItem = item.addItem(value);
        treeItems.put(value, subItem);
View Full Code Here

TOP

Related Classes of com.google.gwt.widgetideas.client.FastTree$DefaultResources

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.