/**
   * Initialize toolbars. Crates a tool bar to show when selecting an alive agent, another for dead
   * agents, and a third one when no agent is selected.
   *
   * <p>I'm not sure if this is the best way to create the tool bars.
   *
   * <p>To add a new toolbar for new types of agents, see MultipleToolBar and ActionFactory.
   */
  private void initToolBar() {
    MultipleToolBar toolBar = mainWindow.getToolBar();
    ActionFactory actionFactory = ActionFactory.getInstance();
    Action[] normalActions = {
      actionFactory.getNewGameAction(),
      actionFactory.getStartStopAction(),
      actionFactory.getSaveGameAction(),
      actionFactory.getIncreaseCO2Action(),
      actionFactory.getDecreaseCO2Action(),
      actionFactory.getManageConnectionsAction(),
      actionFactory.getAbortTrackingAction(),
      actionFactory.getZoomInAction(),
      actionFactory.getZoomOutAction(),
      actionFactory.getToggleEfficiencyModeAction()
    };
    Action[] aliveActions = {
      actionFactory.getFeedAction(),
      actionFactory.getWeakenAction(),
      actionFactory.getKillAction(),
      actionFactory.getCopyAction(),
      actionFactory.getSaveImageAction(),
      actionFactory.getTrackAction(),
      actionFactory.getAbortTrackingAction(),
      actionFactory.getZoomInAction(),
      actionFactory.getZoomOutAction()
    };
    Action[] deadActions = {actionFactory.getReviveAction(), actionFactory.getDisperseAction()};

    toolBar.addActionArray("normal", normalActions);
    toolBar.selectActionArray("normal");
    toolBar.addActionArray("alive", aliveActions);
    toolBar.addActionArray("dead", deadActions);
  }