public void setModel(PlotModel model) {
        surfacePanel.setModel(model.getModel());
        setLayout(new BorderLayout());
        task = model.getModel().plot();
        surfacePanel.setBackground(Color.white);
        surfacePanel.setConfigurationVisible(true);
        add(surfacePanel, BorderLayout.CENTER);

        final Projector projector = surfacePanel.getSurface().getModel().getProjector();

        surfacePanel.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW)
                .put(KeyStroke.getKeyStroke(KeyEvent.VK_S, KeyEvent.CTRL_DOWN_MASK), "Save");
        surfacePanel.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW)
                .put(KeyStroke.getKeyStroke(KeyEvent.VK_UP, 0), "Up");
        surfacePanel.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW)
                .put(KeyStroke.getKeyStroke(KeyEvent.VK_DOWN, 0), "Down");
        surfacePanel.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW)
                .put(KeyStroke.getKeyStroke(KeyEvent.VK_RIGHT, 0), "Right");
        surfacePanel.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW)
                .put(KeyStroke.getKeyStroke(KeyEvent.VK_LEFT, 0), "Left");

        surfacePanel.getActionMap().put("Save",
                new AbstractAction() {
                    @Override
                    public void actionPerformed(ActionEvent e) {
                        try {
                            File file = OpenFileHelper.open(null);
                            if (file.exists()) {
                                file = new File(file.getAbsolutePath());
                            }
                            surfacePanel.getSurface().doExportPNG(file);
                        } catch (IOException | NullPointerException ex) {
                            logger.error(ex);
                        }
                    }
                });

        surfacePanel.getActionMap().put("Up",
                new AbstractAction() {
                    @Override
                    public void actionPerformed(ActionEvent e) {
                        float newAngle = projector.getElevationAngle() + DEFAULT_ANGLE_STEP;
                        projector.setElevationAngle(newAngle);
                        repaint();
                    }
                });

        surfacePanel.getActionMap().put("Down",
                new AbstractAction() {
                    @Override
                    public void actionPerformed(ActionEvent e) {
                        float newAngle = projector.getElevationAngle() - DEFAULT_ANGLE_STEP;
                        projector.setElevationAngle(newAngle);
                        repaint();
                    }
                });

        surfacePanel.getActionMap().put("Right",
                new AbstractAction() {
                    @Override
                    public void actionPerformed(ActionEvent e) {
                        float newAngle = projector.getRotationAngle() + DEFAULT_ANGLE_STEP;
                        projector.setRotationAngle(newAngle);
                        repaint();
                    }
                });

        surfacePanel.getActionMap().put("Left",
                new AbstractAction() {
                    @Override
                    public void actionPerformed(ActionEvent e) {
                        float newAngle = projector.getRotationAngle() - DEFAULT_ANGLE_STEP;
                        projector.setRotationAngle(newAngle);
                        repaint();
                    }
                });

    }