public class ITabsheet extends ITabsheetBase {
+ private class TabSheetCaption extends ICaption {
+ TabSheetCaption() {
+ super(null, client);
+ }
+
+ @Override
+ public void onBrowserEvent(Event event) {
+ super.onBrowserEvent(event);
+ if (event.getTypeInt() == Event.ONLOAD && isDynamicWidth()) {
+ // icon onloads may change total width of tabsheet
+ updateDynamicWidth();
+ }
+ }
+
+ }
+
class TabBar extends ComplexPanel implements ClickListener {
private Element tr = DOM.createTR();
return super.remove(w);
}
- public ICaption getTab(int index) {
+ public TabSheetCaption getTab(int index) {
if (index >= getWidgetCount()) {
return null;
}
- return (ICaption) getWidget(index);
+ return (TabSheetCaption) getWidget(index);
}
public void setVisible(int index, boolean visible) {
@Override
protected void renderTab(final UIDL tabUidl, int index, boolean selected,
boolean hidden) {
- ICaption c = tb.getTab(index);
+ TabSheetCaption c = tb.getTab(index);
if (c == null) {
- c = new ICaption(null, client);
+ c = new TabSheetCaption();
tb.addTab(c);
}
c.updateCaption(tabUidl);