本文整理汇总了Java中com.google.gwt.event.dom.client.DomEvent.fireNativeEvent方法的典型用法代码示例。如果您正苦于以下问题:Java DomEvent.fireNativeEvent方法的具体用法?Java DomEvent.fireNativeEvent怎么用?Java DomEvent.fireNativeEvent使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.google.gwt.event.dom.client.DomEvent
的用法示例。
在下文中一共展示了DomEvent.fireNativeEvent方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setValue
import com.google.gwt.event.dom.client.DomEvent; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
@Override
public void setValue(final AdministratedApplicationConfig value, final boolean fireEvents) {
for (int i = 0; i < connectorListBox.getItemCount(); i++) {
if(connectorListBox.getValue(i).equals(value.getBlockchainSource().name())) {
connectorListBox.setSelectedIndex(i);
DomEvent.fireNativeEvent(Document.get().createChangeEvent(), connectorListBox);
break;
}
}
currentEditor.setValue(value);
applicationTitle.setText(value.getApplicationTitle());
applicationSubtitle.setText(value.getApplicationSubTitle());
donationAddress.setText(value.getHostDonationAddress());
}
示例2: testTextBox
import com.google.gwt.event.dom.client.DomEvent; //导入方法依赖的package包/类
@Test
public void testTextBox() throws Exception {
TextBox tb = new TextBox();
RootPanel.get().add(tb);
final List events = new ArrayList();
tb.addChangeHandler(new ChangeHandler() {
@Override
public void onChange(ChangeEvent event) {
events.add(event);
}
});
DomEvent.fireNativeEvent(Document.get().createChangeEvent(), tb);
assertEquals(1, events.size());
}
示例3: processNewPackage
import com.google.gwt.event.dom.client.DomEvent; //导入方法依赖的package包/类
private void processNewPackage(String newPackageName) {
if (newPackageName != null && !"".equals(newPackageName.trim())) {
boolean exists = false;
newPackageName = newPackageName.trim();
int count = packageList.getItemCount();
if (count > 0) {
for (int i = 0; i < count; i++) {
if ((exists = newPackageName.equals(packageList.getValue(i)))) break;
}
}
if (exists) {
packageList.setSelectedValue(newPackageName);
} else {
packageList.addItem(newPackageName, newPackageName);
packageList.setSelectedValue(newPackageName);
DomEvent.fireNativeEvent(Document.get().createChangeEvent(), packageList);
}
}
}
示例4: call
import com.google.gwt.event.dom.client.DomEvent; //导入方法依赖的package包/类
@Override
public void call(String moduleName, AsyncCallback<Void> callback) {
LOG.info("ModuleReadyFeatureProvider.call: moduleName=" + moduleName);
for (ModuleBean moduleBean : moduleUnreadyList)
if (Utils.equals(moduleName, moduleBean.getName())) {
moduleReadyList.add(moduleBean);
moduleUnreadyList.remove(moduleBean);
if (moduleUnreadyList.isEmpty()) {
timeoutTimer.cancel();
DomEvent.fireNativeEvent(Document.get().createLoadEvent(), this);
}
return;
}
throw new IllegalArgumentException("Module with name '" + moduleName + "' isn't expected");
}
示例5: broadcastBlurEvent
import com.google.gwt.event.dom.client.DomEvent; //导入方法依赖的package包/类
protected void broadcastBlurEvent() {
final NativeEvent blur = Document.get().createBlurEvent();
for (int i = 0; i < RootPanel.get().getWidgetCount(); i++) {
final Widget w = RootPanel.get().getWidget(i);
DomEvent.fireNativeEvent(blur,
w);
}
}
示例6: broadcastBlurEvent
import com.google.gwt.event.dom.client.DomEvent; //导入方法依赖的package包/类
protected void broadcastBlurEvent() {
final NativeEvent blur = Document.get().createBlurEvent();
for ( int i = 0; i < RootPanel.get().getWidgetCount(); i++ ) {
final Widget w = RootPanel.get().getWidget( i );
DomEvent.fireNativeEvent( blur,
w );
}
}
示例7: onBrowserEvent
import com.google.gwt.event.dom.client.DomEvent; //导入方法依赖的package包/类
@Override
public void onBrowserEvent(Event event) {
// If we're not yet dragging, only trigger mouse events if the event occurs
// in the caption wrapper
if (this.resizable) {
switch (event.getTypeInt()) {
case Event.ONMOUSEDOWN:
case Event.ONMOUSEUP:
case Event.ONMOUSEMOVE:
case Event.ONMOUSEOVER:
case Event.ONMOUSEOUT:
if (this.dragMode >= 0 || calcDragMode(event.getClientX(),event.getClientY()) >= 0) {
// paste'n'copy from Widget.onBrowserEvent
switch (DOM.eventGetType(event)) {
case Event.ONMOUSEOVER:
// Only fire the mouse over event if it's coming from outside this
// widget.
case Event.ONMOUSEOUT:
// Only fire the mouse out event if it's leaving this
// widget.
Element related = event.getRelatedEventTarget().cast();
if (related != null && getElement().isOrHasChild(related)) {
return;
}
break;
}
DomEvent.fireNativeEvent(event, this, this.getElement());
return;
}
if (this.dragMode<0)
this.updateCursor(this.dragMode);
}
}
super.onBrowserEvent(event);
}
示例8: setValue
import com.google.gwt.event.dom.client.DomEvent; //导入方法依赖的package包/类
public void setValue(T value) {
T a = getValue();
T b = bound(value);
if (!isEqual(a, b)) {
this.box.setValue(b);
DomEvent.fireNativeEvent(Document.get().createChangeEvent(), box);
}
}
示例9: fireFocusEvent
import com.google.gwt.event.dom.client.DomEvent; //导入方法依赖的package包/类
public void fireFocusEvent(HasHandlers widget) {
DomEvent.fireNativeEvent(Document.get().createFocusEvent(), widget);
}
示例10: fireBlurEvent
import com.google.gwt.event.dom.client.DomEvent; //导入方法依赖的package包/类
public void fireBlurEvent(HasHandlers widget) {
DomEvent.fireNativeEvent(Document.get().createBlurEvent(), widget);
}
示例11: fireClickEvent
import com.google.gwt.event.dom.client.DomEvent; //导入方法依赖的package包/类
public void fireClickEvent(HasHandlers widget) {
DomEvent.fireNativeEvent(
Document.get().createClickEvent(1, 1, 1, 1, 1, false, false, false, false),
widget
);
}
示例12: fireDoubleClickEvent
import com.google.gwt.event.dom.client.DomEvent; //导入方法依赖的package包/类
public void fireDoubleClickEvent(HasHandlers widget) {
DomEvent.fireNativeEvent(
Document.get().createDblClickEvent(1, 1, 1, 1, 1, false, false, false, false),
widget
);
}
示例13: fireKeyDownEvent
import com.google.gwt.event.dom.client.DomEvent; //导入方法依赖的package包/类
public void fireKeyDownEvent(HasHandlers widget) {
DomEvent.fireNativeEvent(Document.get().createKeyDownEvent(false, false, false, false, 1), widget);
}
示例14: fireKeyPressEvent
import com.google.gwt.event.dom.client.DomEvent; //导入方法依赖的package包/类
public void fireKeyPressEvent(HasHandlers widget) {
DomEvent.fireNativeEvent(Document.get().createKeyPressEvent(false, false, false, false, 1), widget);
}
示例15: fireGestureStartEvent
import com.google.gwt.event.dom.client.DomEvent; //导入方法依赖的package包/类
public void fireGestureStartEvent(HasHandlers widget) {
DomEvent.fireNativeEvent(Document.get().createHtmlEvent(BrowserEvents.GESTURESTART, false, false), widget);
}