organizer.buildCommunityAction,
  public OrganizerMouseListener(Organizer organizer,                                OrganizerTree workspace) {    this.organizer = organizer;    this.workspace = workspace;    // define pop-up menus    Object[] rootMenuItems = {      newExperimentMenu,      newRecipeMenu,      organizer.newFolderAction,      organizer.renameWorkspaceAction,      organizer.deleteExperimentFromDatabaseAction,      organizer.deleteRecipeFromDatabaseAction    };    Object[] experimentMenuItems = {      organizer.buildCommunityAction,      organizer.buildExperimentAction,      organizer.runExperimentAction,      organizer.duplicateAction,      organizer.deleteExperimentAction,      organizer.renameExperimentAction,      organizer.configureAction,      organizer.saveAction    };    Object[] societyMenuItems = {      organizer.configureAction,      organizer.buildExperimentAction,      organizer.duplicateAction,      organizer.deleteSocietyAction,      organizer.renameSocietyAction,      organizer.saveAction    };    Object[] recipeMenuItems = {      organizer.configureAction,      organizer.duplicateAction,      organizer.deleteRecipeAction,      organizer.renameRecipeAction,      organizer.saveAction    };    Object[] folderMenuItems = {      newExperimentInFolderMenu,      newRecipeInFolderMenu,      organizer.newFolderAction,      organizer.deleteFolderAction,      organizer.renameFolderAction    };    // set up experiment submenus    for (int i = 0; i < organizer.newExperimentActions.length; i++) {      newExperimentMenu.add(organizer.newExperimentActions[i]);      newExperimentInFolderMenu.add(organizer.newExperimentActions[i]);    }    // set up recipe submenus    for (int i = 0; i < organizer.newRecipeActions.length; i++) {      newRecipeMenu.add(organizer.newRecipeActions[i]);      newRecipeInFolderMenu.add(organizer.newRecipeActions[i]);    }    for (int i = 0; i < rootMenuItems.length; i++) {      if (rootMenuItems[i] instanceof Action)        rootMenu.add((Action)rootMenuItems[i]);      else        rootMenu.add((JMenuItem)rootMenuItems[i]);    }    for (int i = 0; i < experimentMenuItems.length; i++)       experimentMenu.add((Action)experimentMenuItems[i]);    for (int i = 0; i < societyMenuItems.length; i++)      societyMenu.add((Action)societyMenuItems[i]);    for (int i = 0; i < recipeMenuItems.length; i++)      recipeMenu.add((Action)recipeMenuItems[i]);    for (int i = 0; i < folderMenuItems.length; i++) {      if (folderMenuItems[i] instanceof Action)        folderMenu.add((Action)folderMenuItems[i]);      else        folderMenu.add((JMenuItem)folderMenuItems[i]);    }  }