use of com.vaadin.ui.Embedded in project Activiti by Activiti.
the class DeploymentDetailPanel method addDeploymentName.
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);
}
use of com.vaadin.ui.Embedded in project Activiti by Activiti.
the class AdminRunningInstancesPanel method addTaskItem.
protected void addTaskItem(HistoricTaskInstance task, Table taskTable) {
Item item = taskTable.addItem(task.getId());
if (task.getEndTime() != null) {
item.getItemProperty("finished").setValue(new Embedded(null, Images.TASK_FINISHED_22));
} else {
item.getItemProperty("finished").setValue(new Embedded(null, Images.TASK_22));
}
item.getItemProperty("name").setValue(task.getName());
item.getItemProperty("priority").setValue(task.getPriority());
item.getItemProperty("startDate").setValue(new PrettyTimeLabel(task.getStartTime(), true));
item.getItemProperty("endDate").setValue(new PrettyTimeLabel(task.getEndTime(), true));
if (task.getDueDate() != null) {
Label dueDateLabel = new PrettyTimeLabel(task.getEndTime(), i18nManager.getMessage(Messages.TASK_NOT_FINISHED_YET), true);
item.getItemProperty("dueDate").setValue(dueDateLabel);
}
if (task.getAssignee() != null) {
Component taskAssigneeComponent = getTaskAssigneeComponent(task.getAssignee());
if (taskAssigneeComponent != null) {
item.getItemProperty("assignee").setValue(taskAssigneeComponent);
}
}
}
use of com.vaadin.ui.Embedded in project Activiti by Activiti.
the class UserDetailPanel method initPageTitle.
protected void initPageTitle() {
HorizontalLayout layout = new HorizontalLayout();
layout.setWidth(100, UNITS_PERCENTAGE);
layout.setSpacing(true);
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);
}
use of com.vaadin.ui.Embedded in project Activiti by Activiti.
the class AdminCompletedInstancesPanel method initPageTitle.
protected void initPageTitle() {
HorizontalLayout layout = new HorizontalLayout();
layout.setWidth(100, UNITS_PERCENTAGE);
layout.addStyleName(ExplorerLayout.STYLE_TITLE_BLOCK);
layout.setSpacing(true);
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_COMPLETED_TITLE));
groupName.setSizeUndefined();
groupName.addStyleName(Reindeer.LABEL_H2);
layout.addComponent(groupName);
layout.setComponentAlignment(groupName, Alignment.MIDDLE_LEFT);
layout.setExpandRatio(groupName, 1.0f);
}
use of com.vaadin.ui.Embedded in project Activiti by Activiti.
the class AdminRunningInstancesPanel method initPageTitle.
protected void initPageTitle() {
HorizontalLayout layout = new HorizontalLayout();
layout.setWidth(100, UNITS_PERCENTAGE);
layout.addStyleName(ExplorerLayout.STYLE_TITLE_BLOCK);
layout.setSpacing(true);
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);
}
Aggregations