VerticalPanel panel = new VerticalPanel();
panel.setWidth("100%");
panel.getElement().getStyle().setProperty("background", "#f8f8f8");
panel.getElement().getStyle().setProperty("padding", "40px 20px");
XNavigationBar bar1 = new XNavigationBar();
bar1.setTitle("Bar One");
bar1.getElement().getStyle().setProperty("height", "30px");
panel.add(bar1);
panel.add(new HTML(" "));
XNavigationBar bar2 = new XNavigationBar();
bar2.setLeftTitle("Back", Type.BACK_BUTTON);
bar2.getLeftButton().addClickHandler(new ClickHandler() {
public void onClick(ClickEvent event) {
Window.alert("Back was tapped.");
}
});
bar2.setTitle("Bar Two");
panel.add(bar2);
panel.add(new HTML(" "));
XNavigationBar bar3 = new XNavigationBar();
bar3.setTitle("Bar Three");
bar3.getElement().getStyle().setProperty("height", "60px");
bar3.setLeftTitle("Edit", Type.BUTTON);
bar3.getLeftButton().addClickHandler(new ClickHandler() {
public void onClick(ClickEvent event) {
Window.alert("Edit was tapped.");
}
});
bar3.setRightTitle("Done");
bar3.getRightButton().addClickHandler(new ClickHandler() {
public void onClick(ClickEvent event) {
Window.alert("Done was tapped.");
}
});