List of usage examples for com.vaadin.server Responsive makeResponsive
public static void makeResponsive(Component... components)
From source file:com.hybridbpm.ui.component.bpm.TaskLayout.java
License:Apache License
public TaskLayout(String taskId, String processName, String taskName, boolean showHeader) { this.taskId = taskId; this.processName = processName; this.taskName = taskName; this.showHeader = showHeader; Responsive.makeResponsive(this); btnAccept.setIcon(FontAwesome.CHECK); btnEscalate.setIcon(FontAwesome.ARROW_UP); btnDelegate.setIcon(FontAwesome.ARROW_DOWN); btnSchedule.setIcon(FontAwesome.CALENDAR); btnSave.setIcon(FontAwesome.SAVE);//w w w. j a va2 s . co m btnSend.setIcon(FontAwesome.SEND); // btnClose.setIcon(FontAwesome.TIMES); btnSend.setStyleName(ValoTheme.BUTTON_PRIMARY); btnAccept.addStyleName(ValoTheme.BUTTON_SMALL); btnEscalate.addStyleName(ValoTheme.BUTTON_SMALL); btnDelegate.addStyleName(ValoTheme.BUTTON_SMALL); btnSchedule.addStyleName(ValoTheme.BUTTON_SMALL); btnSave.addStyleName(ValoTheme.BUTTON_SMALL); btnSend.addStyleName(ValoTheme.BUTTON_SMALL); btnClose.addStyleName(ValoTheme.BUTTON_SMALL); priorityMenubar.setStyleName(ValoTheme.MENUBAR_SMALL); // buttonBar.setWidth(100, Unit.PERCENTAGE); buttonBar.setSpacing(true); buttonBar.addStyleName("toolbar"); // buttonBar.setExpandRatio(btnAccept, 1f); // buttonBar.setComponentAlignment(priorityMenubar, Alignment.MIDDLE_LEFT); buttonBar.setComponentAlignment(btnAccept, Alignment.MIDDLE_RIGHT); // buttonBar.setComponentAlignment(btnEscalate, Alignment.MIDDLE_RIGHT); // buttonBar.setComponentAlignment(btnDelegate, Alignment.MIDDLE_RIGHT); buttonBar.setComponentAlignment(btnSchedule, Alignment.MIDDLE_RIGHT); buttonBar.setComponentAlignment(btnSave, Alignment.MIDDLE_RIGHT); buttonBar.setComponentAlignment(btnSend, Alignment.MIDDLE_RIGHT); buttonBar.setComponentAlignment(btnClose, Alignment.MIDDLE_RIGHT); tabSheet.setStyleName(ValoTheme.TABSHEET_COMPACT_TABBAR); tabSheet.setStyleName(ValoTheme.TABSHEET_FRAMED); tabSheet.setSizeFull(); setSizeFull(); setSpacing(true); if (showHeader) { addComponent(taskFormHeader); } addComponent(buttonBar); setComponentAlignment(buttonBar, Alignment.MIDDLE_RIGHT); addComponent(tabSheet); setExpandRatio(tabSheet, 1f); loadForm(); }
From source file:com.hybridbpm.ui.component.bpm.TaskOptionLayout.java
License:Apache License
public TaskOptionLayout(Task task) { Design.read(this); Responsive.makeResponsive(this); scheduleStartDate.setResolution(Resolution.MINUTE); scheduleEndDate.setResolution(Resolution.MINUTE); setDefaultScheduler(task);/*from ww w . ja va2 s . c o m*/ binder.setItemDataSource(task); binder.bind(scheduleStartDate, "scheduleStartDate"); binder.bind(scheduleEndDate, "scheduleEndDate"); binder.setBuffered(true); }
From source file:com.hybridbpm.ui.component.comment.CommentLayout.java
License:Apache License
public CommentLayout(Comment comment) { Design.read(this); Responsive.makeResponsive(this); setMargin(false);// w w w .ja v a 2 s . c o m CommentViewLayout commentViewLayout = new CommentViewLayout(comment); mainPanel.addComponent(commentViewLayout); }
From source file:com.hybridbpm.ui.component.dashboard.tab.DashboardTab.java
License:Apache License
public DashboardTab(TabDefinition tab, ViewDefinition viewDefinition) { this.tabDefinition = tab; this.viewDefinition = viewDefinition; Design.read(this); Responsive.makeResponsive(this); btnEdit.setIcon(FontAwesome.EDIT);//from www. j a va 2s. c o m btnEdit.setDescription("Edit view"); btnEdit.addClickListener(this); refresh(); checkDeveloperMode(); }
From source file:com.hybridbpm.ui.component.document.DocumentLayout.java
License:Apache License
public DocumentLayout(String documentId) { this.documentId = documentId; tabSheet.getTab(documentFormLayout).setCaption(Translate.getMessage("documentFormCaption")); tabSheet.getTab(documentHistoryLayout).setCaption(Translate.getMessage("documentHistoryCaption")); tabSheet.getTab(documentAccessLayout).setCaption(Translate.getMessage("documentAccessCaption")); btnAddPermission.setCaption(Translate.getMessage("btnAddPermission")); btnSave.setCaption(Translate.getMessage("btnSave")); document = HybridbpmUI.getDocumentAPI().getDocumentById(documentId, false); setCaption(document.getName());//w w w.j av a 2 s . com Design.read(this); documentFormLayout.initUI(document); documentHistoryLayout.setDocument(document); documentHistoryLayout.refreshTable(); Responsive.makeResponsive(this); btnSave.setIcon(FontAwesome.SAVE); btnSave.addClickListener(this); btnAddPermission.setIcon(FontAwesome.PLUS); btnAddPermission.addClickListener(this); btnAddPermission.setVisible(false); tabSheet.addSelectedTabChangeListener(this); if (Objects.equals(Document.TYPE.FOLDER, document.getType())) { tabSheet.getTab(documentFormLayout).setCaption("Folder"); tabSheet.getTab(documentHistoryLayout).setVisible(false); } else if (Objects.equals(Document.TYPE.FILE, document.getType())) { tabSheet.getTab(documentFormLayout).setCaption("File"); tabSheet.getTab(documentHistoryLayout).setVisible(true); } if (HybridbpmUI.getDocumentAPI().getMyDocumentPermissions(document) .contains(Permission.PERMISSION.PERMISSIONS)) { documentAccessLayout.setDocument(document); documentAccessLayout.refreshTable(); tabSheet.getTab(documentAccessLayout).setVisible(true); } else { tabSheet.getTab(documentAccessLayout).setVisible(false); } }
From source file:com.hybridbpm.ui.HybridbpmUI.java
License:Apache License
@Override protected void init(VaadinRequest request) { Responsive.makeResponsive(this); setLocale(request.getLocale());/*from ww w .j a v a2s.co m*/ dashboardListenerId = HazelcastServer.getDashboardEventTopic() .addMessageListener(new DashBoardMessageListener(this)); addStyleName(ValoTheme.UI_WITH_MENU); mainLayout.setExpandRatio(viewContent, 1f); mainLayout.setSizeFull(); mainLayout.addStyleName("mainview"); viewContent.setSizeFull(); viewContent.addStyleName("view-content"); rootLayout.setSizeFull(); updateContent(); }
From source file:com.hybridbpm.ui.view.AccessView.java
License:Apache License
public AccessView() { Design.read(this); Responsive.makeResponsive(panelLayout); tabSheet.addTab(usersLayout, "Users", FontAwesome.USER); tabSheet.addTab(userGroupsLayout, "User Group", FontAwesome.SITEMAP); tabSheet.addTab(groupsLayout, "Group", FontAwesome.USERS); tabSheet.addTab(roleGroupsLayout, "Group Role", FontAwesome.SITEMAP); tabSheet.addTab(rolesLayout, "Roles", FontAwesome.USERS); tabSheet.addSelectedTabChangeListener(this); usersLayout.refreshTable();/*from ww w .j a v a2s . co m*/ }
From source file:com.hybridbpm.ui.view.AdministrationView.java
License:Apache License
public AdministrationView() { Design.read(this); Responsive.makeResponsive(panelLayout); tabSheet.addTab(systemParametersLayout, "Parameters", FontAwesome.WRENCH); tabSheet.addTab(allProgressLayout, "Processes", FontAwesome.COGS); // tabSheet.addTab(viewsLayout, "Views", FontAwesome.LIST); tabSheet.addSelectedTabChangeListener(this); systemParametersLayout.refreshTable(); allProgressLayout.setTabSheet(tabSheet); }
From source file:com.hybridbpm.ui.view.CalendarView.java
License:Apache License
public CalendarView() { Design.read(this); Responsive.makeResponsive(panelLayout); tabSheet.setSizeFull();/*from w w w .j av a2 s. c om*/ tabSheet.addTab(calendarLayout, "Calendar", FontAwesome.CALENDAR); tabSheet.addSelectedTabChangeListener(this); tabSheet.setCloseHandler(this); calendarLayout.refreshData(); calendarLayout.setTabSheet(tabSheet); }
From source file:com.hybridbpm.ui.view.CaseView.java
License:Apache License
public CaseView() { Design.read(this); Responsive.makeResponsive(panelLayout); tabSheet.setSizeFull();/*w ww . j a va2 s.co m*/ tabSheet.addTab(startProcessLayout, "Start case", FontAwesome.MAGIC); tabSheet.addTab(myCaseInProgressLayout, "In progress", FontAwesome.BRIEFCASE); tabSheet.addTab(myCaseDoneLayout, "Done", FontAwesome.ARCHIVE); tabSheet.setSelectedTab(myCaseInProgressLayout); tabSheet.addSelectedTabChangeListener(this); tabSheet.setCloseHandler(this); startProcessLayout.refreshTable(); startProcessLayout.setTabSheet(tabSheet); myCaseInProgressLayout.setTabSheet(tabSheet); myCaseDoneLayout.setTabSheet(tabSheet); }