code: public void setModel(@Nonnull final MindMap model, final boolean notifyModelChangeListeners) {
      this.lock();
      try {
        if (this.elementUnderEdit != null) {
          Utils.safeSwingBlockingCall(new Runnable() {
            @Override
            public void run() {
              endEdit(false);
            }
          });
        }
  
        final List<int[]> selectedPaths = new ArrayList<int[]>();
        for (final Topic t : this.selectedTopics) {
          selectedPaths.add(t.getPositionPath());
        }
  
        this.selectedTopics.clear();
  
        final MindMap oldModel = this.model;
        this.model = assertNotNull("Model must not be null", model);
  
        for (final PanelAwarePlugin p : MindMapPluginRegistry.getInstance().findFor(PanelAwarePlugin.class)) {
          p.onPanelModelChange(this, oldModel, this.model);
        }
  
        doLayout();
        revalidate();
  
        boolean selectionChanged = false;
        for (final int[] posPath : selectedPaths) {
          final Topic topic = this.model.findForPositionPath(posPath);
          if (topic == null) {
            selectionChanged = true;
          } else if (!MindMapUtils.isHidden(topic)) {
            this.selectedTopics.add(topic);
          }
        }
        if (selectionChanged) {
          fireNotificationSelectionChanged();
        }
        repaint();
      } finally {
        this.unlock();
        if (notifyModelChangeListeners) {
          fireNotificationMindMapChanged(true);
        }
      }
    }
docs: Set model for the panel, allows to notify listeners optionally.
  
  @param model model to be set
  @param notifyModelChangeListeners true if to notify model change listeners,
  false otherwise
  @since 1.3.0