@Override public ComponentContainer getLayout() { String title = (user.getUsername() == null) ? AppContext.getMessage(UserI18nEnum.VIEW_NEW_USER) : user.getDisplayName(); final AddViewLayout formAddLayout = new AddViewLayout(title, FontAwesome.USER); final VerticalLayout layout = new VerticalLayout(); final Label organizationHeader = new Label(AppContext.getMessage(UserI18nEnum.SECTION_BASIC_INFORMATION)); organizationHeader.setStyleName("h2"); layout.addComponent(organizationHeader); this.basicInformationLayout = new GridFormLayoutHelper(2, 1, "100%", "167px", Alignment.TOP_LEFT); this.basicInformationLayout.getLayout().setWidth("100%"); this.basicInformationLayout.getLayout().setMargin(false); this.basicInformationLayout.getLayout().addStyleName(UIConstants.COLORED_GRIDLAYOUT); layout.addComponent(this.basicInformationLayout.getLayout()); formAddLayout.addHeaderRight(createButtonControls()); formAddLayout.addBody(layout); formAddLayout.addBottomControls(createBottomPanel()); return formAddLayout; }
private void buildLayout() { VerticalLayout top = new VerticalLayout(); Label l1 = new Label("Users"); l1.setStyleName("h2"); top.addComponent(l1); top.addComponent(fieldSearch); top.addComponent(filterCCNo); Label l2 = new Label("Rules"); l2.setStyleName("h2"); userGrid.setWidth("100%"); userGrid.setHeight("250px"); userRulesGrid.setWidth("100%"); userRulesGrid.setHeight("250px"); HorizontalLayout rulesButtons = new HorizontalLayout(); rulesButtons.addComponent(addUserRuleButton); rulesButtons.addComponent(editUserRuleButton); rulesButtons.addComponent(deleteUserRuleButton); Panel userPanel = new Panel(userGrid); Panel userRulesPanel = new Panel(userRulesGrid); VerticalLayout main = new VerticalLayout(top, userPanel, l2, userRulesGrid, rulesButtons); main.setMargin(new MarginInfo(false, true, false, true)); setContent(main); }
@AutoGenerated private VerticalLayout buildVerticalLayout_2() { // common part: create layout verticalLayout_2 = new VerticalLayout(); verticalLayout_2.setImmediate(false); verticalLayout_2.setWidth("-1px"); verticalLayout_2.setHeight("-1px"); verticalLayout_2.setMargin(false); // label_1 label_1 = new Label(); label_1.setStyleName("h1"); label_1.setImmediate(false); label_1.setWidth("-1px"); label_1.setHeight("-1px"); label_1.setValue("Filtro de Busqueda de Usuarios"); verticalLayout_2.addComponent(label_1); // horizontalLayout_3 horizontalLayout_3 = buildHorizontalLayout_3(); verticalLayout_2.addComponent(horizontalLayout_3); // tblUsuarios tblUsuarios = new Table(); tblUsuarios.setImmediate(false); tblUsuarios.setWidth("650px"); tblUsuarios.setHeight("430px"); verticalLayout_2.addComponent(tblUsuarios); return verticalLayout_2; }
protected void addResourceLinks() { List<String> resourceNames = repositoryService.getDeploymentResourceNames(deployment.getId()); Collections.sort(resourceNames); // small nr of elements, so we can do it in-memory if (resourceNames.size() > 0) { Label resourceHeader = new Label(i18nManager.getMessage(Messages.DEPLOYMENT_HEADER_RESOURCES)); resourceHeader.setWidth("95%"); resourceHeader.addStyleName(ExplorerLayout.STYLE_H3); resourceHeader.addStyleName(ExplorerLayout.STYLE_DETAIL_BLOCK); addDetailComponent(resourceHeader); // resources VerticalLayout resourceLinksLayout = new VerticalLayout(); resourceLinksLayout.setSpacing(true); resourceLinksLayout.setMargin(true, false, false, false); addDetailComponent(resourceLinksLayout); for (final String resourceName : resourceNames) { StreamResource.StreamSource streamSource = new StreamSource() { public InputStream getStream() { return repositoryService.getResourceAsStream(deployment.getId(), resourceName); } }; Link resourceLink = new Link( resourceName, new StreamResource(streamSource, resourceName, ExplorerApp.get())); resourceLinksLayout.addComponent(resourceLink); } } }
public ErrorView() { setMargin(true); message = new Label(); addComponent(message); message.setSizeUndefined(); message.addStyleName(ValoTheme.LABEL_FAILURE); }
public LastEventUpdate(String title, String value) { setSizeUndefined(); this.setSpacing(true); addStyleName("spark"); setDefaultComponentAlignment(Alignment.TOP_CENTER); // Security Threat Status Label securityStatusLabel = new Label(title); // securityStatusLabel.setSizeUndefined(); securityStatusLabel.addStyleName(ValoTheme.LABEL_BOLD); addComponent(securityStatusLabel); if (value == null) { value = "No record."; } Label securityStatusVal = new Label(value); // securityStatusVal.setSizeUndefined(); securityStatusVal.addStyleName(ValoTheme.LABEL_COLORED); addComponent(securityStatusVal); // UI.getCurrent().setPollInterval(5000); this.setImmediate(true); }
private void BuildBranding() { branding.setSizeUndefined(); branding.addStyleName("branding"); branding.addStyleName("menu"); Button b = new NativeButton(); b.addStyleName("icon-dashboard"); b.setSizeFull(); b.addClickListener( new ClickListener() { @Override public void buttonClick(ClickEvent event) { clearMenuSelection(menu); event.getButton().addStyleName("selected"); if (!navegador.getState().equals("/dashboard")) navegador.navigateTo("/dashboard"); } }); viewNameToMenuButton.put("/dashboard", b); viewNameToMenuButton.get("/dashboard").setHtmlContentAllowed(true); viewNameToMenuButton.get("/dashboard").setCaption("<span class=\"badge\">2</span>"); Label logo = new Label("Zombre <span>Underwear</span>", ContentMode.HTML); logo.setSizeFull(); branding.addComponent(b); // branding.addComponent(logo); }
/** @param errorMsg the error description */ public ErrorScreen(String errorMsg) { super(); Label label; setSizeFull(); // logoComponent: horizontal layout (label left + image + label right) HorizontalLayout logoComponent = new HorizontalLayout(); logoComponent.setWidth("100%"); label = new Label(); logoComponent.addComponent(label); logoComponent.setExpandRatio(label, 1.0f); Resource res = LibResource.getImgResource("splash_image.png"); if (res != null) { Image img = LibImage.getImage(res); logoComponent.addComponent(img); } label = new Label(); logoComponent.addComponent(label); logoComponent.setExpandRatio(label, 1.0f); // msgComponent: (label left + msg label + label right) HorizontalLayout msgComponent = new HorizontalLayout(); msgComponent.setWidth("100%"); label = new Label(); msgComponent.addComponent(label); msgComponent.setExpandRatio(label, 1.0f); // label.addStyleName("blueBg"); msgLabel = new Label(errorMsg); msgComponent.addComponent(msgLabel); msgLabel.setWidthUndefined(); msgLabel.addStyleName("error-screen-msg"); label = new Label(); msgComponent.addComponent(label); msgComponent.setExpandRatio(label, 1.0f); // label.addStyleName("blueBg"); // add components to this vertical layout label = new Label(); addComponent(label); setExpandRatio(label, 1.0f); addComponent(logoComponent); label = new Label(); addComponent(label); setExpandRatio(label, 0.3f); addComponent(msgComponent); label = new Label(); addComponent(label); setExpandRatio(label, 1.0f); }
private void checkDataBinding(Class<? extends AbstractField> class1) { boolean ok = false; AbstractField b; try { b = class1.newInstance(); b.setCaption("Button of type " + class1.getSimpleName()); try { b.setWriteThrough(true); b.setReadThrough(true); ObjectProperty<String> prop = new ObjectProperty<String>("ABC 123"); /* * This should throw an exception or somehow tell that the * property was invalid (wrong type). See #2223. */ b.setPropertyDataSource(prop); } catch (Exception e) { e.printStackTrace(); } } catch (Exception e1) { e1.printStackTrace(); return; } if (ok) { status.setValue(status.getValue() + " " + class1.getClass().getSimpleName() + "/DB: OK"); } else { status.setValue(status.getValue() + " " + class1.getClass().getSimpleName() + "/DB: FAILED"); } }
private Component createProfileEditorInvite() { VerticalLayout layout = new VerticalLayout(); layout.setSizeFull(); layout.setDefaultComponentAlignment(Alignment.MIDDLE_CENTER); if (!SettingsManager.get().isSettingsEditorEnabled()) { layout.addComponent( new Label("No connection profiles defined and you are not allowed to create one.")); } else { Button createProfileLink = new Button( "Create profile", new Button.ClickListener() { @Override public void buttonClick(Button.ClickEvent event) { addProfile(); } }); createProfileLink.setStyleName(ValoTheme.BUTTON_LINK); Label line1 = new Label("No connection profiles defined."); line1.setSizeUndefined(); VerticalLayout inner = new VerticalLayout(); inner.setDefaultComponentAlignment(Alignment.MIDDLE_CENTER); inner.addComponents(line1, createProfileLink); layout.addComponents(inner); } return layout; }
/** * 页面底部版权 Bar * * @return */ public HorizontalLayout getPageFooter() { // 底部公司介绍 水平布局 HorizontalLayout footer = new HorizontalLayout(); footer.setWidth(100, Unit.PERCENTAGE); footer.setMargin(true); footer.addStyleName(Reindeer.LAYOUT_BLACK); // -----------------------底部公司介绍------------------------------- Label lbcopyright = new Label("Copyright 2014"); lbcopyright.setSizeUndefined(); // lbcopyright.addStyleName(Reindeer.LABEL_H2); Label lbcompany = new Label("上海释伟科技有限公司"); // lbcompany.addStyleName(Reindeer.LABEL_H2); Label lbdesc = new Label("留夫鸭电子商务O2O解决方案"); // lbdesc.addStyleName(Reindeer.LABEL_H2); Label lbspace = new Label(); // 占位空间 lbspace.setWidth(520, Unit.PIXELS); footer.setSpacing(true); // 设置间隙 footer.addComponent(lbcopyright); footer.setComponentAlignment(lbcopyright, Alignment.MIDDLE_LEFT); // footer.addComponent(lbspace); footer.addComponent(lbdesc); footer.setComponentAlignment(lbdesc, Alignment.MIDDLE_LEFT); footer.addComponent(lbspace); footer.addComponent(lbcompany); footer.setComponentAlignment(lbcompany, Alignment.MIDDLE_LEFT); return footer; }
@AutoGenerated private VerticalLayout buildVerticalLayout_2() { // common part: create layout verticalLayout_2 = new VerticalLayout(); verticalLayout_2.setImmediate(false); verticalLayout_2.setWidth("259px"); verticalLayout_2.setHeight("-1px"); verticalLayout_2.setMargin(false); // loginLabel loginLabel = new Label(); loginLabel.setImmediate(false); loginLabel.setWidth("200px"); loginLabel.setHeight("-1px"); loginLabel.setValue("Welcome to AppSyc!"); verticalLayout_2.addComponent(loginLabel); verticalLayout_2.setComponentAlignment(loginLabel, new Alignment(20)); // loginForm_2 loginForm_2 = new LoginForm(); loginForm_2.setStyleName("v-loginform"); loginForm_2.setImmediate(false); loginForm_2.setWidth("90.72%"); loginForm_2.setHeight("-1px"); verticalLayout_2.addComponent(loginForm_2); verticalLayout_2.setComponentAlignment(loginForm_2, new Alignment(48)); return verticalLayout_2; }
protected void addHeader() { GridLayout header = new GridLayout(3, 2); header.setWidth(100, UNITS_PERCENTAGE); header.addStyleName(ExplorerLayout.STYLE_TITLE_BLOCK); header.setSpacing(true); header.setMargin(false, false, true, false); // Add image Embedded image = new Embedded(null, Images.PROCESS_50); header.addComponent(image, 0, 0, 0, 1); // Add task name Label nameLabel = new Label(getProcessDisplayName(processDefinition, processInstance)); nameLabel.addStyleName(Reindeer.LABEL_H2); header.addComponent(nameLabel, 1, 0, 2, 0); // Add start time PrettyTimeLabel startTimeLabel = new PrettyTimeLabel( i18nManager.getMessage(Messages.PROCESS_START_TIME), historicProcessInstance.getStartTime(), null, true); startTimeLabel.addStyleName(ExplorerLayout.STYLE_PROCESS_HEADER_START_TIME); header.addComponent(startTimeLabel, 1, 1); header.setColumnExpandRatio(1, 1.0f); header.setColumnExpandRatio(2, 1.0f); panelLayout.addComponent(header); }
private void addDetail(String name, String param, Object value) { Label requestLabel = new Label(r.getParameter(param)); requestLabel.setId(param); Label browserLabel = new Label("" + value); browserLabel.setId(name); l.addComponents(new Label(name), requestLabel, browserLabel); }
/** Create a boolean value control. */ public GenericControl( Context ctx, ItemController itemController, Item item, Variable group, Evaluator evaluator) { super(); component = new HorizontalLayout(); component.setSizeFull(); String label = evaluator.evalStr(ctx, itemController.getLabel()); if (label == null) label = item.getLabel(); Label nameLabel = new Label(label); nameLabel.setWidth(200, Sizeable.UNITS_PIXELS); component.addComponent(nameLabel); Object value = group.getValue(); valueLabel.setCaption(value == null ? "" : value.toString()); component.addComponent(valueLabel); group.addListener( new VariableListener() { @Override public void valueChanged(Variable group) { Object value = group.getValue(); valueLabel.setCaption(value == null ? "" : value.toString()); } }); }
public CustomerMenu(MshenguMain app, String selectedTab) { main = app; Label heading = new Label("CREATE A NEW CUSTOMER"); heading.setSizeUndefined(); heading.addStyleName("h4"); VerticalLayout customerDetailsTab = new VerticalLayout(); customerDetailsTab.setMargin(true); customerDetailsTab.addComponent(new CustomerDetailsTab(main)); customerContractsTab = new CustomerContractsTab(main); newCustomerTab = new NewCustomerTab(app); // customerContractsTab.setMargin(true); // customerContractsTab.addComponent(new CustomerContractsTab(main)); tab = new TabSheet(); tab.setHeight("100%"); tab.setWidth("100%"); tab.addTab(customerDetailsTab, "Customer Details", null); tab.addTab(customerContractsTab, "Hiring Terms", null); tab.addTab(newCustomerTab, "New Customer Form", null); if (selectedTab.equals("LANDING")) { tab.setSelectedTab(customerDetailsTab); } else if (selectedTab.equals("CONTRACTS")) { tab.setSelectedTab(customerContractsTab); } else if (selectedTab.equals("New_Customer")) { tab.setSelectedTab(newCustomerTab); } addComponent(heading); addComponent(tab); setMargin(true); }
@SuppressWarnings("serial") private PopupView createProcessDefinitionPopup(final ProcessDefinition processDefinition) { final VerticalLayout layout = new VerticalLayout(); final PopupView popup = new PopupView(processDefinition.getName(), layout); layout.setSizeUndefined(); layout.setMargin(true); layout.setSpacing(true); Label header = new Label( String.format( "What would you like to do with <b>%s</b>?", processDefinition.getName())); header.setContentMode(Label.CONTENT_XHTML); layout.addComponent(header); Button startNewInstanceButton = new Button("Start a new instance"); startNewInstanceButton.addStyleName(Reindeer.BUTTON_SMALL); startNewInstanceButton.addListener( new Button.ClickListener() { @Override public void buttonClick(ClickEvent event) { getPresenter().startNewInstance(processDefinition); popup.setPopupVisible(false); } }); layout.addComponent(startNewInstanceButton); return popup; }
public OutputStream receiveUpload(String filename, String MIMEType) { mainTabs.setReadOnly(true); subTabs.setReadOnly(true); FileOutputStream fos = null; // Output stream to write to file = new File(filename); try { System.out.println(MIMEType); if (MIMEType.equalsIgnoreCase("text/plain") || MIMEType.equalsIgnoreCase( "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet") || MIMEType.equalsIgnoreCase("application/octet-stream")) { fos = new FileOutputStream(file); } else { } } catch (final java.io.FileNotFoundException e) { Label l = new Label("<h4 style='color:red'>" + e.getMessage() + "</h4>"); l.setContentMode(Label.CONTENT_XHTML); expDetails.addComponent(l); e.printStackTrace(); return null; } catch (final Exception e) { // Error while opening the file. Not reported here. e.printStackTrace(); return null; } return fos; // Return the output stream to write to }
@AutoGenerated private HorizontalLayout buildCompanyDiv() { // common part: create layout companyDiv = new HorizontalLayout(); companyDiv.setImmediate(false); companyDiv.setWidth("299px"); companyDiv.setHeight("31px"); companyDiv.setMargin(false); // companyLabel companyLabel = new Label(); companyLabel.setStyleName("companyLabel"); companyLabel.setImmediate(false); companyLabel.setWidth("63px"); companyLabel.setHeight("15px"); companyLabel.setValue("Company:"); companyDiv.addComponent(companyLabel); // company company = new TextField(); company.setImmediate(false); company.setWidth("202px"); company.setHeight("20px"); company.setRequired(true); company.setSecret(false); companyDiv.addComponent(company); companyDiv.setComponentAlignment(company, new Alignment(34)); return companyDiv; }
/** * Creates a new Label object. * * @param panel the panel * @param content the content */ public static void createHeader2Label(final AbstractOrderedLayout panel, final String content) { final Label label = new Label(content); label.setStyleName("Level2Header"); panel.addComponent(label); panel.setExpandRatio(label, ContentRatio.SMALL); }
@AutoGenerated private HorizontalLayout buildLastNameDiv() { // common part: create layout lastNameDiv = new HorizontalLayout(); lastNameDiv.setImmediate(false); lastNameDiv.setWidth("291px"); lastNameDiv.setHeight("45px"); lastNameDiv.setMargin(false); // lastNameLabel lastNameLabel = new Label(); lastNameLabel.setStyleName("lastNameLabel"); lastNameLabel.setImmediate(false); lastNameLabel.setWidth("69px"); lastNameLabel.setHeight("60.0%"); lastNameLabel.setValue("Last Name:"); lastNameDiv.addComponent(lastNameLabel); lastNameDiv.setComponentAlignment(lastNameLabel, new Alignment(9)); // lastName lastName = new TextField(); lastName.setStyleName("lastName"); lastName.setCaption("Last Name Required:"); lastName.setImmediate(false); lastName.setWidth("202px"); lastName.setHeight("20px"); lastName.setRequired(true); lastName.setSecret(false); lastNameDiv.addComponent(lastName); lastNameDiv.setComponentAlignment(lastName, new Alignment(34)); return lastNameDiv; }
@AutoGenerated private HorizontalLayout buildConfirmDiv() { // common part: create layout confirmDiv = new HorizontalLayout(); confirmDiv.setImmediate(false); confirmDiv.setWidth("100.0%"); confirmDiv.setHeight("100.0%"); confirmDiv.setMargin(false); // confirmLabel confirmLabel = new Label(); confirmLabel.setImmediate(false); confirmLabel.setWidth("52px"); confirmLabel.setHeight("-1px"); confirmLabel.setValue("Confirm:"); confirmDiv.addComponent(confirmLabel); confirmDiv.setComponentAlignment(confirmLabel, new Alignment(9)); // passwordConfirm passwordConfirm = new PasswordField(); passwordConfirm.setCaption("Need confirm password:"******"195px"); passwordConfirm.setHeight("20px"); passwordConfirm.setRequired(true); confirmDiv.addComponent(passwordConfirm); confirmDiv.setExpandRatio(passwordConfirm, 1.0f); confirmDiv.setComponentAlignment(passwordConfirm, new Alignment(34)); return confirmDiv; }
@AutoGenerated private HorizontalLayout buildPasswordDiv() { // common part: create layout passwordDiv = new HorizontalLayout(); passwordDiv.setImmediate(false); passwordDiv.setDescription("Your password"); passwordDiv.setWidth("291px"); passwordDiv.setHeight("34px"); passwordDiv.setMargin(false); // passwordLabel passwordLabel = new Label(); passwordLabel.setImmediate(false); passwordLabel.setWidth("80px"); passwordLabel.setHeight("20px"); passwordLabel.setValue("Password:"******"Need Password"); passwordField.setImmediate(false); passwordField.setWidth("197px"); passwordField.setHeight("20px"); passwordField.setRequired(true); passwordDiv.addComponent(passwordField); passwordDiv.setComponentAlignment(passwordField, new Alignment(34)); return passwordDiv; }
@AutoGenerated private HorizontalLayout buildEmailDiv() { // common part: create layout emailDiv = new HorizontalLayout(); emailDiv.setImmediate(false); emailDiv.setWidth("291px"); emailDiv.setHeight("100.0%"); emailDiv.setMargin(false); // emailLabel emailLabel = new Label(); emailLabel.setStyleName("emailLabel"); emailLabel.setImmediate(false); emailLabel.setWidth("63px"); emailLabel.setHeight("15px"); emailLabel.setValue("Email:"); emailDiv.addComponent(emailLabel); emailDiv.setComponentAlignment(emailLabel, new Alignment(9)); // email email = new TextField(); email.setCaption("Email Required"); email.setImmediate(false); email.setWidth("197px"); email.setHeight("18px"); email.setRequired(true); email.setSecret(false); emailDiv.addComponent(email); emailDiv.setComponentAlignment(email, new Alignment(34)); return emailDiv; }
private TableEmployee showOrganizationLabelsAndButtons(Long id) { panel.removeAllComponents(); panel.addComponent(new ButtonCreateOrganization(treetable)); treetable.setCollapsed(id, false); Organization org = AdminServiceProvider.get().findOrganizationById(id); Label nameLabel = new Label("Название: " + org.getName()); nameLabel.setStyleName("h2"); panel.addComponent(nameLabel); if (org.getCreator() != null) { Label creatorLabel = new Label("Создатель: " + org.getCreator().getLogin()); panel.addComponent(creatorLabel); } Format formatter = new SimpleDateFormat("dd.MM.yyyy hh:mm"); Label dateLabel = new Label("Дата создания: " + formatter.format(org.getDate())); panel.addComponent(dateLabel); panel.addComponent(groupLabel(id)); HorizontalLayout layoutButton = new HorizontalLayout(); layoutButton.addComponent(buttonEditOrganization(org, nameLabel)); layoutButton.addComponent(buttonCreateOrganization(org)); TableEmployee tableEmployee = new TableOrganizationEmployee(id); tableEmployee.setMargin(true, false, false, false); layoutButton.addComponent(buttonCreateEmployee(id)); layoutButton.setMargin(true, false, false, false); layoutButton.addComponent(createGroupLabel(id)); panel.addComponent(layoutButton); return tableEmployee; }
@Override public Component getContent(Project project, ExtensionUtil util) { Layout layout = new CssLayout(); layout.addStyleName(STYLE_TEAM_INFOBOX); layout.setSizeFull(); PeopleExtension ext = project.getExtension(PeopleExtension.class); if (ext != null) { if (ext.getLeads().size() > 0) { Label projectLeadHeaderLabel = new Label("Project Lead"); projectLeadHeaderLabel.addStyleName(STYLE_TEAMLABEL); layout.addComponent(projectLeadHeaderLabel); Component peopleComponent = PeopleComponent.getPeopleListComponentForMember(ext.getLeads()); peopleComponent.addStyleName(InformationBox.STYLE); layout.addComponent(peopleComponent); } if (ext.getMembers().size() > 0) { Label projectTeamHeaderLabel = new Label("Project Team/Committers"); projectTeamHeaderLabel.addStyleName(STYLE_TEAMLABEL); layout.addComponent(projectTeamHeaderLabel); Component peopleComponent = PeopleComponent.getPeopleListComponentForMember(ext.getMembers()); peopleComponent.addStyleName(InformationBox.STYLE); layout.addComponent(peopleComponent); } String mailToTeamHtml = new MailToTeam(ext).composeMailToTeamLabel(); createLabel(layout, mailToTeamHtml); } return layout; }
protected void initSuccessIndicator() { successIndicator = new Label(); successIndicator.setIcon(Images.SUCCESS); successIndicator.setVisible(false); addComponent(successIndicator); }
@AutoGenerated private AbsoluteLayout buildMainLayout() { // common part: create layout mainLayout = new AbsoluteLayout(); mainLayout.setImmediate(false); mainLayout.setWidth("100%"); mainLayout.setHeight("100%"); mainLayout.setMargin(false); // top-level component properties setWidth("100.0%"); setHeight("100.0%"); // mainMenu mainMenu = buildMenuBar(); mainLayout.addComponent(mainMenu, "top:0.0px;left:0.0px;"); // titleLabel titleLabel = new Label(); titleLabel.setStyleName("titleLabel"); titleLabel.setImmediate(false); titleLabel.setWidth("540px"); titleLabel.setHeight("40px"); titleLabel.setValue("Naslov"); mainLayout.addComponent(titleLabel, "top:40.0px;left:20.0px;"); loginComponent = new LoginComponent(this); mainLayout.addComponent(loginComponent, "top:30.0px;left:700.0px;"); // productSearchSplit productSearchSplit = buildProductSearchSplit(); mainLayout.addComponent(productSearchSplit, "top:100.0px;left:10.0px;"); return mainLayout; }
/** * Wrap the given component in a panel. * * @param component the component to wrap * @param title the panel's title * @return a newly created panel wrapper, wrapping the given component */ private static Component wrapInPanel(Component component, String title) { Label titleLabel = new Label(title); VerticalLayout panel = new VerticalLayout(titleLabel, component); panel.setWidthUndefined(); titleLabel.addStyleName(PANEL_TITLE_STYLENAME); panel.addStyleName(PANEL_STYLENAME); return panel; }
public EditableLabel(String value) { label.setValue(value); label.setSizeUndefined(); textField.setPropertyDataSource(label); setDescription("Double click field to change value"); addComponent(label); addListeners(); }