本文整理汇总了Java中com.google.gwt.event.dom.client.HasMouseMoveHandlers类的典型用法代码示例。如果您正苦于以下问题:Java HasMouseMoveHandlers类的具体用法?Java HasMouseMoveHandlers怎么用?Java HasMouseMoveHandlers使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
HasMouseMoveHandlers类属于com.google.gwt.event.dom.client包,在下文中一共展示了HasMouseMoveHandlers类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: setMouseMoved
import com.google.gwt.event.dom.client.HasMouseMoveHandlers; //导入依赖的package包/类
public void setMouseMoved(JavaScriptObject aValue) {
if (mouseMoved != aValue) {
if (mouseMoveReg != null) {
mouseMoveReg.removeHandler();
mouseMoveReg = null;
}
mouseMoved = aValue;
if (mouseMoved != null) {
MouseMoveHandler handler = new MouseMoveHandler() {
@Override
public void onMouseMove(MouseMoveEvent event) {
if (mouseMoved != null || mouseDragged != null) {
event.stopPropagation();
if (mouseState == MOUSE.NULL || mouseState == MOUSE.MOVED) {
mouseState = MOUSE.MOVED;
executeEvent(mouseMoved, EventsPublisher.publish(event));
} else if (mouseState == MOUSE.PRESSED || mouseState == MOUSE.DRAGGED) {
mouseState = MOUSE.DRAGGED;
executeEvent(mouseDragged, EventsPublisher.publish(event));
}
}
}
};
if (component instanceof Widget) {
mouseMoveReg = ((Widget) component).addDomHandler(handler, MouseMoveEvent.getType());
} else if (component instanceof HasMouseMoveHandlers) {
mouseMoveReg = ((HasMouseMoveHandlers) component).addMouseMoveHandler(handler);
}
}
}
}
开发者ID:marat-gainullin,项目名称:platypus-js,代码行数:33,代码来源:EventsExecutor.java
示例2: initAreas
import com.google.gwt.event.dom.client.HasMouseMoveHandlers; //导入依赖的package包/类
@Override
protected void initAreas(Board board) {
SVGElement area = (SVGElement) svg.getElementById("area");
NodeList<Element> nodeList = area.getElementsByTagName("path");
for (int i = 0; i < nodeList.getLength(); ++i) {
SVGElement item = (SVGElement) nodeList.getItem(i);
OMElement node = OMElement.convert(item);
((HasMouseMoveHandlers) node).addMouseMoveHandler(this);
((HasMouseDownHandlers) node).addMouseDownHandler(this);
}
}
开发者ID:rzymek,项目名称:obsolete-web-boards-gwt,代码行数:12,代码来源:EditDisplay.java
注:本文中的com.google.gwt.event.dom.client.HasMouseMoveHandlers类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论