p.addNorth(header, 50);
final HTML footer = new HTML("footer");
p.addSouth(footer, 25);
final PanelLayout navigation = new PanelLayout("Navigation");
navigation.setClosable(true);
navigation.addCloseHandler(new CloseHandler<PanelLayout>() {
public void onClose(CloseEvent<PanelLayout> event) {
p.setWidgetVisible(navigation, false);
}
});
p.addWest(navigation, 200);
LayoutUtils.fitParent(navigation);
final HTML properties = new HTML("properties");
p.addEast(properties, 200);
FlowPanel panel = new FlowPanel();
ToggleButton button = new ToggleButton("Hide header", "Show header");
button.addClickHandler(new ClickHandler() {
public void onClick(ClickEvent clickEvent) {
p.setWidgetVisible(header, !((ToggleButton) clickEvent.getSource()).isDown());
}
});
panel.add(button);
button = new ToggleButton("Hide navigation", "Show navigation");
button.addClickHandler(new ClickHandler() {
public void onClick(ClickEvent clickEvent) {
p.setWidgetVisible(navigation, !((ToggleButton) clickEvent.getSource()).isDown());
}
});
panel.add(button);
button = new ToggleButton("Hide properties", "Show properties");
button.addClickHandler(new ClickHandler() {
public void onClick(ClickEvent clickEvent) {
p.setWidgetVisible(properties, !((ToggleButton) clickEvent.getSource()).isDown());
}
});
panel.add(button);
button = new ToggleButton("Hide footer", "Show footer");
button.addClickHandler(new ClickHandler() {
public void onClick(ClickEvent clickEvent) {
p.setWidgetVisible(footer, !((ToggleButton) clickEvent.getSource()).isDown());
}
});
panel.add(button);
PanelLayout cp = new PanelLayout("Test");
LayoutUtils.fitParent(cp);
cp.setContent(new Label("Content"));
cp.setCollapsable(true);
TabLayout tabs = new TabLayout();
tabs.setHideTabBarWithSingleTab(false);
tabs.addTab("Buttons", panel);
tabs.addTab("Tab1", new HTML("Tab1 Content"));