List of usage examples for com.vaadin.ui VerticalLayout setSizeUndefined
@Override public void setSizeUndefined()
From source file:com.jain.common.authenticate.LoginAction.java
License:Apache License
private void createActions(VerticalLayout layout) { ButtonSegment hLayout = new ButtonSegment(ApplicationTheme.FIRST, ApplicationTheme.LAST); hLayout.setStyleName(ApplicationTheme.HEADER_SEGMENT_SMALL); hLayout.createSegment(this, JAction.LOGIN, JAction.CANCEL); VerticalLayout vLayout = new VerticalLayout(); vLayout.setSizeUndefined(); vLayout.setStyleName(ApplicationTheme.VIEW); vLayout.addComponent(hLayout);//w w w . j a v a 2 s . c o m layout.addComponent(vLayout); layout.setComponentAlignment(vLayout, Alignment.MIDDLE_CENTER); layout.setExpandRatio(vLayout, 1); }
From source file:com.jain.i18N.definition.PersonDefinitionForm.java
License:Apache License
private void createActions(VerticalLayout layout) { if (!viewOnly) { JainEditClickListener clickListner = new JainEditClickListener(this); HorizontalLayout hLayout = VaadinHelper.createButtonSegment(clickListner, JAction.SAVE, JAction.CANCEL); VerticalLayout vLayout = new VerticalLayout(); vLayout.setSizeUndefined(); vLayout.setStyleName(ApplicationTheme.VIEW); vLayout.addComponent(hLayout);/*from w w w . j av a 2 s.c om*/ layout.addComponent(vLayout); layout.setComponentAlignment(vLayout, Alignment.MIDDLE_CENTER); layout.setExpandRatio(vLayout, 1); } }
From source file:com.jiangyifen.ec2.ui.LoginLayout.java
/** * ??? (?, ?)//w ww . j a va 2 s .c om */ private void createConflictManageWindow() { conflictManageWindow = new Window("?"); conflictManageWindow.setModal(true); conflictManageWindow.setResizable(false); VerticalLayout mainLayout = new VerticalLayout(); mainLayout.setSpacing(true); mainLayout.setMargin(true); mainLayout.setSizeUndefined(); mainLayout.setWidth("400px"); conflictManageWindow.setContent(mainLayout); Label captionLabel = new Label("<font color='blue'><B>??</B></font>", Label.CONTENT_XHTML); captionLabel.setWidth("-1px"); mainLayout.addComponent(captionLabel); conflictNotice = new RichTextArea(); conflictNotice.setReadOnly(true); conflictNotice.setWriteThrough(false); conflictNotice.setWidth("-1px"); mainLayout.addComponent(conflictNotice); String placeholder = "         "; Label noticeLabel = new Label( "<font color='red'><B>" + placeholder + "?</B></font>", Label.CONTENT_XHTML); noticeLabel.setWidth("-1px"); mainLayout.addComponent(noticeLabel); Label confirmLabel = new Label("<B>" + placeholder + "??</B>", Label.CONTENT_XHTML); confirmLabel.setWidth("-1px"); mainLayout.addComponent(confirmLabel); // ??? HorizontalLayout operatorHLayout = new HorizontalLayout(); operatorHLayout.setSpacing(true); mainLayout.addComponent(operatorHLayout); confirm = new Button("", this); confirm.setImmediate(true); cancel = new Button("?", this); cancel.setStyleName("default"); cancel.setImmediate(true); operatorHLayout.addComponent(confirm); operatorHLayout.addComponent(cancel); }
From source file:com.jiangyifen.ec2.ui.mgr.outlinemanage.AddOutline.java
public AddOutline(OutlineManagement outlineManagement) { this.center(); this.setModal(true); this.setResizable(false); this.setWidth("360px"); this.setHeight("335px"); this.setCaption(""); this.outlineManagement = outlineManagement; domain = SpringContextHolder.getDomain(); sipConfigService = SpringContextHolder.getBean("sipConfigService"); reloadAsteriskService = SpringContextHolder.getBean("reloadAsteriskService"); queueMemberRelationService = SpringContextHolder.getBean("queueMemberRelationService"); phone2PhoneSettingService = SpringContextHolder.getBean("phone2PhoneSettingService"); userQueueService = SpringContextHolder.getBean("userQueueService"); queueService = SpringContextHolder.getBean("queueService"); autoDialoutTaskService = SpringContextHolder.getBean("autoDialoutTaskService"); //WindowLayout VerticalLayout windowContent = new VerticalLayout(); windowContent.setSizeUndefined(); windowContent.setMargin(false, true, true, true); windowContent.setSpacing(true);/*w ww . j a v a 2 s. c o m*/ windowContent.setStyleName(StyleConfig.VERTICAL_STYLE); this.setContent(windowContent); // Form ? createFormComponent(windowContent); }
From source file:com.jiangyifen.ec2.ui.mgr.outlinemanage.EditOutline.java
public EditOutline(OutlineManagement outlineManagement) { this.center(); this.setModal(true); this.setWidth("360px"); this.setHeight("565px"); this.setResizable(false); this.setCaption(""); this.outlineManagement = outlineManagement; domain = SpringContextHolder.getDomain(); sipConfigService = SpringContextHolder.getBean("sipConfigService"); reloadAsteriskService = SpringContextHolder.getBean("reloadAsteriskService"); queueMemberRelationService = SpringContextHolder.getBean("queueMemberRelationService"); phone2PhoneSettingService = SpringContextHolder.getBean("phone2PhoneSettingService"); userQueueService = SpringContextHolder.getBean("userQueueService"); queueService = SpringContextHolder.getBean("queueService"); autoDialoutTaskService = SpringContextHolder.getBean("autoDialoutTaskService"); //WindowLayout VerticalLayout windowContent = new VerticalLayout(); windowContent.setSizeUndefined(); windowContent.setMargin(false, true, true, true); windowContent.setSpacing(true);/*w w w . j a v a 2s. c om*/ windowContent.setStyleName(StyleConfig.VERTICAL_STYLE); this.setContent(windowContent); // Form ? createFormComponent(windowContent); }
From source file:com.jiangyifen.ec2.ui.mgr.usermanage.EditUser.java
/** * User/*from ww w. j a v a 2s . c o m*/ * @param project */ public EditUser(UserManagement userManagement) { this.center(); this.setModal(true); this.userManagement = userManagement; domain = SpringContextHolder.getDomain(); loginUser = SpringContextHolder.getLoginUser(); //Service? userService = SpringContextHolder.getBean("userService"); departmentService = SpringContextHolder.getBean("departmentService"); roleService = SpringContextHolder.getBean("roleService"); queueService = SpringContextHolder.getBean("queueService"); queueMemberRelationService = SpringContextHolder.getBean("queueMemberRelationService"); phone2PhoneSettingService = SpringContextHolder.getBean("phone2PhoneSettingService"); userQueueService = SpringContextHolder.getBean("userQueueService"); //WindowLayout VerticalLayout windowContent = new VerticalLayout(); windowContent.setSizeUndefined(); windowContent.setMargin(false, true, true, true); windowContent.setSpacing(true); windowContent.setStyleName(StyleConfig.VERTICAL_STYLE); this.setContent(windowContent); //From form = new Form(); form.setValidationVisibleOnCommit(true); form.setValidationVisible(false); form.addStyleName("chb"); //Form????? allRoles = roleService.getAll(domain); form.setFormFieldFactory(new MyFieldFactory()); form.setFooter(buildButtonsLayout()); windowContent.addComponent(form); }
From source file:com.klwork.explorer.ui.content.file.ImageAttachmentRenderer.java
License:Apache License
@Override public Component getDetailComponent(Attachment attachment) { VerticalLayout verticalLayout = new VerticalLayout(); verticalLayout.setSizeUndefined(); verticalLayout.setSpacing(true);/*from w w w . j a va 2 s . co m*/ verticalLayout.setMargin(true); Label description = new Label(attachment.getDescription()); description.setSizeUndefined(); verticalLayout.addComponent(description); // Image TaskService taskService = ProcessEngines.getDefaultProcessEngine().getTaskService(); String mimeType = extractMineType(attachment.getType()); InputStream imageStream = ImageUtil.resizeImage(taskService.getAttachmentContent(attachment.getId()), mimeType, 900, 550); Resource resource = new StreamResource(new InputStreamStreamSource(imageStream), attachment.getName() + extractExtention(attachment.getType())); Embedded image = new Embedded(null, resource); verticalLayout.addComponent(image); // Linke HorizontalLayout LinkLayout = new HorizontalLayout(); LinkLayout.setSpacing(true); verticalLayout.addComponent(LinkLayout); verticalLayout.setComponentAlignment(LinkLayout, Alignment.MIDDLE_CENTER); Label fullSizeLabel = new Label( ViewToolManager.getI18nManager().getMessage(Messages.RELATED_CONTENT_SHOW_FULL_SIZE)); LinkLayout.addComponent(fullSizeLabel); Link link = null; if (attachment.getUrl() != null) { link = new Link(attachment.getUrl(), new ExternalResource(attachment.getUrl())); } else { taskService = ProcessEngines.getDefaultProcessEngine().getTaskService(); Resource res = new StreamResource( new InputStreamStreamSource(taskService.getAttachmentContent(attachment.getId())), attachment.getName() + extractExtention(attachment.getType())); link = new Link(attachment.getName(), res); } link.setIcon(Images.RELATED_CONTENT_PICTURE); link.setTargetName(ExplorerLayout.LINK_TARGET_BLANK); LinkLayout.addComponent(link); return verticalLayout; }
From source file:com.klwork.explorer.ui.content.GenericAttachmentRenderer.java
License:Apache License
public Component getDetailComponent(Attachment attachment) { VerticalLayout verticalLayout = new VerticalLayout(); verticalLayout.setSizeUndefined(); verticalLayout.setSpacing(true);//w w w.j a v a 2s .c o m verticalLayout.setMargin(true); Label description = new Label(attachment.getDescription()); description.setSizeUndefined(); verticalLayout.addComponent(description); HorizontalLayout linkLayout = new HorizontalLayout(); linkLayout.setSpacing(true); verticalLayout.addComponent(linkLayout); // Image linkLayout.addComponent(new Embedded(null, getImage(attachment))); // Link Link link = null; if (attachment.getUrl() != null) { link = new Link(attachment.getUrl(), new ExternalResource(attachment.getUrl())); } else { TaskService taskService = ProcessEngines.getDefaultProcessEngine().getTaskService(); Resource res = new StreamResource( new InputStreamStreamSource(taskService.getAttachmentContent(attachment.getId())), attachment.getName() + extractExtention(attachment.getType())); link = new Link(attachment.getName(), res); } // Set generic image and external window link.setTargetName(ExplorerLayout.LINK_TARGET_BLANK); linkLayout.addComponent(link); return verticalLayout; }
From source file:com.liferay.mail.vaadin.MessageToolbar.java
License:Open Source License
protected void selectMoveTarget() { // Ensure a mail is selected List<Message> message = mainMailView.getSelectedMessages(); if (message.isEmpty()) { Controller.get().showInfo(Lang.get("no-messages-selected")); return;// www . j a va 2 s . com } Account account; try { account = MessageUtil.getAccountForMessage(message.get(0)); } catch (Exception e) { Controller.get().showError(Lang.get("unable-to-move-messages"), e); return; } VerticalLayout panelLayout = new VerticalLayout(); panelLayout.setMargin(false, true, true, false); panelLayout.setSizeUndefined(); Panel p = new Panel(panelLayout); p.setSizeUndefined(); final PopupView popupView = new PopupView("", p); FolderTree destinationTree = new FolderTree(new FolderChangeListener() { public void selectedFolderChanged(Folder folder) { if (folder != null) { popupView.setPopupVisible(false); Controller controller = Controller.get(); try { MessageUtil.moveMessagesTo(mainMailView.getSelectedMessages(), folder); controller.showInfo(Lang.get("messages-have-been-moved")); } catch (MailException me) { if (me.getType() == MailException.FOLDER_INVALID_DESTINATION) { controller.showError(Lang.get("cannot-move-messages-to-this-folder")); } } catch (PortalException e) { controller.showError(Lang.get("unable-to-move-messages"), e); } catch (SystemException e) { controller.showError(Lang.get("unable-to-move-messages"), e); } } } }, null); p.addComponent(destinationTree); popupView.setPopupVisible(true); popupView.addListener(new PopupVisibilityListener() { public void popupVisibilityChange(PopupVisibilityEvent event) { // Remove popupview from layout when it has been closed if (!event.isPopupVisible()) { removeComponent(event.getPopupView()); } } }); // Set tree properties List<Account> accounts = new ArrayList<Account>(); accounts.add(account); final FolderContainer folderContainer = new FolderContainer(accounts); destinationTree.setContainerDataSource(folderContainer); destinationTree.expandItemsRecursively(destinationTree.rootItemIds().iterator().next()); addComponent(popupView, moveToIndex); }
From source file:com.purebred.core.view.EntityFormWindow.java
License:Open Source License
private void initialize() { addStyleName("p-entity-form-window"); addStyleName("opaque"); VerticalLayout layout = (VerticalLayout) getContent(); layout.setMargin(true);//from w ww .j a va 2 s . com layout.setSpacing(true); layout.setSizeUndefined(); setSizeUndefined(); setModal(true); setClosable(true); setScrollable(true); addListener(CloseEvent.class, this, "onClose"); MainApplication.getInstance().getMainWindow().addWindow(this); }