protected void addHeader() { GridLayout header = new GridLayout(3, 2); header.setWidth(100, UNITS_PERCENTAGE); header.addStyleName(ExplorerLayout.STYLE_TITLE_BLOCK); header.setSpacing(true); header.setMargin(false, false, true, false); // Add image Embedded image = new Embedded(null, Images.PROCESS_50); header.addComponent(image, 0, 0, 0, 1); // Add task name Label nameLabel = new Label(getProcessDisplayName(processDefinition, processInstance)); nameLabel.addStyleName(Reindeer.LABEL_H2); header.addComponent(nameLabel, 1, 0, 2, 0); // Add start time PrettyTimeLabel startTimeLabel = new PrettyTimeLabel( i18nManager.getMessage(Messages.PROCESS_START_TIME), historicProcessInstance.getStartTime(), null, true); startTimeLabel.addStyleName(ExplorerLayout.STYLE_PROCESS_HEADER_START_TIME); header.addComponent(startTimeLabel, 1, 1); header.setColumnExpandRatio(1, 1.0f); header.setColumnExpandRatio(2, 1.0f); panelLayout.addComponent(header); }
protected void addDeploymentName() { GridLayout taskDetails = new GridLayout(3, 2); taskDetails.setWidth(100, UNITS_PERCENTAGE); taskDetails.addStyleName(ExplorerLayout.STYLE_TITLE_BLOCK); taskDetails.setSpacing(true); taskDetails.setMargin(false, false, true, false); // Add image Embedded image = new Embedded(null, Images.DEPLOYMENT_50); taskDetails.addComponent(image, 0, 0, 0, 1); // Add deployment name Label nameLabel = new Label(); if (deployment.getName() != null) { nameLabel.setValue(deployment.getName()); } else { nameLabel.setValue(i18nManager.getMessage(Messages.DEPLOYMENT_NO_NAME)); } nameLabel.addStyleName(Reindeer.LABEL_H2); taskDetails.addComponent(nameLabel, 1, 0, 2, 0); // Add deploy time PrettyTimeLabel deployTimeLabel = new PrettyTimeLabel( i18nManager.getMessage(Messages.DEPLOYMENT_DEPLOY_TIME), deployment.getDeploymentTime(), null, true); deployTimeLabel.addStyleName(ExplorerLayout.STYLE_DEPLOYMENT_HEADER_DEPLOY_TIME); taskDetails.addComponent(deployTimeLabel, 1, 1); taskDetails.setColumnExpandRatio(1, 1.0f); taskDetails.setColumnExpandRatio(2, 1.0f); addDetailComponent(taskDetails); }