在Java中克隆事件的目的和好处是什么?

时间:2018-03-01 18:22:14

标签: java events event-handling clone

我正在寻找一些反馈/洞察使用Javas克隆事件的能力。

/*create an eventhandler for the mouse click when on the imagetoview
 * This event handler is bound to the mouse_clicked event
 */
imagetoview.addEventHandler(MouseEvent.MOUSE_CLICKED, new EventHandler<MouseEvent>() {
    //define a public override to set the functionality of the new 
    //mouse click event handler
    @Override public void handle(MouseEvent e) {
        Object clone = e.clone();
    }
});

如果我可以访问原始的所有事件数据,为什么我会使用此功能?

0 个答案:

没有答案