public GraphArrayWindow(
      AllCommandsExecutor allCommandsExecutor,
      SimulationConstructionSet sim,
      GUIEnablerAndDisabler guiEnablerAndDisabler,
      ConfigurationList configurationList,
      GraphGroupList graphGroupList,
      String graphGroupName,
      GraphConfigurationList graphConfigurationList,
      SelectedVariableHolder selectedVariableHolder,
      DataBuffer dataBuffer,
      StandardGUIActions mainGUIActions,
      int screenID,
      Point windowLocation,
      Dimension windowSize,
      boolean maximizeWindow) {
    this.configurationList = configurationList;
    this.graphGroupList = graphGroupList;
    this.graphConfigurationList = graphConfigurationList;

    GraphicsConfiguration configurationToUse = null;
    GraphicsEnvironment graphicsEnvironment = GraphicsEnvironment.getLocalGraphicsEnvironment();
    GraphicsDevice[] devices = graphicsEnvironment.getScreenDevices();
    for (int j = 0; j < devices.length; j++) {
      // GraphicsDevice graphicsDevice = devices[j];
      if (devices[j].toString().indexOf("screen=" + screenID) >= 0)
        configurationToUse = devices[j].getDefaultConfiguration();
    }

    String windowName;

    if (graphGroupName != null) {
      windowName = "Graph Window: " + graphGroupName;
      this.name = graphGroupName;
    } else {
      windowName = "Graph Window";
      this.name = "Unnamed";
    }

    frame = new JFrame(windowName, configurationToUse);
    frame.setName(windowName);
    myGraphArrayPanel = new GraphArrayPanel(selectedVariableHolder, dataBuffer, frame);

    windowGUIActions = new StandardGUIActions();

    SaveGraphConfigurationDialogConstructor saveGraphConfigurationDialogConstructor =
        new SaveGraphConfigurationDialogGenerator(guiEnablerAndDisabler, frame, myGraphArrayPanel);

    LoadGraphGroupDialogConstructor loadGraphGroupDialogConstructor =
        new LoadGraphGroupDialogGenerator(
            sim, sim.getStandardSimulationGUI(), this, frame, myGraphArrayPanel);

    PrintGraphsDialogConstructor printGraphsDialogConstructor =
        new PrintGraphsDialogGenerator(myGraphArrayPanel);

    ExportGraphsToFileConstructor exportGraphsToFileConstructor;
    if (USE_CSV_INSTEAD_OF_MATLAB) {
      exportGraphsToFileConstructor =
          new CsvExportGraphsToFileGenerator(
              sim, frame, myGraphArrayPanel, sim.getStandardSimulationGUI());
    } else {
      exportGraphsToFileConstructor =
          new MatlabExportGraphsToFileGenerator(
              sim, frame, myGraphArrayPanel, sim.getStandardSimulationGUI());
    }

    windowGUIActions.createGraphWindowActions(
        mainGUIActions,
        myGraphArrayPanel,
        saveGraphConfigurationDialogConstructor,
        loadGraphGroupDialogConstructor,
        printGraphsDialogConstructor,
        exportGraphsToFileConstructor);
    JPanel buttonPanel = windowGUIActions.createGraphWindowButtons();
    JMenuBar menuBar = windowGUIActions.createGraphWindowMenus();

    frame.setJMenuBar(menuBar);

    frame.getContentPane().add(buttonPanel, "South");

    JPanel graphArrayAndButtonPanel = new JPanel(new java.awt.BorderLayout());
    graphArrayAndButtonPanel.add("Center", myGraphArrayPanel);

    JPanel graphButtonPanel = myGraphArrayPanel.createGraphButtonPanel();
    graphArrayAndButtonPanel.add("South", graphButtonPanel);

    frame.getContentPane().add(graphArrayAndButtonPanel);

    this.selectGraphGroup(graphGroupName);

    if (windowLocation != null) frame.setLocation(windowLocation);

    frame.pack();

    if (maximizeWindow) {
      frame.setExtendedState(Frame.MAXIMIZED_BOTH);
    } else if (windowSize != null) frame.setSize(windowSize);

    frame.setVisible(true);
  }