ToolStrip topBar = new ToolStrip();
topBar.setHeight(33);
topBar.setWidth100();
topBar.addSpacer(6);
ImgButton sgwtHomeButton = new ImgButton();
sgwtHomeButton.setSrc("pieces/24/cube_green.png");
sgwtHomeButton.setWidth(24);
sgwtHomeButton.setHeight(24);
sgwtHomeButton.setPrompt("Smart GWT Project Page");
sgwtHomeButton.setHoverStyle("interactImageHover");
sgwtHomeButton.setShowRollOver(false);
sgwtHomeButton.setShowDownIcon(false);
sgwtHomeButton.setShowDown(false);
sgwtHomeButton.addClickHandler(new com.smartgwt.client.widgets.events.ClickHandler() {
public void onClick(ClickEvent event) {
com.google.gwt.user.client.Window.open("http://code.google.com/p/smartgwt/", "sgwt", null);
}
});
topBar.addMember(sgwtHomeButton);
topBar.addSpacer(6);
Label title = new Label("Smart GWT Showcase");
title.setStyleName("sgwtTitle");
title.setWidth(300);
topBar.addMember(title);
topBar.addFill();
ToolStripButton devConsoleButton = new ToolStripButton();
devConsoleButton.setTitle("Developer Console");
devConsoleButton.setIcon("silk/bug.png");
devConsoleButton.addClickHandler(new com.smartgwt.client.widgets.events.ClickHandler() {
public void onClick(ClickEvent event) {
SC.showConsole();
}
});
topBar.addButton(devConsoleButton);
topBar.addSeparator();
ImgButton imgButton = new ImgButton();
imgButton.setWidth(18);
imgButton.setHeight(18);
imgButton.setSrc("silk/emoticon.png");
imgButton.setShowFocused(false);
imgButton.setShowFocusedIcon(false);
imgButton.setPrompt("I'm feeling lucky");
imgButton.setHoverWidth(110);
imgButton.setHoverStyle("interactImageHover");
imgButton.addClickHandler(new com.smartgwt.client.widgets.events.ClickHandler() {
public void onClick(ClickEvent event) {
ExplorerTreeNode[] data = sideNav.getShowcaseData();
int size = data.length;
for (int i = 0; i < 15; i++) {
int sampleIndex = (int) (size * java.lang.Math.random());