Esempio n. 1
0
  /**
   * Enables and/or disables buttons based on how many projects exist (in the case of "Download All
   * Projects") or are selected (in the case of "Delete" and "Download Source").
   */
  public void updateButtons() {
    ProjectList projectList = ProjectListBox.getProjectListBox().getProjectList();
    int numProjects = projectList.getNumProjects();
    int numSelectedProjects = projectList.getNumSelectedProjects();

    setButtonEnabled(WIDGET_NAME_DOWNLOAD_ALL, numProjects > 0);

    setButtonEnabled(WIDGET_NAME_DELETE, numSelectedProjects > 0);

    setDropItemEnabled(
        WIDGET_NAME_MORE_ACTIONS, WIDGET_NAME_DOWNLOAD_SOURCE, numSelectedProjects == 1);
  }
 /**
  * Enables and/or disables buttons based on how many projects exist (in the case of "Download All
  * Projects") or are selected (in the case of "Delete" and "Download Source").
  */
 public void updateButtons() {
   ProjectList projectList = ProjectListBox.getProjectListBox().getProjectList();
   int numProjects = projectList.getNumProjects();
   int numSelectedProjects = projectList.getNumSelectedProjects();
   setButtonEnabled(WIDGET_NAME_DELETE, numSelectedProjects > 0);
   Ode.getInstance()
       .getTopToolbar()
       .fileDropDown
       .setItemEnabled(MESSAGES.deleteProjectMenuItem(), numSelectedProjects > 0);
   Ode.getInstance()
       .getTopToolbar()
       .fileDropDown
       .setItemEnabled(MESSAGES.exportProjectMenuItem(), numSelectedProjects > 0);
   Ode.getInstance()
       .getTopToolbar()
       .fileDropDown
       .setItemEnabled(MESSAGES.exportAllProjectsMenuItem(), numSelectedProjects > 0);
 }