本文整理汇总了Java中com.google.gwt.user.client.Event.addNativePreviewHandler方法的典型用法代码示例。如果您正苦于以下问题:Java Event.addNativePreviewHandler方法的具体用法?Java Event.addNativePreviewHandler怎么用?Java Event.addNativePreviewHandler使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.google.gwt.user.client.Event
的用法示例。
在下文中一共展示了Event.addNativePreviewHandler方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: registerAutoHider
import com.google.gwt.user.client.Event; //导入方法依赖的package包/类
@Override
public void registerAutoHider(final AutoHider autoHider) {
autoHider.setRegistered(true);
autoHiders.add(autoHider);
if (eventPreviewRegistration == null) {
eventPreviewRegistration = Event.addNativePreviewHandler(this);
}
if (onResizeRegistration == null) {
onResizeRegistration = Window.addResizeHandler(this);
}
if (onHistoryRegistration == null) {
onHistoryRegistration = History.addValueChangeHandler(this);
}
}
示例2: ExtendedPopupPanel
import com.google.gwt.user.client.Event; //导入方法依赖的package包/类
/**
* ExtendedPopupPanel
*/
public ExtendedPopupPanel(boolean autoHide, boolean modal) {
super(autoHide, modal);
// Ensures when mouseup / onclick / ondblclick event is disabled drag flag and not consumed by popup
Event.addNativePreviewHandler(new NativePreviewHandler() {
@Override
public void onPreviewNativeEvent(NativePreviewEvent event) {
int type = event.getTypeInt();
if (type == Event.ONMOUSEUP || type == Event.ONCLICK || type == Event.ONDBLCLICK) {
Main.get().activeFolderTree.disableDragged();
}
}
});
}
示例3: addTabBlockHandlers
import com.google.gwt.user.client.Event; //导入方法依赖的package包/类
private void addTabBlockHandlers() {
if (topBlockerRegistration == null) {
topBlockerRegistration = Event
.addNativePreviewHandler(topEventBlocker);
bottomBlockerRegistration = Event
.addNativePreviewHandler(bottomEventBlocker);
}
}
示例4: init
import com.google.gwt.user.client.Event; //导入方法依赖的package包/类
@Override
protected void init() {
super.init();
getWidget()._delegate.cellClickListener = new TableCellClickListener() {
@Override
public void onClick(String columnKey, int rowKey) {
getRpcProxy(CubaTableServerRpc.class).onClick(columnKey, String.valueOf(rowKey));
}
};
tooltipHandlerRegistration = Event.addNativePreviewHandler(new Event.NativePreviewHandler() {
@Override
public void onPreviewNativeEvent(Event.NativePreviewEvent event) {
if (event.getTypeInt() != Event.ONMOUSEMOVE
|| !Element.is(event.getNativeEvent().getEventTarget())) {
return;
}
Element element = Element.as(event.getNativeEvent().getEventTarget());
if ("div".equalsIgnoreCase(element.getTagName())) {
String className = element.getClassName();
if (className != null && (className.contains("v-table-caption-container")
|| className.contains("v-table-footer-container"))) {
DomEvent.fireNativeEvent(event.getNativeEvent(), getWidget());
}
}
}
});
}
示例5: init
import com.google.gwt.user.client.Event; //导入方法依赖的package包/类
@Override
protected void init() {
super.init();
getWidget()._delegate.cellClickListener = new TableCellClickListener() {
@Override
public void onClick(String columnKey, int rowKey) {
getRpcProxy(CubaTableServerRpc.class).onClick(columnKey, String.valueOf(rowKey));
}
};
tooltipHandlerRegistration = Event.addNativePreviewHandler(new Event.NativePreviewHandler() {
@Override
public void onPreviewNativeEvent(Event.NativePreviewEvent event) {
if (event.getTypeInt() != Event.ONMOUSEMOVE
|| !Element.is(event.getNativeEvent().getEventTarget())) {
return;
}
Element element = Element.as(event.getNativeEvent().getEventTarget());
if ("div".equalsIgnoreCase(element.getTagName())) {
String className = element.getClassName();
if (className != null && (className.contains("v-table-caption-container")
|| className.contains("v-table-footer-container"))) {
DomEvent.fireNativeEvent(event.getNativeEvent(), getWidget());
}
}
}
});
}