class LienzoCanvasMediators {

    public void init(final Supplier<LienzoCanvas> canvas) {
        keyEventHandler.addKeyShortcutCallback(new KogitoKeyShortcutKeyDownThenUp(new Key[]{Key.ALT}, "Navigate | Hold and drag to Pan", this::enablePan, this::clear));
        keyEventHandler.addKeyShortcutCallback(new KogitoKeyShortcutKeyDownThenUp(new Key[]{Key.CONTROL}, "Navigate | Hold and scroll to Zoom", this::enableZoom, this::clear));
        keyEventHandler.addKeyShortcutCallback(new KogitoKeyShortcutKeyDownThenUp(new Key[]{Key.CONTROL, Key.ALT}, "Navigate | Hold to Preview", this::enablePreview, this::clear));

        keyEventHandler
                .setTimerDelay(150)
                .addKeyShortcutCallback(new KeyboardControl.KeyShortcutCallback() {
                    @Override
                    public void onKeyShortcut(Key... keys) {
                        if (doKeysMatch(keys,
                                        Key.CONTROL)) {
                            enableZoom();
                        } else if (doKeysMatch(keys,
                                               Key.ALT)) {
                            enablePan();
                        } else if (doKeysMatch(keys,
                                               Key.CONTROL,
                                               Key.ALT) ||
                                doKeysMatch(keys,
                                            Key.ALT,
                                            Key.CONTROL)) {
                            enablePreview();
                        }
                    }

                    @Override
                    public void onKeyUp(Key key) {
                        clear();
                    }
                });
        cursor = c -> canvas.get().getView().setCursor(c);
        final LienzoPanel panel = (LienzoPanel) canvas.get().getView().getPanel();
        this.mediators = mediatorsBuilder.apply(panel.getView());
        this.notification.init(() -> panel);
        setScaleAboutPoint(false);
    }

    @Inject public  LienzoCanvasMediators(final KeyEventHandler keyEventHandler,
                                 final ClientTranslationService translationService,
                                 final LienzoCanvasNotification notification,
                                 final EditorContextProvider editorContextProvider);
      LienzoCanvasMediators(final KeyEventHandler keyEventHandler,
                          final ClientTranslationService translationService,
                          final LienzoCanvasNotification notification,
                          final Function<LienzoBoundsPanel, PanelMediators> mediatorsBuilder);

}