use of com.vaadin.ui.GridLayout in project Activiti by Activiti.
the class TaskDetailPanel method initHeader.
protected void initHeader() {
GridLayout taskDetails = new GridLayout(2, 2);
taskDetails.setWidth(100, UNITS_PERCENTAGE);
taskDetails.addStyleName(ExplorerLayout.STYLE_TITLE_BLOCK);
taskDetails.setSpacing(true);
taskDetails.setMargin(false, false, true, false);
taskDetails.setColumnExpandRatio(1, 1.0f);
centralLayout.addComponent(taskDetails);
// Add image
Embedded image = new Embedded(null, Images.TASK_50);
taskDetails.addComponent(image, 0, 0, 0, 1);
// Add task name
Label nameLabel = new Label(task.getName());
nameLabel.addStyleName(Reindeer.LABEL_H2);
taskDetails.addComponent(nameLabel, 1, 0);
taskDetails.setComponentAlignment(nameLabel, Alignment.MIDDLE_LEFT);
// Properties
HorizontalLayout propertiesLayout = new HorizontalLayout();
propertiesLayout.setSpacing(true);
taskDetails.addComponent(propertiesLayout);
propertiesLayout.addComponent(new DueDateComponent(task, i18nManager, taskService));
propertiesLayout.addComponent(new PriorityComponent(task, i18nManager, taskService));
initCreateTime(propertiesLayout);
}
use of com.vaadin.ui.GridLayout in project Activiti by Activiti.
the class ProcessInstanceDetailPanel method addHeader.
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);
}
use of com.vaadin.ui.GridLayout in project Activiti by Activiti.
the class AbstractProcessDefinitionDetailPanel method initHeader.
protected void initHeader() {
GridLayout details = new GridLayout(2, 2);
details.setWidth(100, UNITS_PERCENTAGE);
details.addStyleName(ExplorerLayout.STYLE_TITLE_BLOCK);
details.setSpacing(true);
details.setMargin(false, false, true, false);
details.setColumnExpandRatio(1, 1.0f);
detailPanelLayout.addComponent(details);
// Image
Embedded image = new Embedded(null, Images.PROCESS_50);
details.addComponent(image, 0, 0, 0, 1);
// Name
Label nameLabel = new Label(getProcessDisplayName(processDefinition));
nameLabel.addStyleName(Reindeer.LABEL_H2);
details.addComponent(nameLabel, 1, 0);
// Properties
HorizontalLayout propertiesLayout = new HorizontalLayout();
propertiesLayout.setSpacing(true);
details.addComponent(propertiesLayout);
// Version
String versionString = i18nManager.getMessage(Messages.PROCESS_VERSION, processDefinition.getVersion());
Label versionLabel = new Label(versionString);
versionLabel.addStyleName(ExplorerLayout.STYLE_PROCESS_HEADER_VERSION);
propertiesLayout.addComponent(versionLabel);
// Add deploy time
PrettyTimeLabel deployTimeLabel = new PrettyTimeLabel(i18nManager.getMessage(Messages.PROCESS_DEPLOY_TIME), deployment.getDeploymentTime(), null, true);
deployTimeLabel.addStyleName(ExplorerLayout.STYLE_PROCESS_HEADER_DEPLOY_TIME);
propertiesLayout.addComponent(deployTimeLabel);
}
use of com.vaadin.ui.GridLayout in project Activiti by Activiti.
the class ProfilePanel method createInfoSectionLayout.
protected GridLayout createInfoSectionLayout(int columns, int rows) {
GridLayout layout = new GridLayout(columns, rows);
layout.setSpacing(true);
layout.setWidth(100, UNITS_PERCENTAGE);
layout.setMargin(true, false, true, false);
infoPanelLayout.addComponent(layout);
return layout;
}
use of com.vaadin.ui.GridLayout in project Activiti by Activiti.
the class ReportDetailPanel method initHeader.
protected void initHeader() {
GridLayout details = new GridLayout(2, 2);
details.setWidth(100, UNITS_PERCENTAGE);
details.addStyleName(ExplorerLayout.STYLE_TITLE_BLOCK);
details.setSpacing(true);
details.setMargin(false, false, true, false);
details.setColumnExpandRatio(1, 1.0f);
detailPanelLayout.addComponent(details);
// Image
Embedded image = new Embedded(null, Images.REPORT_50);
details.addComponent(image, 0, 0, 0, 1);
// Name
Label nameLabel = new Label(getReportDisplayName());
nameLabel.addStyleName(Reindeer.LABEL_H2);
details.addComponent(nameLabel, 1, 0);
// Properties
HorizontalLayout propertiesLayout = new HorizontalLayout();
propertiesLayout.setSpacing(true);
details.addComponent(propertiesLayout);
// Version
String versionString = i18nManager.getMessage(Messages.PROCESS_VERSION, processDefinition.getVersion());
Label versionLabel = new Label(versionString);
versionLabel.addStyleName(ExplorerLayout.STYLE_PROCESS_HEADER_VERSION);
propertiesLayout.addComponent(versionLabel);
}
Aggregations