Search in sources :

Example 21 with GridLayout

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);
}
Also used : GridLayout(com.vaadin.ui.GridLayout)

Example 22 with GridLayout

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);
}
Also used : GridLayout(com.vaadin.ui.GridLayout) Label(com.vaadin.ui.Label) PrettyTimeLabel(org.activiti.explorer.ui.custom.PrettyTimeLabel) Embedded(com.vaadin.ui.Embedded) PrettyTimeLabel(org.activiti.explorer.ui.custom.PrettyTimeLabel)

Example 23 with GridLayout

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);
}
Also used : GridLayout(com.vaadin.ui.GridLayout)

Example 24 with GridLayout

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();
}
Also used : GridLayout(com.vaadin.ui.GridLayout)

Example 25 with GridLayout

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);
}
Also used : GridLayout(com.vaadin.ui.GridLayout) Label(com.vaadin.ui.Label) PrettyTimeLabel(org.activiti.explorer.ui.custom.PrettyTimeLabel) Embedded(com.vaadin.ui.Embedded) PrettyTimeLabel(org.activiti.explorer.ui.custom.PrettyTimeLabel)

Aggregations

GridLayout (com.vaadin.ui.GridLayout)36 Label (com.vaadin.ui.Label)21 Embedded (com.vaadin.ui.Embedded)9 HorizontalLayout (com.vaadin.ui.HorizontalLayout)9 TextField (com.vaadin.ui.TextField)7 PrettyTimeLabel (org.activiti.explorer.ui.custom.PrettyTimeLabel)6 Panel (com.vaadin.ui.Panel)4 Button (com.vaadin.ui.Button)3 PasswordField (com.vaadin.ui.PasswordField)3 VerticalLayout (com.vaadin.ui.VerticalLayout)3 ComboBox (com.vaadin.ui.ComboBox)2 Component (com.vaadin.ui.Component)2 DateField (com.vaadin.ui.DateField)2 Link (com.vaadin.ui.Link)2 TextArea (com.vaadin.ui.TextArea)2 Window (com.vaadin.ui.Window)2 Test (org.junit.Test)2 DefaultPmoBasedSectionFactory (org.linkki.core.ui.section.DefaultPmoBasedSectionFactory)2 CorpusBrowserPanel (annis.gui.CorpusBrowserPanel)1 MetaDataPanel (annis.gui.MetaDataPanel)1