class LienzoPanelFocusHandler {

    public LienzoPanelFocusHandler listen(final LienzoPanel panel,
                                          final Command onFocus,
                                          final Command onLostFocus) {
        clear();
        overHandler = panel.getView().addMouseOverHandler(mouseOverEvent -> onFocus.execute());
        outHandler = panel.getView().addMouseOutHandler(mouseOutEvent -> onLostFocus.execute());
        return this;
    }

}