use of com.vaadin.ui.VerticalLayout in project Activiti by Activiti.
the class SubTaskComponent method initAddSubTaskPanel.
protected void initAddSubTaskPanel(HorizontalLayout headerLayout) {
// The add button is placed in a panel, so we can catch 'enter' and 'escape' events
addSubTaskPanel = new Panel();
addSubTaskPanel.setContent(new VerticalLayout());
addSubTaskPanel.setSizeUndefined();
addSubTaskPanel.addStyleName(Reindeer.PANEL_LIGHT);
addSubTaskPanel.addStyleName("no-border");
headerLayout.addComponent(addSubTaskPanel);
initAddSubTaskPanelKeyboardActions();
initAddButton();
}
use of com.vaadin.ui.VerticalLayout in project Activiti by Activiti.
the class HistoricTaskDetailPanel method init.
protected void init() {
setSizeFull();
addStyleName(Reindeer.LAYOUT_WHITE);
this.centralLayout = new VerticalLayout();
centralLayout.setMargin(true);
setDetailContainer(centralLayout);
initHeader();
initDescription();
initParentTaskLink();
initPeopleDetails();
initSubTasks();
initRelatedContent();
}
use of com.vaadin.ui.VerticalLayout in project Activiti by Activiti.
the class HistoricTaskDetailPanel method initSubTasks.
protected void initSubTasks() {
subTasksLayout = new VerticalLayout();
subTasksLayout.addStyleName(ExplorerLayout.STYLE_DETAIL_BLOCK);
addComponent(subTasksLayout);
initSubTaskTitle();
List<HistoricTaskInstance> subTasks = historyService.createHistoricTaskInstanceQuery().taskParentTaskId(historicTask.getId()).list();
if (!subTasks.isEmpty()) {
initSubTaskGrid();
populateSubTasks(subTasks);
} else {
initNoSubTasksLabel();
}
}
use of com.vaadin.ui.VerticalLayout in project Activiti by Activiti.
the class TaskEventsPanel method addInputField.
protected void addInputField() {
HorizontalLayout layout = new HorizontalLayout();
layout.setSpacing(true);
layout.setWidth(100, UNITS_PERCENTAGE);
addComponent(layout);
// Hack: actionHandlers can only be attached to panels or windows
Panel textFieldPanel = new Panel();
textFieldPanel.addStyleName(Reindeer.PANEL_LIGHT);
textFieldPanel.setContent(new VerticalLayout());
textFieldPanel.setWidth(100, UNITS_PERCENTAGE);
layout.addComponent(textFieldPanel);
layout.setExpandRatio(textFieldPanel, 1.0f);
commentInputField = new TextField();
commentInputField.setWidth(100, UNITS_PERCENTAGE);
textFieldPanel.addComponent(commentInputField);
// Hack to catch keyboard 'enter'
textFieldPanel.addActionHandler(new Handler() {
public void handleAction(Action action, Object sender, Object target) {
addNewComment(commentInputField.getValue().toString());
}
public Action[] getActions(Object target, Object sender) {
return new Action[] { new ShortcutAction("enter", ShortcutAction.KeyCode.ENTER, null) };
}
});
addCommentButton = new Button(i18nManager.getMessage(Messages.TASK_ADD_COMMENT));
layout.addComponent(addCommentButton);
layout.setComponentAlignment(addCommentButton, Alignment.MIDDLE_LEFT);
addCommentButton.addListener(new ClickListener() {
public void buttonClick(ClickEvent event) {
addNewComment(commentInputField.getValue().toString());
}
});
}
use of com.vaadin.ui.VerticalLayout in project Activiti by Activiti.
the class JobDetailPanel method addJobState.
protected void addJobState() {
Label processDefinitionHeader = new Label(i18nManager.getMessage(Messages.JOB_HEADER_EXECUTION));
processDefinitionHeader.addStyleName(ExplorerLayout.STYLE_H3);
processDefinitionHeader.addStyleName(ExplorerLayout.STYLE_DETAIL_BLOCK);
processDefinitionHeader.setWidth(100, UNITS_PERCENTAGE);
addComponent(processDefinitionHeader);
VerticalLayout layout = new VerticalLayout();
layout.setSpacing(true);
layout.setSizeFull();
layout.setMargin(true, false, true, false);
addDetailComponent(layout);
setDetailExpandRatio(layout, 1.0f);
// Exceptions
if (job.getExceptionMessage() != null) {
// Number of retries
Label retrieslabel = new Label(getRetriesLabel(job));
layout.addComponent(retrieslabel);
// Exception
Label exceptionMessageLabel = new Label(i18nManager.getMessage(Messages.JOB_ERROR) + ": " + job.getExceptionMessage());
exceptionMessageLabel.addStyleName(ExplorerLayout.STYLE_JOB_EXCEPTION_MESSAGE);
layout.addComponent(exceptionMessageLabel);
// Add Exception stacktrace
String stack = managementService.getJobExceptionStacktrace(job.getId());
Label stackTraceLabel = new Label(stack);
stackTraceLabel.setContentMode(Label.CONTENT_PREFORMATTED);
stackTraceLabel.addStyleName(ExplorerLayout.STYLE_JOB_EXCEPTION_TRACE);
stackTraceLabel.setSizeFull();
Panel stackPanel = new Panel();
stackPanel.setWidth(100, UNITS_PERCENTAGE);
stackPanel.setSizeFull();
stackPanel.setScrollable(true);
stackPanel.addComponent(stackTraceLabel);
layout.addComponent(stackPanel);
layout.setExpandRatio(stackPanel, 1.0f);
} else {
if (job.getProcessDefinitionId() != null) {
// This is a hack .. need to cleanify this in the engine
JobEntity jobEntity = (JobEntity) job;
if (jobEntity.getJobHandlerType().equals(TimerSuspendProcessDefinitionHandler.TYPE)) {
addLinkToProcessDefinition(layout, i18nManager.getMessage(Messages.JOB_SUSPEND_PROCESSDEFINITION), false);
} else if (jobEntity.getJobHandlerType().equals(TimerActivateProcessDefinitionHandler.TYPE)) {
addLinkToProcessDefinition(layout, i18nManager.getMessage(Messages.JOB_ACTIVATE_PROCESSDEFINITION), true);
} else {
addNotYetExecutedLabel(layout);
}
} else {
addNotYetExecutedLabel(layout);
}
}
}
Aggregations