KnownArguments knownArguments = documentManager!=null ? documentManager.getKnownArguments() : null;
Clipboard clipboard = documentManager!=null?documentManager.getClipboard() : null;
KetPanel ketPanel = document.getKetPanel();
ketTransfer = new KetTransfer(ketPanel, knownArguments, clipboard, document.getMathCollection());
ketPanel.setTransferHandler(ketTransfer);
toolBarEventHandler = new ToolBarEventHandler(document);
String edge = ToolBarEventHandler.HORIZONAL_TOOLBAR_AXIS?BorderLayout.PAGE_START:BorderLayout.WEST;
add(toolBarEventHandler.getToolBar(), edge);
add(ketPanel, BorderLayout.CENTER);
KetFrameListener ketFrameListener = new KetFrameListener(document);
addWindowListener(ketFrameListener); // ZZ or ZQ