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

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

Introduction

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

Prototype

public void setText(String text) 

Source Link

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  w  w . j  a v a 2  s  .c om*/
        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?");
    }
}