Search in sources :

Example 61 with HorizontalLayout

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

the class DatabaseDetailPanel method addTableName.

protected void addTableName() {
    HorizontalLayout header = new HorizontalLayout();
    header.setWidth(100, UNITS_PERCENTAGE);
    header.addStyleName(ExplorerLayout.STYLE_TITLE_BLOCK);
    header.setSpacing(true);
    // TODO: use right image
    Embedded image = new Embedded(null, Images.DATABASE_50);
    header.addComponent(image);
    header.setComponentAlignment(image, Alignment.MIDDLE_LEFT);
    header.setMargin(false, false, true, false);
    Label name = new Label(tableName);
    name.addStyleName(Reindeer.LABEL_H2);
    header.addComponent(name);
    header.setExpandRatio(name, 1.0f);
    header.setComponentAlignment(name, Alignment.MIDDLE_LEFT);
    addDetailComponent(header);
    Label spacer = new Label();
    spacer.setWidth(100, UNITS_PERCENTAGE);
    spacer.addStyleName(ExplorerLayout.STYLE_DETAIL_BLOCK);
    addDetailComponent(spacer);
}
Also used : Label(com.vaadin.ui.Label) Embedded(com.vaadin.ui.Embedded) HorizontalLayout(com.vaadin.ui.HorizontalLayout)

Example 62 with HorizontalLayout

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

the class DeleteDeploymentPopupWindow method addDeleteWarning.

protected void addDeleteWarning() {
    List<ProcessDefinition> processDefinitions = repositoryService.createProcessDefinitionQuery().deploymentId(deployment.getId()).list();
    int nrOfProcessInstances = 0;
    for (ProcessDefinition processDefinition : processDefinitions) {
        nrOfProcessInstances += runtimeService.createProcessInstanceQuery().processDefinitionId(processDefinition.getId()).count();
    }
    if (nrOfProcessInstances == 0) {
        Label noInstancesLabel = new Label(i18nManager.getMessage(Messages.DEPLOYMENT_NO_INSTANCES));
        noInstancesLabel.addStyleName(Reindeer.LABEL_SMALL);
        addComponent(noInstancesLabel);
    } else {
        HorizontalLayout warningLayout = new HorizontalLayout();
        warningLayout.setSpacing(true);
        addComponent(warningLayout);
        Embedded warningIcon = new Embedded(null, Images.WARNING);
        warningIcon.setType(Embedded.TYPE_IMAGE);
        warningLayout.addComponent(warningIcon);
        Label warningLabel = new Label(i18nManager.getMessage(Messages.DEPLOYMENT_DELETE_POPUP_WARNING, nrOfProcessInstances), Label.CONTENT_XHTML);
        warningLabel.setSizeUndefined();
        warningLabel.addStyleName(Reindeer.LABEL_SMALL);
        warningLayout.addComponent(warningLabel);
    }
    // Some empty space
    Label emptySpace = new Label("&nbsp;", Label.CONTENT_XHTML);
    addComponent(emptySpace);
}
Also used : Label(com.vaadin.ui.Label) ProcessDefinition(org.activiti.engine.repository.ProcessDefinition) Embedded(com.vaadin.ui.Embedded) HorizontalLayout(com.vaadin.ui.HorizontalLayout)

Example 63 with HorizontalLayout

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

the class AdminRunningInstancesPanel method initDefinitions.

protected void initDefinitions() {
    HorizontalLayout definitionsHeader = new HorizontalLayout();
    definitionsHeader.setSpacing(true);
    definitionsHeader.setWidth(100, UNITS_PERCENTAGE);
    definitionsHeader.addStyleName(ExplorerLayout.STYLE_DETAIL_BLOCK);
    addDetailComponent(definitionsHeader);
    initDefinitionTitle(definitionsHeader);
    definitionsLayout = new HorizontalLayout();
    definitionsLayout.setWidth(100, UNITS_PERCENTAGE);
    addDetailComponent(definitionsLayout);
    initDefinitionsTable();
}
Also used : HorizontalLayout(com.vaadin.ui.HorizontalLayout)

Example 64 with HorizontalLayout

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

the class AdminRunningInstancesPanel method initInstances.

protected void initInstances() {
    HorizontalLayout instancesHeader = new HorizontalLayout();
    instancesHeader.setSpacing(true);
    instancesHeader.setWidth(100, UNITS_PERCENTAGE);
    instancesHeader.addStyleName(ExplorerLayout.STYLE_DETAIL_BLOCK);
    addDetailComponent(instancesHeader);
    initInstancesTitle(instancesHeader);
    instancesLayout = new HorizontalLayout();
    instancesLayout.setWidth(100, UNITS_PERCENTAGE);
    addDetailComponent(instancesLayout);
    initInstancesTable();
}
Also used : HorizontalLayout(com.vaadin.ui.HorizontalLayout)

Example 65 with HorizontalLayout

use of com.vaadin.ui.HorizontalLayout 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)

Aggregations

HorizontalLayout (com.vaadin.ui.HorizontalLayout)85 Label (com.vaadin.ui.Label)45 Button (com.vaadin.ui.Button)26 VerticalLayout (com.vaadin.ui.VerticalLayout)20 Embedded (com.vaadin.ui.Embedded)19 ClickEvent (com.vaadin.ui.Button.ClickEvent)17 ClickListener (com.vaadin.ui.Button.ClickListener)15 ExternalResource (com.vaadin.terminal.ExternalResource)7 GridLayout (com.vaadin.ui.GridLayout)7 TextField (com.vaadin.ui.TextField)6 PrettyTimeLabel (org.activiti.explorer.ui.custom.PrettyTimeLabel)6 StreamResource (com.vaadin.terminal.StreamResource)5 Link (com.vaadin.ui.Link)5 Panel (com.vaadin.ui.Panel)5 InputStream (java.io.InputStream)4 URL (java.net.URL)4 ObjectMapper (com.fasterxml.jackson.databind.ObjectMapper)3 ObjectNode (com.fasterxml.jackson.databind.node.ObjectNode)3 ValueChangeEvent (com.vaadin.data.Property.ValueChangeEvent)3 ExternalResource (com.vaadin.server.ExternalResource)3