Wrapping the TabLayoutPanel in a ResizeLayoutPanel, and then adding
the RLP as the content widget of the HeaderPanel, resulted in nothing
rendering in the content area.
Here's my test code for my original case - I'm adding the HeaderPanel
directly to the RootLayoutPanel.
public class TestHeaderEntryPoint implements EntryPoint {
@Override
public void onModuleLoad() {
HeaderPanel hp = new HeaderPanel();
TabLayoutPanel tp = new TabLayoutPanel(3, Unit.EM);
tp.add(new Label("This is tab 1"), "tab 1");
tp.add(new Label("This is tab 2"), "tab 2");
hp.setHeaderWidget(new Label("this is the header"));
hp.setContentWidget(tp);
hp.setFooterWidget(new Label("this is the footer"));
RootLayoutPanel.get().add(hp);
}
}
When I set a breakpoint in HeaderPanel.forceLayout I see that
remainingHeight is > 0 and (content instanceof RequiresResize) is
true, so I see content.onResize() get called...the tabs display, but
the tab body doesn't.
Possibly interesting aside: When I declared the HeaderPanel and
TabLayoutPanel in a UiBinder .ui.xml, I saw that content ended up as
type FlowPanel, so HeaderPanel.forceLayout didn't call
content.onResize(). But the effect was the same - tabs display, but
tab bodies don't.
JLS