Search in sources :

Example 1 with ToolbarCommand

use of org.activiti.explorer.ui.custom.ToolbarEntry.ToolbarCommand in project Activiti by Activiti.

the class ProcessMenuBar method init.

protected void init() {
    setWidth("100%");
    addToolbarEntry(ENTRY_MY_PROCESS_INSTANCES, i18nManager.getMessage(Messages.PROCESS_MENU_MY_INSTANCES), new ToolbarCommand() {

        public void toolBarItemSelected() {
            viewManager.showMyProcessInstancesPage();
        }
    });
    addToolbarEntry(DEPLOYED_PROCESS_DEFINITIONS, i18nManager.getMessage(Messages.PROCESS_MENU_DEPLOYED_DEFINITIONS), new ToolbarCommand() {

        public void toolBarItemSelected() {
            viewManager.showDeployedProcessDefinitionPage();
        }
    });
    addToolbarEntry(EDITOR_PROCESS_DEFINITIONS, i18nManager.getMessage(Messages.PROCESS_MENU_EDITOR_DEFINITIONS), new ToolbarCommand() {

        public void toolBarItemSelected() {
            viewManager.showEditorProcessDefinitionPage();
        }
    });
}
Also used : ToolbarCommand(org.activiti.explorer.ui.custom.ToolbarEntry.ToolbarCommand)

Example 2 with ToolbarCommand

use of org.activiti.explorer.ui.custom.ToolbarEntry.ToolbarCommand in project Activiti by Activiti.

the class SimpleTableEditor method initToolbar.

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);
        }
    });
    return toolBar;
}
Also used : ToolbarCommand(org.activiti.explorer.ui.custom.ToolbarEntry.ToolbarCommand) ToolBar(org.activiti.explorer.ui.custom.ToolBar)

Example 3 with ToolbarCommand

use of org.activiti.explorer.ui.custom.ToolbarEntry.ToolbarCommand in project Activiti by Activiti.

the class ManagementMenuBar method addDeploymentsToolbarEntry.

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());
}
Also used : NewDeploymentListener(org.activiti.explorer.ui.management.deployment.NewDeploymentListener) ToolbarCommand(org.activiti.explorer.ui.custom.ToolbarEntry.ToolbarCommand) ToolbarPopupEntry(org.activiti.explorer.ui.custom.ToolbarPopupEntry)

Example 4 with ToolbarCommand

use of org.activiti.explorer.ui.custom.ToolbarEntry.ToolbarCommand in project Activiti by Activiti.

the class TaskMenuBar method initItems.

protected void initItems() {
    setWidth("100%");
    // 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);
}
Also used : Group(org.activiti.engine.identity.Group) ArchivedListQuery(org.activiti.explorer.ui.task.data.ArchivedListQuery) ToolbarEntry(org.activiti.explorer.ui.custom.ToolbarEntry) InvolvedListQuery(org.activiti.explorer.ui.task.data.InvolvedListQuery) ToolbarCommand(org.activiti.explorer.ui.custom.ToolbarEntry.ToolbarCommand) TasksListQuery(org.activiti.explorer.ui.task.data.TasksListQuery) QueuedListQuery(org.activiti.explorer.ui.task.data.QueuedListQuery) LoggedInUser(org.activiti.explorer.identity.LoggedInUser) ToolbarPopupEntry(org.activiti.explorer.ui.custom.ToolbarPopupEntry) InboxListQuery(org.activiti.explorer.ui.task.data.InboxListQuery)

Aggregations

ToolbarCommand (org.activiti.explorer.ui.custom.ToolbarEntry.ToolbarCommand)4 ToolbarPopupEntry (org.activiti.explorer.ui.custom.ToolbarPopupEntry)2 Group (org.activiti.engine.identity.Group)1 LoggedInUser (org.activiti.explorer.identity.LoggedInUser)1 ToolBar (org.activiti.explorer.ui.custom.ToolBar)1 ToolbarEntry (org.activiti.explorer.ui.custom.ToolbarEntry)1 NewDeploymentListener (org.activiti.explorer.ui.management.deployment.NewDeploymentListener)1 ArchivedListQuery (org.activiti.explorer.ui.task.data.ArchivedListQuery)1 InboxListQuery (org.activiti.explorer.ui.task.data.InboxListQuery)1 InvolvedListQuery (org.activiti.explorer.ui.task.data.InvolvedListQuery)1 QueuedListQuery (org.activiti.explorer.ui.task.data.QueuedListQuery)1 TasksListQuery (org.activiti.explorer.ui.task.data.TasksListQuery)1