public void setSelectedIndex(int itemIdx, boolean fireEvent) { String selectedStyle = resources_.listStyle().selectedItem(); panel_.getWidget(selectedIdx_).removeStyleName(selectedStyle); selectedIdx_ = itemIdx; panel_.getWidget(selectedIdx_).addStyleName(selectedStyle); panel_.getWidget(selectedIdx_).getElement().scrollIntoView(); if (fireEvent) { DomEvent.fireNativeEvent(Document.get().createChangeEvent(), handlerManager_); } }
public void click() { NativeEvent clickEvent = Document.get().createClickEvent(1, 0, 0, 0, 0, false, false, false, false); DomEvent.fireNativeEvent(clickEvent, hasHandlers_); }
private void fireBlurEvent() { DomEvent.fireNativeEvent(Document.get().createBlurEvent(), this); }
/** * Propagates the a focus event. * * <p> */ protected void propagateFocusEvent() { NativeEvent nativeEvent = Document.get().createFocusEvent(); DomEvent.fireNativeEvent(nativeEvent, this, getElement()); }
public void invalidateCache() { previousResults_.clear(); DomEvent.fireNativeEvent(Document.get().createChangeEvent(), handlerManager_); }
@Override public void onClick(ClickEvent event) { setActive(!isActive()); // re-fire the event with this as the source DomEvent.fireNativeEvent(Event.getCurrentEvent(), this); }