accordion.getAccordionSelectionListeners().add(this);
accordion.getAccordionAttributeListeners().add(this);
// Add header buttons for all existing panels
for (Component panel : accordion.getPanels()) {
PanelHeader panelHeader = new PanelHeader(new ButtonData(Accordion.getIcon(panel),
Accordion.getName(panel)));
panelHeader.setGroup(panelHeaderGroup);
accordion.add(panelHeader);
panelHeaders.add(panelHeader);
}