this.modes = new Modes(this);
this.colourScheme = new ColourSchemeDecorator(ColourScheme.WHITEBOARD, mathCollection, modes.getSearch(), modes);
this.ketPanel = new KetPanel(this);
this.ketPanel.setPreferredSize(new Dimension(FrameManager.SCREEN_WIDTH, FrameManager.SCREEN_HEIGHT));
this.frameManager = new FrameManager(documentManager, this, existingFrame);
this.keyboardEventHandler = new KeyboardEventHandler(this, ketPanel);
this.scrollListener = new ScrollListener(this);
initContent(filename);
if (editable) {
ketPanel.addKeyListener(keyboardEventHandler);
ketPanel.addMouseWheelListener(scrollListener);