use of com.vaadin.ui.GridLayout in project Activiti by Activiti.
the class HistoricTaskDetailPanel method initPeopleGrid.
protected void initPeopleGrid() {
peopleGrid = new GridLayout();
peopleGrid.setColumns(2);
peopleGrid.setSpacing(true);
peopleGrid.setMargin(true, false, false, false);
peopleGrid.setWidth(100, UNITS_PERCENTAGE);
peopleLayout.addComponent(peopleGrid);
}
use of com.vaadin.ui.GridLayout in project Activiti by Activiti.
the class HistoricTaskDetailPanel method initHeader.
protected void initHeader() {
GridLayout taskDetails = new GridLayout(5, 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.TASK_50);
taskDetails.addComponent(image, 0, 0, 0, 1);
// Add task name
Label nameLabel = new Label(historicTask.getName());
nameLabel.addStyleName(Reindeer.LABEL_H2);
taskDetails.addComponent(nameLabel, 1, 0, 4, 0);
// Add due date
PrettyTimeLabel dueDateLabel = new PrettyTimeLabel(i18nManager.getMessage(Messages.TASK_DUEDATE_SHORT), historicTask.getDueDate(), i18nManager.getMessage(Messages.TASK_DUEDATE_UNKNOWN), false);
dueDateLabel.addStyleName(ExplorerLayout.STYLE_TASK_HEADER_DUEDATE);
taskDetails.addComponent(dueDateLabel, 1, 1);
// Add priority
Integer lowMedHighPriority = convertPriority(historicTask.getPriority());
Label priorityLabel = new Label();
switch(lowMedHighPriority) {
case 1:
priorityLabel.setValue(i18nManager.getMessage(Messages.TASK_PRIORITY_LOW));
priorityLabel.addStyleName(ExplorerLayout.STYLE_TASK_HEADER_PRIORITY_LOW);
break;
case 2:
priorityLabel.setValue(i18nManager.getMessage(Messages.TASK_PRIORITY_MEDIUM));
priorityLabel.addStyleName(ExplorerLayout.STYLE_TASK_HEADER_PRIORITY_MEDIUM);
break;
case 3:
default:
priorityLabel.setValue(i18nManager.getMessage(Messages.TASK_PRIORITY_HIGH));
priorityLabel.addStyleName(ExplorerLayout.STYLE_TASK_HEADER_PRIORITY_HIGH);
}
taskDetails.addComponent(priorityLabel, 2, 1);
// Add create date
PrettyTimeLabel createLabel = new PrettyTimeLabel(i18nManager.getMessage(Messages.TASK_CREATED_SHORT), historicTask.getStartTime(), "", true);
createLabel.addStyleName(ExplorerLayout.STYLE_TASK_HEADER_CREATE_TIME);
taskDetails.addComponent(createLabel, 3, 1);
// Add label to fill excess space
Label spacer = new Label();
spacer.setContentMode(Label.CONTENT_XHTML);
spacer.setValue(" ");
spacer.setSizeUndefined();
taskDetails.addComponent(spacer);
taskDetails.setColumnExpandRatio(1, 1.0f);
taskDetails.setColumnExpandRatio(2, 1.0f);
taskDetails.setColumnExpandRatio(3, 1.0f);
taskDetails.setColumnExpandRatio(4, 1.0f);
centralLayout.addComponent(taskDetails);
}
use of com.vaadin.ui.GridLayout in project Activiti by Activiti.
the class TaskEventsPanel method initEventGrid.
protected void initEventGrid() {
eventGrid = new GridLayout();
eventGrid.setColumns(2);
eventGrid.setSpacing(true);
eventGrid.setMargin(true, false, false, false);
eventGrid.setWidth("100%");
eventGrid.setColumnExpandRatio(1, 1.0f);
eventGrid.addStyleName(ExplorerLayout.STYLE_TASK_EVENT_GRID);
addComponent(eventGrid);
}
use of com.vaadin.ui.GridLayout in project Activiti by Activiti.
the class TaskInvolvedPeopleComponent method initPeopleGrid.
protected void initPeopleGrid() {
peopleGrid = new GridLayout();
peopleGrid.setColumns(2);
peopleGrid.setSpacing(true);
peopleGrid.setMargin(true, false, false, false);
peopleGrid.setWidth(100, UNITS_PERCENTAGE);
layout.addComponent(peopleGrid);
populatePeopleGrid();
}
use of com.vaadin.ui.GridLayout in project Activiti by Activiti.
the class JobDetailPanel method addHeader.
protected void addHeader() {
GridLayout jobDetails = new GridLayout(3, 2);
jobDetails.setWidth(100, UNITS_PERCENTAGE);
jobDetails.addStyleName(ExplorerLayout.STYLE_TITLE_BLOCK);
jobDetails.setSpacing(true);
jobDetails.setMargin(false, false, true, false);
// Add image
Embedded image = new Embedded(null, Images.JOB_50);
jobDetails.addComponent(image, 0, 0, 0, 1);
// Add job name
Label nameLabel = new Label(getJobLabel(job));
nameLabel.addStyleName(Reindeer.LABEL_H2);
jobDetails.addComponent(nameLabel, 1, 0, 2, 0);
// Add due date
PrettyTimeLabel dueDateLabel = new PrettyTimeLabel(i18nManager.getMessage(Messages.JOB_DUEDATE), job.getDuedate(), i18nManager.getMessage(Messages.JOB_NO_DUEDATE), false);
dueDateLabel.addStyleName(ExplorerLayout.STYLE_JOB_HEADER_DUE_DATE);
jobDetails.addComponent(dueDateLabel, 1, 1);
jobDetails.setColumnExpandRatio(1, 1.0f);
jobDetails.setColumnExpandRatio(2, 1.0f);
addDetailComponent(jobDetails);
}
Aggregations