Search in sources :

Example 76 with Button

use of com.vaadin.ui.Button in project Activiti by Activiti.

the class DeploymentDetailPanel method addActions.

protected void addActions() {
    // Delete button
    Button deleteButton = new Button(i18nManager.getMessage(Messages.DEPLOYMENT_DELETE));
    deleteButton.setIcon(Images.DELETE);
    deleteButton.addListener(new ClickListener() {

        public void buttonClick(ClickEvent event) {
            viewManager.showPopupWindow(new DeleteDeploymentPopupWindow(deployment, parent));
        }
    });
    parent.getToolBar().removeAllButtons();
    parent.getToolBar().addButton(deleteButton);
}
Also used : Button(com.vaadin.ui.Button) ClickEvent(com.vaadin.ui.Button.ClickEvent) ClickListener(com.vaadin.ui.Button.ClickListener)

Example 77 with Button

use of com.vaadin.ui.Button in project Activiti by Activiti.

the class DeploymentDetailPanel method addProcessDefinitionLinks.

protected void addProcessDefinitionLinks() {
    List<ProcessDefinition> processDefinitions = repositoryService.createProcessDefinitionQuery().deploymentId(deployment.getId()).orderByProcessDefinitionName().asc().list();
    if (!processDefinitions.isEmpty()) {
        // Header
        Label processDefinitionHeader = new Label(i18nManager.getMessage(Messages.DEPLOYMENT_HEADER_DEFINITIONS));
        processDefinitionHeader.addStyleName(ExplorerLayout.STYLE_H3);
        processDefinitionHeader.addStyleName(ExplorerLayout.STYLE_DETAIL_BLOCK);
        processDefinitionHeader.setWidth(100, UNITS_PERCENTAGE);
        addDetailComponent(processDefinitionHeader);
        // processes
        VerticalLayout processDefinitionLinksLayout = new VerticalLayout();
        processDefinitionLinksLayout.setSpacing(true);
        processDefinitionLinksLayout.setMargin(true, false, true, false);
        addDetailComponent(processDefinitionLinksLayout);
        for (final ProcessDefinition processDefinition : processDefinitions) {
            Button processDefinitionButton = new Button(getProcessDisplayName(processDefinition));
            processDefinitionButton.addListener(new ClickListener() {

                public void buttonClick(ClickEvent event) {
                    viewManager.showDeployedProcessDefinitionPage(processDefinition.getId());
                }
            });
            processDefinitionButton.addStyleName(Reindeer.BUTTON_LINK);
            processDefinitionLinksLayout.addComponent(processDefinitionButton);
        }
    }
}
Also used : Button(com.vaadin.ui.Button) ClickEvent(com.vaadin.ui.Button.ClickEvent) Label(com.vaadin.ui.Label) PrettyTimeLabel(org.activiti.explorer.ui.custom.PrettyTimeLabel) VerticalLayout(com.vaadin.ui.VerticalLayout) ProcessDefinition(org.activiti.engine.repository.ProcessDefinition) ClickListener(com.vaadin.ui.Button.ClickListener)

Example 78 with Button

use of com.vaadin.ui.Button in project Activiti by Activiti.

the class EventOverviewPanel method initEvents.

protected void initEvents() {
    HorizontalLayout eventsHeader = new HorizontalLayout();
    eventsHeader.setSpacing(true);
    eventsHeader.setWidth(80, UNITS_PERCENTAGE);
    eventsHeader.addStyleName(ExplorerLayout.STYLE_DETAIL_BLOCK);
    addDetailComponent(eventsHeader);
    initEventTitle(eventsHeader);
    stepButton = new Button(i18nManager.getMessage(Messages.CRYSTALBALL_BUTTON_NEXTEVENT));
    stepButton.setEnabled(false);
    stepButton.addListener(new ClickListener() {

        private static final long serialVersionUID = 1L;

        @Override
        public void buttonClick(ClickEvent event) {
            if (!SimulationRunContext.getEventCalendar().getEvents().isEmpty()) {
                simulationDebugger.step();
                refreshEvents();
            }
        }
    });
    eventsHeader.addComponent(stepButton);
    eventsHeader.setComponentAlignment(stepButton, Alignment.MIDDLE_LEFT);
    showProcessInstanceButton = new Button();
    showProcessInstanceButton.addStyleName(Reindeer.BUTTON_LINK);
    showProcessInstanceButton.addListener(new ClickListener() {

        private static final long serialVersionUID = 1L;

        public void buttonClick(ClickEvent event) {
            if (replayHistoricInstance != null) {
                ExplorerApp.get().getViewManager().showMyProcessInstancesPage(replayHistoricInstance.getId());
            }
        }
    });
    eventsHeader.addComponent(showProcessInstanceButton);
    eventsHeader.setComponentAlignment(showProcessInstanceButton, Alignment.MIDDLE_LEFT);
    eventLayout = new HorizontalLayout();
    eventLayout.setWidth(100, UNITS_PERCENTAGE);
    addDetailComponent(eventLayout);
    initEventsTable();
}
Also used : Button(com.vaadin.ui.Button) ClickEvent(com.vaadin.ui.Button.ClickEvent) ClickListener(com.vaadin.ui.Button.ClickListener) HorizontalLayout(com.vaadin.ui.HorizontalLayout)

Example 79 with Button

use of com.vaadin.ui.Button in project Activiti by Activiti.

the class MainMenuBar method initButtons.

protected void initButtons() {
    // TODO: fixed widths based on i18n strings?
    Button taskButton = addMenuButton(ViewManager.MAIN_NAVIGATION_TASK, i18nManager.getMessage(Messages.MAIN_MENU_TASKS), Images.MAIN_MENU_TASKS, false, 80);
    taskButton.addListener(new ShowTasksClickListener());
    menuItemButtons.put(ViewManager.MAIN_NAVIGATION_TASK, taskButton);
    Button processButton = addMenuButton(ViewManager.MAIN_NAVIGATION_PROCESS, i18nManager.getMessage(Messages.MAIN_MENU_PROCESS), Images.MAIN_MENU_PROCESS, false, 80);
    processButton.addListener(new ShowProcessDefinitionsClickListener());
    menuItemButtons.put(ViewManager.MAIN_NAVIGATION_PROCESS, processButton);
    Button reportingButton = addMenuButton(ViewManager.MAIN_NAVIGATION_REPORT, i18nManager.getMessage(Messages.MAIN_MENU_REPORTS), Images.MAIN_MENU_REPORTS, false, 80);
    reportingButton.addListener(new ShowReportsClickListener());
    menuItemButtons.put(ViewManager.MAIN_NAVIGATION_REPORT, reportingButton);
    if (ExplorerApp.get().getLoggedInUser().isAdmin()) {
        Button manageButton = addMenuButton(ViewManager.MAIN_NAVIGATION_MANAGE, i18nManager.getMessage(Messages.MAIN_MENU_MANAGEMENT), Images.MAIN_MENU_MANAGE, false, 90);
        manageButton.addListener(new ShowManagementClickListener());
        menuItemButtons.put(ViewManager.MAIN_NAVIGATION_MANAGE, manageButton);
    }
}
Also used : Button(com.vaadin.ui.Button)

Example 80 with Button

use of com.vaadin.ui.Button in project Activiti by Activiti.

the class MainMenuBar method setMainNavigation.

/**
   * Highlights the given main navigation in the menubar.
   */
public synchronized void setMainNavigation(String navigation) {
    if (currentMainNavigation != null) {
        menuItemButtons.get(currentMainNavigation).removeStyleName(ExplorerLayout.STYLE_ACTIVE);
    }
    currentMainNavigation = navigation;
    Button current = menuItemButtons.get(navigation);
    if (current != null) {
        current.addStyleName(ExplorerLayout.STYLE_ACTIVE);
    }
}
Also used : Button(com.vaadin.ui.Button)

Aggregations

Button (com.vaadin.ui.Button)114 ClickEvent (com.vaadin.ui.Button.ClickEvent)72 ClickListener (com.vaadin.ui.Button.ClickListener)64 HorizontalLayout (com.vaadin.ui.HorizontalLayout)33 VerticalLayout (com.vaadin.ui.VerticalLayout)25 Label (com.vaadin.ui.Label)21 Chart (com.vaadin.addon.charts.Chart)8 ListSeries (com.vaadin.addon.charts.model.ListSeries)8 TextField (com.vaadin.ui.TextField)8 SubmitEvent (org.activiti.explorer.ui.event.SubmitEvent)7 Configuration (com.vaadin.addon.charts.model.Configuration)6 LayoutClickEvent (com.vaadin.event.LayoutEvents.LayoutClickEvent)6 LayoutClickListener (com.vaadin.event.LayoutEvents.LayoutClickListener)6 ClaimTaskClickListener (org.activiti.explorer.ui.task.listener.ClaimTaskClickListener)5 ComboBox (com.vaadin.ui.ComboBox)4 FormLayout (com.vaadin.ui.FormLayout)4 Window (com.vaadin.ui.Window)4 SimpleDateFormat (java.text.SimpleDateFormat)4 SubmitEventListener (org.activiti.explorer.ui.event.SubmitEventListener)4 VertexRef (org.opennms.features.topology.api.topo.VertexRef)4