Example usage for com.google.gwt.widgetideas.client FastTree addDefaultCSS

List of usage examples for com.google.gwt.widgetideas.client FastTree addDefaultCSS

Introduction

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

Prototype

public static void addDefaultCSS() 

Source Link

Document

Add the default style sheet and images.

Usage

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

License:Apache License

public StackPanel createDemo() {
    FastTree.addDefaultCSS();

    StackPanel p = new StackPanel();

    p.add(basicTree(), "Basic tree");
    p.add(lazyTree(), "Lazy tree");
    p.add(verboseTree(), "Verbose tree");
    p.add(profileTree(), "Profiling tree");
    p.add(stubbornTree(), "Stubborn tree");
    return p;/*from ww w. jav  a2  s  .  c o m*/
}

From source file:com.google.gwt.widgetideas.demo.collapsiblepanel.client.CollapsiblePanelDemo.java

License:Apache License

/**
 * This is the entry point method./*from  w  w w . ja v  a 2  s.  c  om*/
 */
public void onModuleLoad() {
    try {

        // Some random contents to make the tree interesting.
        Panel contents = createSchoolNavBar();
        FastTree.addDefaultCSS();

        // The panel.
        final CollapsiblePanel panel = new CollapsiblePanel();
        String value = Location.getParameter("collapsed");
        if (value != null) {
            value = value.trim();
            if (value.equals("true")) {
                panel.setCollapsedState(true);
            } else if (value.equals("false")) {
                // do nothing, default.
            } else {
                Window.alert("collapsed should not be given " + value + " use true or false instead");
            }
        }
        RootPanel.get("collapsible-panel").add(panel);
        panel.add(contents);
        panel.setWidth("200px");
        panel.hookupControlToggle(controlButton);
    } catch (RuntimeException e) {
        if (GWT.isScript()) {
            Log.severe(e.getMessage());
        }
        throw e;
    }
}