Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/ruby-on-rails-4/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
GWT:如何为CellTable捕获简单的MouseOverEvent?_Gwt_Handler_Mouseover_Celltable - Fatal编程技术网

GWT:如何为CellTable捕获简单的MouseOverEvent?

GWT:如何为CellTable捕获简单的MouseOverEvent?,gwt,handler,mouseover,celltable,Gwt,Handler,Mouseover,Celltable,我发现一个代码,每当用户将鼠标悬停在任何单元格上时,该代码都会处理鼠标悬停事件: table.addCellPreviewHandler(new Handler<List<String>>() { @Override public void onCellPreview(

我发现一个代码,每当用户将鼠标悬停在任何单元格上时,该代码都会处理鼠标悬停事件:

                 table.addCellPreviewHandler(new Handler<List<String>>()
                    {

                        @Override
                        public void onCellPreview(
                            CellPreviewEvent<List<String>> event)
                        {
                            if ("mouseover".equals(event.getNativeEvent().getType())) {
                                Element cellElement = event.getNativeEvent().getEventTarget().cast();
                                // play with element
                                System.out.println(" message !!");
                            }
                        }
                    });
table.addCellPreviewHandler(新处理程序()
{
@凌驾
公共void oncell预览(
CellPreviewEvent事件)
{
if(“mouseover”.equals(event.getNativeEvent().getType())){
元素cellElement=event.getNativeEvent().getEventTarget().cast();
//玩弄元素
System.out.println(“message!!”);
}
}
});
当用户将鼠标悬停在列的标题上时,什么也不会发生。 鼠标悬停在边框上时也应触发Mouseover事件。

table.addDomHandler(新的MouseOverHandler(){
@凌驾
MouseOver上的公共无效(MouseOverEvent事件){
//处理事件
}
},MouseOverEvent.getType());