In your java file you can call getWidget() to get the HeaderPanel, so you would probably define:
private HeaderPanel getHeaderPanel() {
return (HeaderPanel) getWidget();
}
Alternatively you could assign a ui:field to your HeaderPanel and use @UiField in your java file to access it. Or you could change your UiBinder interface definition and constructor a bit so you have:
interface MyUiBinder extends UiBinder<HeaderPanel, MyHeaderPanelWidget> {}
private static MyUiBinder uiBinder = GWT.create(MyUiBinder.class);
public MyHeaderPanelWidget() {
HeaderPanel headerPanel = uiBinder.createAndBindUi(this);
initWidget(headerPanel);
}
-- J.