@Test public void testEventsCausedWithinHandlersFireImmediately() { final StubTextBox b = new StubTextBox(); b.fireAttached(); final boolean[] inClickHandler = { false }; final boolean[] wasInClickHandler = { false }; b.addClickHandler(new ClickHandler() { public void onClick(ClickEvent arg0) { inClickHandler[0] = true; WidgetUtils.focus(b); inClickHandler[0] = false; } }); b.addFocusHandler(new FocusHandler() { public void onFocus(FocusEvent arg0) { wasInClickHandler[0] = inClickHandler[0]; } }); b.click(); assertTrue(wasInClickHandler[0]); }
public void fireAttached() { attached = true; AttachEvent.fire(this, true); }
StubWidget implements IsWidget, IsStubWidget { public void fireAttached() { attached = true; AttachEvent.fire(this, true); } }
StubWidget implements IsWidget, IsStubWidget { public void fireAttached() { attached = true; AttachEvent.fire(this, true); } StubWidget();  StubWidget(StubElement element); }
StubWidget implements IsWidget, IsStubWidget { public void fireAttached() { attached = true; AttachEvent.fire(this, true); } StubWidget();  StubWidget(StubElement element); IsWidget findById(String id); void fireAttached(); void fireDetached(); @Override void onBrowserEvent(final Event event); @Override IsWidget getIsParent(); void setIsParent(IsWidget parent); @Override void fireEvent(final GwtEvent<?> event); @Override void addStyleName(final String style); @Override void removeStyleName(final String style); @Override int getAbsoluteTop(); @Override int getAbsoluteLeft(); @Override StubStyle getStyle(); @Override int getOffsetWidth(); @Override int getOffsetHeight(); @Override void ensureDebugId(final String debugId); @Override String toString(); @Override String getStyleName(); @Override void setStyleName(String styleName); @Override Widget asWidget(); @Override StubElement getIsElement(); @Override HandlerRegistration addAttachHandler(Handler handler); @Override boolean isAttached(); @Override HandlerRegistration addDomHandler(final H handler, DomEvent.Type<H> type); }
StubWidget implements IsWidget, IsStubWidget { public void fireAttached() { attached = true; AttachEvent.fire(this, true); } StubWidget();  StubWidget(StubElement element); IsWidget findById(String id); void fireAttached(); void fireDetached(); @Override void onBrowserEvent(final Event event); @Override IsWidget getIsParent(); void setIsParent(IsWidget parent); @Override void fireEvent(final GwtEvent<?> event); @Override void addStyleName(final String style); @Override void removeStyleName(final String style); @Override int getAbsoluteTop(); @Override int getAbsoluteLeft(); @Override StubStyle getStyle(); @Override int getOffsetWidth(); @Override int getOffsetHeight(); @Override void ensureDebugId(final String debugId); @Override String toString(); @Override String getStyleName(); @Override void setStyleName(String styleName); @Override Widget asWidget(); @Override StubElement getIsElement(); @Override HandlerRegistration addAttachHandler(Handler handler); @Override boolean isAttached(); @Override HandlerRegistration addDomHandler(final H handler, DomEvent.Type<H> type); public int absoluteTop; public int absoluteLeft; public int offsetWidth; public int offsetHeight; }