// 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;