List of usage examples for com.vaadin.ui Label addStyleName
@Override public void addStyleName(String style)
From source file:com.klwork.explorer.ui.task.HistoricTaskDetailPanel.java
License:Apache License
protected void initPeopleTitle() { Label title = new Label(i18nManager.getMessage(Messages.TASK_PEOPLE)); title.addStyleName(ExplorerLayout.STYLE_H3); title.setWidth(100, UNITS_PERCENTAGE); peopleLayout.addComponent(title);/* w w w. java 2 s .co m*/ }
From source file:com.klwork.explorer.ui.task.HistoricTaskDetailPanel.java
License:Apache License
protected void initSubTaskTitle() { Label title = new Label(i18nManager.getMessage(Messages.TASK_SUBTASKS)); title.addStyleName(ExplorerLayout.STYLE_H3); title.setWidth(100, UNITS_PERCENTAGE); subTasksLayout.addComponent(title);//from w ww .ja v a 2 s.c om }
From source file:com.klwork.explorer.ui.task.HistoricTaskDetailPanel.java
License:Apache License
protected void initNoSubTasksLabel() { Label noSubTasksLabel = new Label(i18nManager.getMessage(Messages.TASK_NO_SUBTASKS)); noSubTasksLabel.addStyleName(Reindeer.LABEL_SMALL); subTasksLayout.addComponent(noSubTasksLabel); }
From source file:com.klwork.explorer.ui.task.HistoricTaskDetailPanel.java
License:Apache License
protected void initRelatedContentTitle() { Label title = new Label(ViewToolManager.getI18nManager().getMessage(Messages.TASK_RELATED_CONTENT)); title.addStyleName(ExplorerLayout.STYLE_H3); title.setSizeFull();//from w w w .j a v a2 s .c om relatedContentLayout.addComponent(title); }
From source file:com.klwork.explorer.ui.task.HistoricTaskDetailPanel.java
License:Apache License
protected void initNoRelatedContentLabel() { Label noContentLabel = new Label(i18nManager.getMessage(Messages.TASK_NO_RELATED_CONTENT)); noContentLabel.addStyleName(Reindeer.LABEL_SMALL); relatedContentLayout.addComponent(noContentLabel); }
From source file:com.klwork.explorer.ui.task.ProcessInstanceEventsPanel.java
License:Apache License
protected void addTitle() { Label eventTitle = new Label(i18nManager.getMessage(Messages.EVENT_TITLE)); eventTitle.addStyleName(Reindeer.LABEL_H2); pMainContent.addComponent(eventTitle); }
From source file:com.klwork.explorer.ui.task.ProcessInstanceEventsPanel.java
License:Apache License
protected void addTaskEventText(final Comment taskEvent, final GridLayout eventGrid) { VerticalLayout layout = new VerticalLayout(); layout.addStyleName(ExplorerLayout.STYLE_TASK_EVENT); layout.setWidth("100%"); eventGrid.addComponent(layout);//from w w w . ja v a 2 s. c om // Actual text Label text = taskEventTextResolver.resolveText(taskEvent); text.setWidth("100%"); layout.addComponent(text); // Time String human = new HumanTime(i18nManager).format(taskEvent.getTime()); Label time = new Label(human + "(" + ")"); time.setSizeUndefined(); time.addStyleName(ExplorerLayout.STYLE_TASK_EVENT_TIME); layout.addComponent(time); }
From source file:com.klwork.explorer.ui.task.SubTaskComponent.java
License:Apache License
protected void initAddButton() { addSubTaskButton = new Button(); addSubTaskButton.addStyleName(ExplorerLayout.STYLE_ADD); addToSubTaskPanel(addSubTaskButton); addSubTaskButton.addListener(new ClickListener() { public void buttonClick(ClickEvent event) { // Remove button //addSubTaskPanel.removeAllComponents(); clearPanelAllComponents();/*from w ww. j a v a 2 s . c o m*/ // And add textfield Label createSubTaskLabel = new Label("Create new subtask:"); createSubTaskLabel.addStyleName(Reindeer.LABEL_SMALL); addToSubTaskPanel(createSubTaskLabel); newTaskTextField = new TextField(); newTaskTextField.focus(); //addSubTaskPanel.addComponent(newTaskTextField); addToSubTaskPanel(newTaskTextField); } }); }
From source file:com.klwork.explorer.ui.task.SubTaskComponent.java
License:Apache License
protected void populateSubTasks(List<HistoricTaskInstance> subTasks) { if (subTasks.size() > 0) { for (final HistoricTaskInstance subTask : subTasks) { // icon Embedded icon = null;/* w ww. j a va 2 s . c om*/ if (subTask.getEndTime() != null) {//? icon = new Embedded(null, Images.TASK_FINISHED_22); } else { icon = new Embedded(null, Images.TASK_22); } icon.setWidth(22, UNITS_PIXELS); icon.setWidth(22, UNITS_PIXELS); subTaskLayout.addComponent(icon); // Link to subtask Button subTaskLink = new Button(subTask.getName()); subTaskLink.addStyleName(Reindeer.BUTTON_LINK); subTaskLink.addListener(new ClickListener() { public void buttonClick(ClickEvent event) { //ExplorerApp.get().getViewManager().showTaskPage(subTask.getId()); } }); subTaskLayout.addComponent(subTaskLink); subTaskLayout.setComponentAlignment(subTaskLink, Alignment.MIDDLE_LEFT); if (subTask.getEndTime() == null) { // Delete icon only appears when task is not finished yet Embedded deleteIcon = new Embedded(null, Images.DELETE); deleteIcon.addStyleName(ExplorerLayout.STYLE_CLICKABLE); deleteIcon.addListener(new DeleteSubTaskClickListener(subTask, this)); subTaskLayout.addComponent(deleteIcon); subTaskLayout.setComponentAlignment(deleteIcon, Alignment.MIDDLE_RIGHT); } else { // Next line of grid subTaskLayout.newLine(); } } } else { Label noSubTasksLabel = new Label(i18nManager.getMessage(Messages.TASK_NO_SUBTASKS)); noSubTasksLabel.setSizeUndefined(); noSubTasksLabel.addStyleName(Reindeer.LABEL_SMALL); subTaskLayout.addComponent(noSubTasksLabel); } }
From source file:com.klwork.explorer.ui.task.TaskDetailPanel.java
License:Apache License
protected void initHeader() { GridLayout taskDetails = new GridLayout(2, 2); taskDetails.setWidth(100, Unit.PERCENTAGE); taskDetails.addStyleName(ExplorerLayout.STYLE_TITLE_BLOCK); taskDetails.setSpacing(true);/* w w w. ja v a2 s. c om*/ taskDetails.setMargin(new MarginInfo(false, false, true, false)); taskDetails.setColumnExpandRatio(1, 1.0f); centralLayout.addComponent(taskDetails); // Add image Embedded image = new Embedded(null, Images.TASK_50); //?? taskDetails.addComponent(image, 0, 0, 0, 1); // Add task name Label nameLabel = new Label(task.getName()); nameLabel.addStyleName(Reindeer.LABEL_H2); taskDetails.addComponent(nameLabel, 1, 0); taskDetails.setComponentAlignment(nameLabel, Alignment.MIDDLE_LEFT); // Properties HorizontalLayout propertiesLayout = new HorizontalLayout();// propertiesLayout.setSpacing(true); taskDetails.addComponent(propertiesLayout); propertiesLayout.addComponent(new DueDateComponent(task, i18nManager, taskService)); propertiesLayout.addComponent(new PriorityComponent(task, i18nManager, taskService)); //? initCreateTime(propertiesLayout); }