public void setModel(Model model) {
        setSimulation(false);
        if (this.model != null) {
            this.model.unregisterListener(this);
        }
        this.model = model;
        final boolean isModelPresent = model != null;
        fileSave.setEnabled(isModelPresent && model.hasBackingFile());
        fileSaveAs.setEnabled(isModelPresent);
        actionClear.setEnabled(isModelPresent);
        actionLaunchSimulation.setEnabled(isModelPresent && !model.getAccessPoints().isEmpty());
        actionStopSimulation.setEnabled(false);
        toolAp.setEnabled(isModelPresent);
        toolRepeater.setEnabled(false);
        toolWall.setEnabled(isModelPresent);
        toolRoom.setEnabled(isModelPresent);
        toolDoor.setEnabled(false);
        if (!isModelPresent) {
            return;
        }
        final List<AccessPoint> aps = model.getAccessPoints();
        comboBoxAp.setAlignmentX(Component.LEFT_ALIGNMENT);
        comboBoxAp.setModel(new DefaultComboBoxModel<>(aps.toArray(new AccessPoint[aps.size()])));
        model.registerListener(this);
    }