List of usage examples for com.vaadin.ui HorizontalLayout addStyleName
@Override public void addStyleName(String style)
From source file:org.activiti.explorer.ui.management.admin.AdminCompletedInstancesPanel.java
License:Apache License
protected void initInstances() { HorizontalLayout instancesHeader = new HorizontalLayout(); instancesHeader.setSpacing(true);/*from ww w .ja v a 2s .c om*/ 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(); }
From source file:org.activiti.explorer.ui.management.admin.AdminDatabaseSettingsPanel.java
License:Apache License
protected void initPageTitle() { HorizontalLayout layout = new HorizontalLayout(); layout.setWidth(100, UNITS_PERCENTAGE); layout.addStyleName(ExplorerLayout.STYLE_TITLE_BLOCK); layout.setSpacing(true);//from ww w .ja v a 2s . com layout.setMargin(false, false, true, false); addDetailComponent(layout); Embedded databaseImage = new Embedded(null, Images.DATABASE_50); layout.addComponent(databaseImage); Label groupName = new Label(i18nManager.getMessage(Messages.DATABASE_TITLE)); groupName.setSizeUndefined(); groupName.addStyleName(Reindeer.LABEL_H2); layout.addComponent(groupName); layout.setComponentAlignment(groupName, Alignment.MIDDLE_LEFT); layout.setExpandRatio(groupName, 1.0f); }
From source file:org.activiti.explorer.ui.management.admin.AdminRunningInstancesPanel.java
License:Apache License
protected void initPageTitle() { HorizontalLayout layout = new HorizontalLayout(); layout.setWidth(100, UNITS_PERCENTAGE); layout.addStyleName(ExplorerLayout.STYLE_TITLE_BLOCK); layout.setSpacing(true);/*from ww w. ja v a 2 s . co m*/ layout.setMargin(false, false, true, false); addDetailComponent(layout); Embedded groupImage = new Embedded(null, Images.PROCESS_50); layout.addComponent(groupImage); Label groupName = new Label(i18nManager.getMessage(Messages.ADMIN_RUNNING_TITLE)); groupName.setSizeUndefined(); groupName.addStyleName(Reindeer.LABEL_H2); layout.addComponent(groupName); layout.setComponentAlignment(groupName, Alignment.MIDDLE_LEFT); layout.setExpandRatio(groupName, 1.0f); }
From source file:org.activiti.explorer.ui.management.crystalball.EventOverviewPanel.java
License:Apache License
protected void initProcessInstances() { HorizontalLayout instancesHeader = new HorizontalLayout(); instancesHeader.setSpacing(false);//from ww w .j a v a2s. c o m instancesHeader.setMargin(false); instancesHeader.setWidth(100, UNITS_PERCENTAGE); instancesHeader.addStyleName(ExplorerLayout.STYLE_DETAIL_BLOCK); addDetailComponent(instancesHeader); initProcessInstanceTitle(instancesHeader); HorizontalLayout selectLayout = new HorizontalLayout(); selectLayout.setSpacing(true); selectLayout.setMargin(true); selectLayout.setWidth(50, UNITS_PERCENTAGE); addDetailComponent(selectLayout); definitionSelect = new NativeSelect(i18nManager.getMessage(Messages.DEPLOYMENT_HEADER_DEFINITIONS)); definitionSelect.setImmediate(true); for (ProcessDefinition definition : definitionList) { definitionSelect.addItem(definition.getId()); definitionSelect.setItemCaption(definition.getId(), definition.getName()); } definitionSelect.addListener(new ValueChangeListener() { private static final long serialVersionUID = 1L; @Override public void valueChange(ValueChangeEvent event) { if (definitionSelect.getValue() != null) { String selectedDefinitionId = (String) definitionSelect.getValue(); ExplorerApp.get().setCrystalBallCurrentDefinitionId(selectedDefinitionId); refreshInstances(selectedDefinitionId); } } }); selectLayout.addComponent(definitionSelect); replayButton = new Button(i18nManager.getMessage(Messages.CRYSTALBALL_BUTTON_REPLAY)); replayButton.setEnabled(false); replayButton.addListener(new ClickListener() { private static final long serialVersionUID = 1L; @Override public void buttonClick(ClickEvent event) { if (instanceTable.getValue() != null) { String processInstanceId = (String) instanceTable.getValue(); ExplorerApp.get().setCrystalBallCurrentInstanceId(processInstanceId); List<EventLogEntry> eventLogEntries = managementService .getEventLogEntriesByProcessInstanceId(processInstanceId); if (eventLogEntries == null || eventLogEntries.isEmpty()) return; EventLogTransformer transformer = new EventLogTransformer(getTransformers()); simulationEvents = transformer.transform(eventLogEntries); ExplorerApp.get().setCrystalBallSimulationEvents(simulationEvents); SimpleEventCalendar eventCalendar = new SimpleEventCalendar( ProcessEngines.getDefaultProcessEngine().getProcessEngineConfiguration().getClock(), new SimulationEventComparator()); eventCalendar.addEvents(simulationEvents); // replay process instance run simulationDebugger = new ReplaySimulationRun(ProcessEngines.getDefaultProcessEngine(), eventCalendar, getReplayHandlers(processInstanceId)); ExplorerApp.get().setCrystalBallSimulationDebugger(simulationDebugger); simulationDebugger.init(new NoExecutionVariableScope()); simulationDebugger.step(); // replay process was started List<HistoricProcessInstance> replayProcessInstanceList = historyService .createHistoricProcessInstanceQuery() .processInstanceBusinessKey(SIMULATION_BUSINESS_KEY).orderByProcessInstanceStartTime() .desc().list(); if (replayProcessInstanceList != null && !replayProcessInstanceList.isEmpty()) { replayHistoricInstance = replayProcessInstanceList.get(0); } refreshEvents(); } } }); selectLayout.addComponent(replayButton); selectLayout.setComponentAlignment(replayButton, Alignment.MIDDLE_LEFT); instanceLayout = new HorizontalLayout(); instanceLayout.setWidth(100, UNITS_PERCENTAGE); addDetailComponent(instanceLayout); initInstancesTable(); }
From source file:org.activiti.explorer.ui.management.crystalball.EventOverviewPanel.java
License:Apache License
protected void initEvents() { HorizontalLayout eventsHeader = new HorizontalLayout(); eventsHeader.setSpacing(true);/* w w w. ja va 2 s .co m*/ 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(); }
From source file:org.activiti.explorer.ui.management.db.DatabaseDetailPanel.java
License:Apache License
protected void addTableName() { HorizontalLayout header = new HorizontalLayout(); header.setWidth(100, UNITS_PERCENTAGE); header.addStyleName(ExplorerLayout.STYLE_TITLE_BLOCK); header.setSpacing(true);// w w w. java 2 s . co m // 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); }
From source file:org.activiti.explorer.ui.management.identity.GroupDetailPanel.java
License:Apache License
protected void initPageTitle() { HorizontalLayout layout = new HorizontalLayout(); layout.setWidth(100, UNITS_PERCENTAGE); layout.addStyleName(ExplorerLayout.STYLE_TITLE_BLOCK); layout.setSpacing(true);//from w w w . j av a 2 s . c om layout.setMargin(false, false, true, false); addDetailComponent(layout); Embedded groupImage = new Embedded(null, Images.GROUP_50); layout.addComponent(groupImage); Label groupName = new Label(getGroupName(group)); groupName.setSizeUndefined(); groupName.addStyleName(Reindeer.LABEL_H2); layout.addComponent(groupName); layout.setComponentAlignment(groupName, Alignment.MIDDLE_LEFT); layout.setExpandRatio(groupName, 1.0f); }
From source file:org.activiti.explorer.ui.management.identity.GroupDetailPanel.java
License:Apache License
protected void initMembers() { HorizontalLayout membersHeader = new HorizontalLayout(); membersHeader.setSpacing(true);/*from w w w .ja v a2 s .c o m*/ membersHeader.setWidth(100, UNITS_PERCENTAGE); membersHeader.addStyleName(ExplorerLayout.STYLE_DETAIL_BLOCK); addDetailComponent(membersHeader); initMembersTitle(membersHeader); initAddMembersButton(membersHeader); membersLayout = new HorizontalLayout(); membersLayout.setWidth(100, UNITS_PERCENTAGE); addDetailComponent(membersLayout); initMembersTable(); }
From source file:org.activiti.explorer.ui.management.identity.UserDetailPanel.java
License:Apache License
protected void initPageTitle() { HorizontalLayout layout = new HorizontalLayout(); layout.setWidth(100, UNITS_PERCENTAGE); layout.setSpacing(true);/*from w ww .j av a2 s. c o m*/ layout.setMargin(false, false, true, false); layout.addStyleName(ExplorerLayout.STYLE_TITLE_BLOCK); addDetailComponent(layout); Embedded userImage = new Embedded(null, Images.USER_50); layout.addComponent(userImage); Label userName = new Label(user.getFirstName() + " " + user.getLastName()); userName.setSizeUndefined(); userName.addStyleName(Reindeer.LABEL_H2); layout.addComponent(userName); layout.setComponentAlignment(userName, Alignment.MIDDLE_LEFT); layout.setExpandRatio(userName, 1.0f); }
From source file:org.activiti.explorer.ui.management.identity.UserDetailPanel.java
License:Apache License
protected void initGroups() { HorizontalLayout groupHeader = new HorizontalLayout(); groupHeader.setWidth(100, UNITS_PERCENTAGE); groupHeader.setSpacing(true);//www .ja v a 2s .c om groupHeader.setMargin(false, false, true, false); groupHeader.addStyleName(ExplorerLayout.STYLE_DETAIL_BLOCK); addDetailComponent(groupHeader); initGroupTitle(groupHeader); initAddGroupsButton(groupHeader); groupLayout = new HorizontalLayout(); // we wrap the table in a simple layout so we can remove the table easy later on groupLayout.setWidth(100, UNITS_PERCENTAGE); addDetailComponent(groupLayout); initGroupsTable(); }