use of com.vaadin.ui.VerticalLayout in project opennms by OpenNMS.
the class DialogWindow method createContent.
private Layout createContent(final String description) {
VerticalLayout content = new VerticalLayout();
content.setWidth(100, Unit.PERCENTAGE);
Layout footer = createFooter();
Layout mainArea = createMainArea(description);
content.addComponent(mainArea);
content.addComponent(footer);
content.setExpandRatio(mainArea, 1);
return content;
}
use of com.vaadin.ui.VerticalLayout in project Activiti by Activiti.
the class TaskDetailPanel method initDescription.
protected void initDescription(HorizontalLayout layout) {
final CssLayout descriptionLayout = new CssLayout();
descriptionLayout.setWidth(100, UNITS_PERCENTAGE);
layout.addComponent(descriptionLayout);
layout.setExpandRatio(descriptionLayout, 1.0f);
layout.setComponentAlignment(descriptionLayout, Alignment.MIDDLE_LEFT);
String descriptionText = null;
if (task.getDescription() != null && !"".equals(task.getDescription())) {
descriptionText = task.getDescription();
} else {
descriptionText = i18nManager.getMessage(Messages.TASK_NO_DESCRIPTION);
}
final Label descriptionLabel = new Label(descriptionText);
descriptionLabel.addStyleName(ExplorerLayout.STYLE_CLICKABLE);
descriptionLayout.addComponent(descriptionLabel);
descriptionLayout.addListener(new LayoutClickListener() {
public void layoutClick(LayoutClickEvent event) {
if (event.getClickedComponent() != null && event.getClickedComponent().equals(descriptionLabel)) {
// layout for textarea + ok button
final VerticalLayout editLayout = new VerticalLayout();
editLayout.setSpacing(true);
// textarea
final TextArea descriptionTextArea = new TextArea();
descriptionTextArea.setNullRepresentation("");
descriptionTextArea.setWidth(100, UNITS_PERCENTAGE);
descriptionTextArea.setValue(task.getDescription());
editLayout.addComponent(descriptionTextArea);
// ok button
Button okButton = new Button(i18nManager.getMessage(Messages.BUTTON_OK));
editLayout.addComponent(okButton);
editLayout.setComponentAlignment(okButton, Alignment.BOTTOM_RIGHT);
// replace
descriptionLayout.replaceComponent(descriptionLabel, editLayout);
// When OK is clicked -> update task data + ui
okButton.addListener(new ClickListener() {
public void buttonClick(ClickEvent event) {
// Update data
task.setDescription(descriptionTextArea.getValue().toString());
taskService.saveTask(task);
// Update UI
descriptionLabel.setValue(task.getDescription());
descriptionLayout.replaceComponent(editLayout, descriptionLabel);
}
});
}
}
});
}
use of com.vaadin.ui.VerticalLayout in project Activiti by Activiti.
the class TaskDetailPanel method init.
protected void init() {
setSizeFull();
addStyleName(Reindeer.LAYOUT_WHITE);
// Central panel: all task data
this.centralLayout = new VerticalLayout();
centralLayout.setMargin(true);
setDetailContainer(centralLayout);
initHeader();
initDescriptionAndClaimButton();
initProcessLink();
initParentTaskLink();
initPeopleDetails();
initSubTasks();
initRelatedContent();
initTaskForm();
}
use of com.vaadin.ui.VerticalLayout in project Activiti by Activiti.
the class TaskEventsPanel method addTaskEventText.
protected void addTaskEventText(final org.activiti.engine.task.Event taskEvent, final GridLayout eventGrid) {
VerticalLayout layout = new VerticalLayout();
layout.addStyleName(ExplorerLayout.STYLE_TASK_EVENT);
layout.setWidth("100%");
eventGrid.addComponent(layout);
// Actual text
Label text = taskEventTextResolver.resolveText(taskEvent);
text.setWidth("100%");
layout.addComponent(text);
// Time
Label time = new Label(new HumanTime(i18nManager).format(taskEvent.getTime()));
time.setSizeUndefined();
time.addStyleName(ExplorerLayout.STYLE_TASK_EVENT_TIME);
layout.addComponent(time);
}
use of com.vaadin.ui.VerticalLayout in project Activiti by Activiti.
the class ProcessInstanceDetailPanel method init.
protected void init() {
addStyleName(Reindeer.LAYOUT_WHITE);
setSizeFull();
panelLayout = new VerticalLayout();
panelLayout.setWidth(100, UNITS_PERCENTAGE);
panelLayout.setMargin(true);
setDetailContainer(panelLayout);
addHeader();
addProcessImage();
addTasks();
addVariables();
addDeleteButton();
}
Aggregations