Custom components in Panel header

The example of what I’m after is “Panel style layout” example at
https://vaadin.com/valo
.
The are 2 buttons in panels’ header.
How is this implemented ?

Thanks

I isn’t a Panel, but in fact a CssLayout with a HorizontalLayout (header) and VerticalLayout (content). The demo uses a class name called ‘card’ to fake the theming, I don’t know if it is a part of the Valo theme or custom.

Basically:

CssLayout panel = new CssLayout();
panel.addStyleName(ValoTheme.LAYOUT_CARD);

HorizontalLayout caption = new HorizontaLayout();
caption.addStyleName("v-panel-caption");
caption.setSpacing(true);
caption.addComponents(new Label("Caption"), new Button("Button"));

panel.addComponent(caption);