当前位置: 首页>>代码示例>>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;未经允许,请勿转载。