panel.setHeading("Mix and match icon sizes");
ToolBar toolBar = new ToolBar();
panel.setTopComponent(toolBar);
ButtonGroup group = new ButtonGroup(3);
group.setHeading("Clipboard");
toolBar.add(group);
Button btn = new Button("Paste", Resources.ICONS.add32());
btn.addStyleName("x-btn-as-arrow");
btn.setScale(ButtonScale.LARGE);
btn.setIconAlign(IconAlign.TOP);
btn.setArrowAlign(ButtonArrowAlign.BOTTOM);
TableData data = new TableData();
data.setRowspan(3);
group.add(btn, data);
btn = new Button("Format", Resources.ICONS.add32());
btn.setScale(ButtonScale.LARGE);
btn.setIconAlign(IconAlign.TOP);
btn.setArrowAlign(ButtonArrowAlign.BOTTOM);
Menu menu = new Menu();
menu.add(new MenuItem("Cool"));
btn.setMenu(menu);
group.add(btn, data);
btn = new Button("Copy", IconHelper.createStyle("add16"));
menu = new Menu();
menu.add(new MenuItem("Copy me"));
btn.setMenu(menu);
group.add(btn);
btn = new Button("Cut", IconHelper.createStyle("add16"));
group.add(btn);
btn = new Button("Paste", IconHelper.createStyle("add16"));
group.add(btn);
group = new ButtonGroup(3);
group.setHeading("Clipboard");
toolBar.add(group);
btn = new Button("Paste", Resources.ICONS.add32());
btn.addStyleName("x-btn-as-arrow");
btn.setScale(ButtonScale.LARGE);
btn.setIconAlign(IconAlign.TOP);
btn.setArrowAlign(ButtonArrowAlign.BOTTOM);
data = new TableData();
data.setRowspan(3);
group.add(btn, data);
btn = new Button("Format", Resources.ICONS.add32());
btn.setScale(ButtonScale.LARGE);
btn.setIconAlign(IconAlign.TOP);
btn.setArrowAlign(ButtonArrowAlign.BOTTOM);
menu = new Menu();
menu.add(new MenuItem("Cool"));
btn.setMenu(menu);
group.add(btn, data);
btn = new Button("Copy", IconHelper.createStyle("add16"));
menu = new Menu();
menu.add(new MenuItem("Copy me"));
btn.setMenu(menu);
group.add(btn);
btn = new Button("Cut", IconHelper.createStyle("add16"));
group.add(btn);
btn = new Button("Paste", IconHelper.createStyle("add16"));
group.add(btn);
return panel;
}