Examples of FastTreeItem


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

    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

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

    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");
    textBoxParent.addItem(new TextBox());
    textBoxParent.addItem("and another one...");
    textBoxParent.addItem(new TextArea());

    ListBox lb = new ListBox();
    for (int i = 0; i < 100; i++) {
      lb.addItem(i + "");
    }
View Full Code Here

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

    return table;
  }
 
  protected Widget stubbornTree() {
    StubbornTree t = new StubbornTree();
    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");
    textBoxParent.addItem(new TextBox());
    textBoxParent.addItem("and another one...");
    textBoxParent.addItem(new TextArea());

    ListBox lb = new ListBox();
    for (int i = 0; i < 100; i++) {
      lb.addItem(i + "");
    }
View Full Code Here

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

  }

  private void lazyCreateChild(final HasFastTreeItems parent, final int index,
      final int children) {

    FastTreeItem item = new FastTreeItem("child" + index + " (" + children
        + " children)") {
      public void ensureChildren() {
        for (int i = 0; i < children; i++) {
          lazyCreateChild(this, i, children + (i * 10));
        }
      }
    };
    item.becomeInteriorNode();
    parent.addItem(item);
  }
View Full Code Here

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

    parent.addItem(item);
  }

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

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

    }
  }

  private void profileCreateTree(FastTree t, int numBranches, int numNodes,
      TreeType type) {
    FastTreeItem root = t.addItem("root");
    ArrayList front = new ArrayList();
    front.add(profileAdd(root, type));
    int count = 0;
    while (true) {
      ArrayList newFront = new ArrayList();
View Full Code Here

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

  private void verboseTreeItem(HasFastTreeItems parent, int children) {
    for (int i = 0; i < children; i++) {
      final int index = i;

      FastTreeItem item = new ListeningFastTreeItem("child " + i) {

        public void beforeClose() {
          Window.alert("Close item" + index);
        }
View Full Code Here

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

        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);
View Full Code Here

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

              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(
                  mController.getWorkflowHandler(w));
              curItem.addItem(a);
            }
            //Found the item so we're done
            return;
         
        }
View Full Code Here

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

        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();

      }   
      index++;
    }
   
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.