當前位置: 首頁>>代碼示例>>Java>>正文


Java Event.addNativePreviewHandler方法代碼示例

本文整理匯總了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);
  }
}
 
開發者ID:jorkey,項目名稱:Wiab.pro,代碼行數:18,代碼來源:EventPreviewAutoHiderRegistrar.java

示例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();
			}
		}
	});
}
 
開發者ID:openkm,項目名稱:document-management-system,代碼行數:18,代碼來源:ExtendedPopupPanel.java

示例3: addTabBlockHandlers

import com.google.gwt.user.client.Event; //導入方法依賴的package包/類
private void addTabBlockHandlers() {
    if (topBlockerRegistration == null) {
        topBlockerRegistration = Event
                .addNativePreviewHandler(topEventBlocker);
        bottomBlockerRegistration = Event
                .addNativePreviewHandler(bottomEventBlocker);
    }
}
 
開發者ID:cuba-platform,項目名稱:cuba,代碼行數:9,代碼來源:CubaFileUploadProgressWindow.java

示例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());
                }
            }
        }
    });
}
 
開發者ID:cuba-platform,項目名稱:cuba,代碼行數:30,代碼來源:CubaTreeTableConnector.java

示例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());
                }
            }
        }
    });
}
 
開發者ID:cuba-platform,項目名稱:cuba,代碼行數:31,代碼來源:CubaScrollTableConnector.java


注:本文中的com.google.gwt.user.client.Event.addNativePreviewHandler方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。