本文整理匯總了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());
}
}
}
});
}