Package com.google.gwt.widgetideas.client

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


  public void report(String s) {
    RootPanel.get().add(new HTML(s));
  }

  public void store() {
    FastTree t = new FastTree();
    FastTreeItem camping = t.addItem("Camping Gear");
    camping.addItem("Camping tents");
    FastTreeItem cooking = camping.addItem("Cooking gear");
    camping.setState(true);

    t.setSelectedItem(cooking);

    FastTreeItem ap = t.addItem("Apparel");
    ap.addItem("Jackets");
    ap.addItem("Shirts");
    t.addItem("Footwear").becomeInteriorNode();
    t.addItem("Coolers");
    RootPanel.get().add(t);
  }
View Full Code Here


    t.addItem("Coolers");
    RootPanel.get().add(t);
  }

  protected Widget basicTree() {
    FastTree t = new FastTree();
    FastTreeItem a = t.addItem("A root tree item");
    a.addItem("A child");
    FastTreeItem aXb = a.addItem("Another child");
    aXb.addItem("a grand child");
    FastTreeItem widgetBranch = a.addItem(new CheckBox("A checkbox child"));
    FastTreeItem textBoxParent = widgetBranch.addItem("A TextBox parent");
View Full Code Here

  /**
   * 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

    widgetBranch.addItem("A ListBox parent").addItem(lb);
    return t;
  }

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

      //Find the process in the tree and replace with new
      if (mProcessTable.isCellPresent(i, 0) &&
          mProcessTable.getText(i, 0).equals(p.getName())) {
       
        setRowStyleBasedOnProcess(i, p);
        FastTree t = (FastTree) mProcessTable.getWidget(i, 1);
        t.getChild(0).removeItems();
       
        for (final ProcessProperty prop : p.getProperties()) {
     
          if (prop instanceof WorkflowsProperty) {
            FastTreeItem workflows =
              new FastTreeItem(prop.getName()) {

              public void beforeOpen() {
                mController.updateProcessProperty(prop);
              }
            };
           
            t.getChild(0).addItem(workflows);
            workflows.becomeInteriorNode();
           
          } else {
            Anchor a = new Anchor(prop.getName());
            a.addClickHandler(mController.getPropHandler(prop));
            t.getChild(0).addItem(a);
          }
        }
        //Found it so we can stop looking
        break;
      }
View Full Code Here

     
      if (mProcessTable.isCellPresent(i, 0) &&
          mProcessTable.getText(i, 0).equals(
              p.getProcess().getName())) {
       
        FastTree t = (FastTree) mProcessTable.getWidget(i, 1);
        for (int j =0; j < t.getChild(0).getChildCount(); j++) {
         
          FastTreeItem curItem = t.getChild(0).getChild(j);
          if (curItem.getText().equals(p.getName())) {
            curItem.removeItems();
            for (Workflow w : p.getWorkflows()) {
              Anchor a = new Anchor(w.getId());
              a.addClickHandler(
View Full Code Here

        mProcessTable.setText(index, 0, p.getName());
        mProcessTable.getRowFormatter().setVerticalAlign(
            index, HasVerticalAlignment.ALIGN_TOP);
        setRowStyleBasedOnProcess(index, p);
       
        FastTree t = new FastTree();
        FastTreeItem properties = new FastTreeItem("Properties") {

          public void beforeOpen() {
            mController.openProcess(p);
          }
        };
 
        t.addItem(properties);
       
        //Following line is workaround for gwt bug
        //See http://code.google.com/p/google-web-toolkit/issues/
        //detail?id=369
        DOM.setStyleAttribute(t.getElement(), "position", "static");
       
        mProcessTable.setWidget(index, 1, t);
        properties.becomeInteriorNode();

      }   
View Full Code Here

TOP

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

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.