public class DefaultNavigation extends VerticalLayout implements XLayElement, DesktopInject, Observer, Button.ClickListener {
private Desktop desktop;
protected Button historyButton(NavigationNode n, boolean isSelected) {
CardButton b = new CardButton(n.getTitle());
if (isSelected) {
b.setBackgroundColor("#000");
b.setForegroundColor("#fff");
} else {
b.setBackgroundColor("#aaa");
b.setForegroundColor("#000");
}
b.setBorder(new Border(1,0,1,0));
b.setMargin(new Border(1,0,0,0));
b.setWidth("100%");
b.setHeight("40px");
b.updateCaption();
b.setData(n);
b.addListener(this);
return b;
}