本文整理汇总了Java中com.google.gwt.event.dom.client.HasMouseOverHandlers类的典型用法代码示例。如果您正苦于以下问题:Java HasMouseOverHandlers类的具体用法?Java HasMouseOverHandlers怎么用?Java HasMouseOverHandlers使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
HasMouseOverHandlers类属于com.google.gwt.event.dom.client包,在下文中一共展示了HasMouseOverHandlers类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: add
import com.google.gwt.event.dom.client.HasMouseOverHandlers; //导入依赖的package包/类
public void add(Widget widget) {
if (widget instanceof HasClickHandlers && clickHandler!=null) {
((HasClickHandlers) widget).addClickHandler(clickHandler);
}
if (widget instanceof HasDoubleClickHandlers && doubleClickHandler!=null) {
((HasDoubleClickHandlers) widget).addDoubleClickHandler(doubleClickHandler);
}
if (widget instanceof HasErrorHandlers && errorHandler!=null) {
((HasErrorHandlers) widget).addErrorHandler(errorHandler);
}
if (widget instanceof HasMouseOutHandlers && mouseOutHandler!=null) {
((HasMouseOutHandlers) widget).addMouseOutHandler(mouseOutHandler);
}
if (widget instanceof HasMouseOverHandlers && mouseOverHandler!=null) {
((HasMouseOverHandlers) widget).addMouseOverHandler(mouseOverHandler);
}
flowpanel.add(widget);
}
开发者ID:lsst,项目名称:firefly,代码行数:19,代码来源:BasicPagingImageGrid.java
示例2: setMouseEntered
import com.google.gwt.event.dom.client.HasMouseOverHandlers; //导入依赖的package包/类
public void setMouseEntered(JavaScriptObject aValue) {
if (mouseEntered != aValue) {
if (mouseOverReg != null) {
mouseOverReg.removeHandler();
mouseOverReg = null;
}
mouseEntered = aValue;
if (mouseEntered != null) {
MouseOverHandler handler = new MouseOverHandler() {
@Override
public void onMouseOver(MouseOverEvent event) {
if (mouseEntered != null) {
event.stopPropagation();
executeEvent(mouseEntered, EventsPublisher.publish(event));
}
}
};
if (component instanceof Widget) {
mouseOverReg = ((Widget) component).addDomHandler(handler, MouseOverEvent.getType());
} else if (component instanceof HasMouseOverHandlers) {
mouseOverReg = ((HasMouseOverHandlers) component).addMouseOverHandler(handler);
}
}
}
}
开发者ID:marat-gainullin,项目名称:platypus-js,代码行数:26,代码来源:EventsExecutor.java
注:本文中的com.google.gwt.event.dom.client.HasMouseOverHandlers类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论