List of usage examples for com.vaadin.ui VerticalLayout setCaption
@Override public void setCaption(String caption)
From source file:com.antonjohansson.lprs.view.ErrorView.java
License:Apache License
private VerticalLayout layout() { VerticalLayout layout = new VerticalLayout(); layout.setCaption("Errors found when starting the application"); layout.setSpacing(true);// w w w . ja v a 2 s . c o m layout.setWidthUndefined(); return layout; }
From source file:com.arcusys.liferay.vaadinplugin.ControlPanelUI.java
License:Apache License
private VerticalLayout createIncludeAddonsListLayout(OptionGroup includeAddonsOptionGroup) { VerticalLayout addonsListHolder = new VerticalLayout(); addonsListHolder.setCaption("Select Add-ons"); addonsListHolder.addComponent(includeAddonsOptionGroup); return addonsListHolder; }
From source file:com.arcusys.liferay.vaadinplugin.ui.DetailsWindow.java
License:Apache License
private Layout createVaadinDetails() { Layout vaadinDetailLayout = new VerticalLayout(); vaadinDetailLayout.setWidth("900px"); VerticalLayout vaadinDetails = new VerticalLayout(); vaadinDetails.setMargin(new MarginInfo(true, true, false, true)); Version currentVersion = ControlPanelPortletUtil.getPortalVaadinVersion(); VaadinVersion currentVaadinInfo = VaadinVersion.getVaadinVersion(currentVersion); Collection<VaadinFileInfo> fileInfos = currentVaadinInfo.getVaadinFilesInfo(); Collections.sort((List<VaadinFileInfo>) fileInfos, new Comparator<VaadinFileInfo>() { @Override/*from w ww. ja v a2 s .co m*/ public int compare(VaadinFileInfo o1, VaadinFileInfo o2) { if (o1 == null) return -1; if (o2 == null) return 1; return o1.getOrderPriority().compareTo(o2.getOrderPriority()); } }); for (VaadinFileInfo info : fileInfos) { VerticalLayout infoLayout = new VerticalLayout(); infoLayout.setCaption(info.getName()); infoLayout.setMargin(new MarginInfo(false, true, true, false)); Layout versionLayout = new HorizontalLayout(); versionLayout.setSizeUndefined(); versionLayout.addComponent(new Label("Version: ")); String vaadinJarVersion; try { vaadinJarVersion = ControlPanelPortletUtil.getPortalVaadinJarVersion( info.getPlace() + ControlPanelPortletUtil.FileSeparator + info.getName()); } catch (Exception ex) { vaadinJarVersion = ""; log.warn("Version for " + vaadinJarVersion + " couldn't be read.", ex); } versionLayout.addComponent(new Label(vaadinJarVersion)); infoLayout.addComponent(versionLayout); Layout pathLayout = new HorizontalLayout(); pathLayout.setSizeUndefined(); pathLayout.addComponent(new Label("Path: ")); String path = info.getPlace(); pathLayout.addComponent(new Label(path)); infoLayout.addComponent(pathLayout); vaadinDetails.addComponent(infoLayout); } vaadinDetailLayout.addComponent(vaadinDetails); return vaadinDetailLayout; }
From source file:com.digitallabs.demos.Vaadin6BootstrapThemeDemo.java
License:Apache License
private void forms(ComponentContainer container) { VerticalLayout form = new VerticalLayout(); form.addStyleName(Bootstrap.Forms.FORM.styleName()); form.setSpacing(true);//from w w w .jav a 2s . c o m form.setCaption("Legend"); TextField email = new TextField("Email address"); email.setInputPrompt("Enter email"); form.addComponent(email); PasswordField password = new PasswordField("Password"); password.setInputPrompt("Password"); form.addComponent(password); Upload upload = new Upload("File input", null); form.addComponent(upload); Label help = new Label("Example block-level help text here."); help.addStyleName("help-block"); form.addComponent(help); CheckBox check = new CheckBox("Check me out"); form.addComponent(check); Button submit = new Button("Submit"); submit.addStyleName(Bootstrap.Buttons.DEFAULT.styleName()); form.addComponent(submit); container.addComponent(form); }
From source file:com.etest.view.systemadministration.SystemAdministrationUI.java
public SystemAdministrationUI() { setWidth("100%"); addStyleName("bar"); VerticalLayout v = new VerticalLayout(); v.setCaption("Curriculum"); v.setWidth("100%"); v.addComponent(new CurriculumMainUI()); // v.setMargin(true); addComponent(v);/*from w ww. j ava2s . c o m*/ v = new VerticalLayout(); v.setCaption("Faculty Member"); v.setWidth("100%"); v.addComponent(new FacultyMainUI()); // v.setMargin(true); addComponent(v); v = new VerticalLayout(); v.setCaption("Syllabus"); v.setWidth("100%"); v.addComponent(new SyllabusMainUI()); // v.setMargin(true); addComponent(v); v = new VerticalLayout(); v.setCaption("Semestral Team"); v.setWidth("100%"); v.addComponent(new SemestralTeamUI()); // v.setMargin(true); addComponent(v); v = new VerticalLayout(); v.setCaption("Housekeeping"); v.setWidth("100%"); v.addComponent(new HousekeepingMainUI()); // v.setMargin(true); addComponent(v); v = new VerticalLayout(); v.setCaption("System Logs"); v.setWidth("100%"); v.addComponent(new SystemLogsMainUI()); // v.setMargin(true); addComponent(v); }
From source file:com.etest.view.tq.reports.ReportMainUI.java
public ReportMainUI() { setWidth("100%"); addStyleName("bar"); VerticalLayout v = new VerticalLayout(); v.setCaption("Online Queries"); v.setWidth("100%"); v.setMargin(true);//from w w w . j av a 2 s. c om v.addComponent(new OnlineQueriesUI()); addComponent(v); v = new VerticalLayout(); v.setCaption("Report Generator"); v.setWidth("100%"); v.setMargin(true); v.addComponent(new ReportGeneratorUI()); addComponent(v); }
From source file:com.etest.view.tq.TQMainUI.java
public TQMainUI() { setWidth("100%"); addStyleName("bar"); VerticalLayout v = new VerticalLayout(); v.setCaption("Create TQ Coverage"); v.setWidth("100%"); v.addComponent(new TQCoverageUI()); v.setMargin(true);/*from w w w . jav a 2s . co m*/ addComponent(v); v = new VerticalLayout(); v.setCaption("TQ List"); v.setWidth("100%"); v.addComponent(tqListUI.populateDataTable()); v.setMargin(true); addComponent(v); v = new VerticalLayout(); v.setCaption("Item Analysis"); v.setWidth("100%"); v.addComponent(tqItemAnalysis.populateDataTable()); v.setMargin(true); addComponent(v); // v = new VerticalLayout(); // v.setCaption("Reports"); // v.setWidth("100%"); // v.addComponent(new ReportMainUI()); // v.setMargin(true); // addComponent(v); addSelectedTabChangeListener(this); }
From source file:com.jain.addon.web.layout.JainGroupLayout.java
License:Apache License
private JainLayout createOrUpdateCurrentLayout(JNIGroup group, String groupName) { if (group != null && group.getParent() != null) { JainLayout parentLayout = groupLayoutMap.get(group.getParent().getName()); if (parentLayout == null) { parentLayout = createOrUpdateCurrentLayout(group.getParent(), group.getParent().getName()); }/*from w w w . ja va 2 s .c om*/ if (parentLayout != null) { JainLayout layout = new JainLayout(spacing, margin, group.getParent() == null ? group.getColumns() : group.getParent().getColumns()); if (StringHelper.isNotEmptyWithTrim(alternateStyleName)) layout.setStyleName(alternateStyleName); VerticalLayout groupLayout = new VerticalLayout(); if (StringHelper.isNotEmptyWithTrim(styleName)) groupLayout.setStyleName(styleName); if (StringHelper.isNotEmptyWithTrim(group.getDisplayName())) { groupLayout.setCaption(group.getDisplayName()); } groupLayout.setSpacing(true); groupLayout.setMargin(true); groupLayout.setWidth("100%"); groupLayout.addComponent(layout); parentLayout.addComponent(groupLayout, group.getColSpan()); groupLayoutMap.put(groupName, layout); return layout; } } String groupDisplayName = group == null ? "" : group.getDisplayName(); JainLayout layout = new JainLayout(spacing, margin, group == null ? columns : group.getColumns()); if (StringHelper.isNotEmptyWithTrim(alternateStyleName)) layout.setStyleName(alternateStyleName); VerticalLayout groupLayout = new VerticalLayout(); if (StringHelper.isNotEmptyWithTrim(styleName)) groupLayout.setStyleName(styleName); if (StringHelper.isNotEmptyWithTrim(groupDisplayName)) { groupLayout.setCaption(group.getDisplayName()); } groupLayout.setSpacing(true); groupLayout.setMargin(true); groupLayout.setWidth("100%"); groupLayout.addComponent(layout); super.addComponent(groupLayout); groupLayoutMap.put(groupName, layout); return layout; }
From source file:com.m4gik.views.component.LicenseScreen.java
/** * Method builds license layout with texts. * // w w w . j av a 2 s. c o m * @return The VerticalLayout with texts. * * @see com.m4gik.views.component.ViewScreen#build() */ @Override public Layout build() { VerticalLayout layout = new VerticalLayout(); layout.setSizeFull(); layout.setCaption("Welcome"); Panel welcome = new Panel("License"); welcome.setSizeFull(); welcome.addStyleName(Runo.PANEL_LIGHT); layout.addComponent(welcome); layout.setExpandRatio(welcome, 1); CssLayout margin = new CssLayout(); // margin.setMargin(true); margin.setWidth("100%"); welcome.setContent(margin); Label title = new Label("Music player"); title.addStyleName(Runo.LABEL_H1); // margin.addComponent(title); HorizontalLayout texts = new HorizontalLayout(); texts.setSpacing(true); texts.setWidth("100%"); margin.addComponent(texts); addText(texts, "<h3>Everything You Need Is Here</h3>" + "<p>Everything you see inside this application...</p>", null); addText(texts, "<h3>Everything You Need Is Here</h3>" + "<p>Everything you see inside this application...</p>", null); addText(texts, "<h3>Everything You Need Is Here</h3>" + "<p>Everything you see inside this application...</p>", null); layout.addComponent(new Label("<hr />", Label.CONTENT_XHTML)); return layout; }
From source file:com.mcparland.john.TabsURL.java
License:Apache License
/** * Create the tabs./*from w w w . ja v a 2 s .c om*/ * * @param tabNames * the names of the tabs to create. */ private void createTabs(String[] tabNames) { for (String tabName : tabNames) { VerticalLayout tab = new VerticalLayout(); tab.setCaption(tabName); tab.addComponent(new Label("<h1>" + tabName + "</h1>", ContentMode.HTML)); tab.setHeight(400, Unit.PIXELS); addComponent(tab); } }