Package org.activiti.explorer.ui.custom.ToolbarEntry

Examples of org.activiti.explorer.ui.custom.ToolbarEntry.ToolbarCommand


    // TODO: the counts should be done later by eg a Refresher component

    // Inbox
    long inboxCount = new InboxListQuery().size();
    ToolbarEntry inboxEntry = addToolbarEntry(ENTRY_INBOX, i18nManager.getMessage(Messages.TASK_MENU_INBOX), new ToolbarCommand() {
      public void toolBarItemSelected() {
        viewManager.showInboxPage();
      }
    });
    inboxEntry.setCount(inboxCount);
   
    // Tasks
    LoggedInUser user = ExplorerApp.get().getLoggedInUser();
    long tasksCount = new TasksListQuery().size();
    ToolbarEntry tasksEntry = addToolbarEntry(ENTRY_TASKS, i18nManager.getMessage(Messages.TASK_MENU_TASKS), new ToolbarCommand() {
      public void toolBarItemSelected() {
        viewManager.showTasksPage();
      }
    });
    tasksEntry.setCount(tasksCount);
   
    // Queued
    List<Group> groups = identityService.createGroupQuery().groupMember(user.getId()).list();
    ToolbarPopupEntry queuedItem = addPopupEntry(ENTRY_QUEUED, (i18nManager.getMessage(Messages.TASK_MENU_QUEUED)));
    long queuedCount = 0;
    for (final Group group : groups) {
      if (group.getType().equals("assignment")) {
        long groupCount = new QueuedListQuery(group.getId()).size();
       
        queuedItem.addMenuItem(group.getName() + " (" + groupCount + ")", new ToolbarCommand() {
          public void toolBarItemSelected() {
            viewManager.showQueuedPage(group.getId());
          }
        });
       
        queuedCount += groupCount;
      }
    }
    queuedItem.setCount(queuedCount);
   
    // Involved
    long involvedCount = new InvolvedListQuery().size();
    ToolbarEntry involvedEntry = addToolbarEntry(ENTRY_INVOLVED, i18nManager.getMessage(Messages.TASK_MENU_INVOLVED), new ToolbarCommand() {
      public void toolBarItemSelected() {
        viewManager.showInvolvedPage();
      }
    });
    involvedEntry.setCount(involvedCount);
   
    // Archived
    long archivedCount = new ArchivedListQuery().size();
    ToolbarEntry archivedEntry = addToolbarEntry(ENTRY_ARCHIVED, i18nManager.getMessage(Messages.TASK_MENU_ARCHIVED), new ToolbarCommand() {
      public void toolBarItemSelected() {
        viewManager.showArchivedPage();
      }
    });
    archivedEntry.setCount(archivedCount);
View Full Code Here


  }
 
  protected ToolBar initToolbar() {
    toolBar = new ToolBar();
   
    toolBar.addToolbarEntry(KEY_EDITOR, ExplorerApp.get().getI18nManager().getMessage(Messages.PROCESS_EDITOR_TITLE), new ToolbarCommand() {
      public void toolBarItemSelected() {
        if (imagePanel != null) {
          imagePanel.setVisible(false);
          editorGrid.setVisible(true);
          toolBar.setActiveEntry(KEY_EDITOR);
        }
      }
    });
   
    toolBar.addToolbarEntry(KEY_PREVIEW, ExplorerApp.get().getI18nManager().getMessage(Messages.PROCESS_EDITOR_BPMN_PREVIEW), new ToolbarCommand() {
      public void toolBarItemSelected() {
        editorGrid.setVisible(false);
        showDiagram();
        toolBar.setActiveEntry(KEY_PREVIEW);
      }
View Full Code Here

    addRunReportsToolbarEntry();
    addSavedReportsToolbarEntry();
  }

  protected void addRunReportsToolbarEntry() {
    addToolbarEntry(ENTRY_RUN_REPORTS, i18nManager.getMessage(Messages.REPORTING_MENU_RUN_REPORTS), new ToolbarCommand() {
      public void toolBarItemSelected() {
        viewManager.showRunReportPage();
      }
    });
  }
View Full Code Here

      }
    });
  }
 
  protected void addSavedReportsToolbarEntry() {
    addToolbarEntry(ENTRY_SAVED_REPORTS, i18nManager.getMessage(Messages.REPORTING_MENU_SAVED_REPORTS), new ToolbarCommand() {
      public void toolBarItemSelected() {
        viewManager.showSavedReportPage();
      }
    });
  }
View Full Code Here

    // TODO: the counts should be done later by eg a Refresher component

    // Inbox
    long inboxCount = new InboxListQuery().size();
    ToolbarEntry inboxEntry = addToolbarEntry(ENTRY_INBOX, i18nManager.getMessage(Messages.TASK_MENU_INBOX), new ToolbarCommand() {
      public void toolBarItemSelected() {
        viewManager.showInboxPage();
      }
    });
    inboxEntry.setCount(inboxCount);
   
    // Tasks
    LoggedInUser user = ExplorerApp.get().getLoggedInUser();
    long tasksCount = new TasksListQuery().size();
    ToolbarEntry tasksEntry = addToolbarEntry(ENTRY_TASKS, i18nManager.getMessage(Messages.TASK_MENU_TASKS), new ToolbarCommand() {
      public void toolBarItemSelected() {
        viewManager.showTasksPage();
      }
    });
    tasksEntry.setCount(tasksCount);
   
    // Queued
    List<Group> groups = user.getGroups();
    ToolbarPopupEntry queuedItem = addPopupEntry(ENTRY_QUEUED, (i18nManager.getMessage(Messages.TASK_MENU_QUEUED)));
    long queuedCount = 0;
    for (final Group group : groups) {
      long groupCount = new QueuedListQuery(group.getId()).size();

      queuedItem.addMenuItem(group.getName() + " (" + groupCount + ")", new ToolbarCommand() {

        public void toolBarItemSelected() {
          viewManager.showQueuedPage(group.getId());
        }
      });

      queuedCount += groupCount;
    }
    queuedItem.setCount(queuedCount);
   
    // Involved
    long involvedCount = new InvolvedListQuery().size();
    ToolbarEntry involvedEntry = addToolbarEntry(ENTRY_INVOLVED, i18nManager.getMessage(Messages.TASK_MENU_INVOLVED), new ToolbarCommand() {
      public void toolBarItemSelected() {
        viewManager.showInvolvedPage();
      }
    });
    involvedEntry.setCount(involvedCount);
   
    // Archived
    long archivedCount = new ArchivedListQuery().size();
    ToolbarEntry archivedEntry = addToolbarEntry(ENTRY_ARCHIVED, i18nManager.getMessage(Messages.TASK_MENU_ARCHIVED), new ToolbarCommand() {
      public void toolBarItemSelected() {
        viewManager.showArchivedPage();
      }
    });
    archivedEntry.setCount(archivedCount);
View Full Code Here

    addAdministrationToolbarEntry();
    addCrystalBallToolbarEntry();
  }

  protected void addDatabaseToolbarEntry() {
    addToolbarEntry(ENTRY_DATABASE, i18nManager.getMessage(Messages.MGMT_MENU_DATABASE), new ToolbarCommand() {
      public void toolBarItemSelected() {
        viewManager.showDatabasePage();
      }
    });
  }
View Full Code Here

    });
  }

  protected void addDeploymentsToolbarEntry() {
    ToolbarPopupEntry deploymentEntry = addPopupEntry(ENTRY_DEPLOYMENTS, i18nManager.getMessage(Messages.MGMT_MENU_DEPLOYMENTS));
    deploymentEntry.addMenuItem(i18nManager.getMessage(Messages.MGMT_MENU_DEPLOYMENTS_SHOW_ALL), new ToolbarCommand() {
      public void toolBarItemSelected() {
        viewManager.showDeploymentPage();
      }
    });
    deploymentEntry.addMenuItem(i18nManager.getMessage(Messages.MGMT_MENU_DEPLOYMENTS_UPLOAD), new NewDeploymentListener());
View Full Code Here

    deploymentEntry.addMenuItem(i18nManager.getMessage(Messages.MGMT_MENU_DEPLOYMENTS_UPLOAD), new NewDeploymentListener());
  }
 
  protected void addActiveProcessDefinitionsEntry() {
    addToolbarEntry(ENTRY_ACTIVE_PROCESS_DEFINITIONS,
            i18nManager.getMessage(Messages.MGMT_MENU_ACTIVE_PROCESS_DEFINITIONS), new ToolbarCommand() {
      public void toolBarItemSelected() {
        viewManager.showActiveProcessDefinitionsPage();
      }
    });
  }
View Full Code Here

    });
  }
 
  protected void addSuspendedProcessDefinitionsEntry() {
    addToolbarEntry(ENTRY_SUSPENDED_PROCESS_DEFINITIONS,
            i18nManager.getMessage(Messages.MGMT_MENU_SUSPENDED_PROCESS_DEFINITIONS), new ToolbarCommand() {
      public void toolBarItemSelected() {
        viewManager.showSuspendedProcessDefinitionsPage();
      }
    });
  }
View Full Code Here

      }
    });
  }

  protected void addJobsToolbarEntry() {
    addToolbarEntry(ENTRY_JOBS, i18nManager.getMessage(Messages.MGMT_MENU_JOBS), new ToolbarCommand() {
      public void toolBarItemSelected() {
        viewManager.showJobPage();
      }
    });
  }
View Full Code Here

TOP

Related Classes of org.activiti.explorer.ui.custom.ToolbarEntry.ToolbarCommand

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.