Example usage for com.google.gwt.widgetideas.client FastTreeItem setState

List of usage examples for com.google.gwt.widgetideas.client FastTreeItem setState

Introduction

In this page you can find the example usage for com.google.gwt.widgetideas.client FastTreeItem setState.

Prototype

public final void setState(boolean open) 

Source Link

Document

Sets whether this item's children are displayed.

Usage

From source file:com.google.gwt.demos.fasttree.client.FastTreeDemo.java

License:Apache License

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);//w  w w.j  a  v  a 2s.  com

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