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

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

Introduction

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

Prototype

public FastTreeItem() 

Source Link

Document

Creates an empty tree item.

Usage

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

License:Apache License

private FastTreeItem profileAdd(FastTreeItem parent, TreeType type) {
    if (type == TreeType.TEXT) {
        FastTreeItem text = new FastTreeItem();
        text.setText("item");
        parent.addItem(text);//from   w  ww  .  ja  v a  2  s .c  o  m
        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 {
        throw new RuntimeException("What?");
    }
}