List of usage examples for com.vaadin.ui VerticalLayout addComponent
@Override public void addComponent(Component c)
From source file:com.hivesys.dashboard.view.repository.RepositoryUpload.java
public RepositoryUpload() { final Label infoLabel = new Label("asasasasasasasxasx"); final VerticalLayout dropPane = new VerticalLayout(infoLabel); dropPane.setComponentAlignment(infoLabel, Alignment.MIDDLE_CENTER); dropPane.setWidth(280.0f, Unit.PIXELS); dropPane.setHeight(200.0f, Unit.PIXELS); dropPane.addStyleName("drop-area"); progress = new ProgressBar(); progress.setIndeterminate(true);/*from w w w . j a v a2 s. co m*/ progress.setVisible(false); dropPane.addComponent(progress); final DragAndDropBox dropBox = new DragAndDropBox(dropPane, progress) { @Override void processFile(String name, String type, ByteArrayOutputStream bas) { throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. } }; dropBox.setSizeUndefined(); }
From source file:com.hris.employee.EmployeeUI.java
private VerticalLayout firstComponent() { employeeGridUI = new EmployeeGridUI(new EmployeeDataContainer()); VerticalLayout v = new VerticalLayout(); v.setWidth("100%"); v.setHeight("100%"); employeeStatus = employeeStatusComboBox(); employeeStatus.addValueChangeListener((Property.ValueChangeEvent event) -> { v.removeComponent(employeeGridUI); if (employeeStatus.getValue() == null) { if (getBranchId() == 0) { employeeGridUI = new EmployeeGridUI(new EmployeeDataContainer()); } else { employeeGridUI = new EmployeeGridUI( new EmployeeDataContainer(getBranchId(), (int) employeeStatus.getValue())); }/*ww w. ja v a 2 s . c o m*/ } else { employeeGridUI = new EmployeeGridUI( new EmployeeDataContainer(getBranchId(), (int) employeeStatus.getValue())); } v.addComponent(employeeGridUI); v.setExpandRatio(employeeGridUI, 2); }); v.addComponent(employeeStatus); v.addComponent(employeeGridUI); v.setExpandRatio(employeeGridUI, 2); return v; }
From source file:com.hris.employee.EmployeeUI.java
private VerticalLayout firstComponent(int branchId) { employeeGridUI = new EmployeeGridUI(new EmployeeDataContainer(branchId)); VerticalLayout v = new VerticalLayout(); v.setWidth("100%"); v.setHeight("100%"); employeeStatus = employeeStatusComboBox(); employeeStatus.addValueChangeListener((Property.ValueChangeEvent event) -> { v.removeComponent(employeeGridUI); if (employeeStatus.getValue() == null) { employeeGridUI = new EmployeeGridUI(new EmployeeDataContainer(getBranchId())); } else {/*from w w w.j ava2s . c o m*/ employeeGridUI = new EmployeeGridUI( new EmployeeDataContainer(getBranchId(), (int) employeeStatus.getValue())); } v.addComponent(employeeGridUI); v.setExpandRatio(employeeGridUI, 2); }); v.addComponent(employeeStatus); v.addComponent(employeeGridUI); v.setExpandRatio(employeeGridUI, 2); return v; }
From source file:com.hris.payroll.PayrollUI.java
private void getPayrollTab() { TabSheet tab = new TabSheet(); tab.setSizeFull();//w ww . j a va 2 s . co m VerticalLayout v = new VerticalLayout(); v.setSizeFull(); v.addComponent(ledger); tab.addTab(v, "Payroll Ledger"); v = new VerticalLayout(); v.setSizeFull(); tab.addTab(v, "Payroll Register"); v = new VerticalLayout(); v.setSizeFull(); v.addComponent(tm); tab.addTab(v, "13th Month"); v = new VerticalLayout(); v.setSizeFull(); v.addComponent(al); tab.addTab(v, "Alpha List"); v = new VerticalLayout(); v.setSizeFull(); v.addComponent(reportUI); tab.addTab(v, "Reports"); addComponent(tab); }
From source file:com.hris.payroll.reports.ReportViewer.java
public ReportViewer(String reportType, int branchId, Date payrollDate) { this.reportType = reportType; this.branchId = branchId; this.payrollDate = payrollDate; setWidth("900px"); setHeight("600px"); center();// w w w . j a va 2s . c o m StreamResource resource = null; switch (reportType) { case "Payslip": { String filename = "Payslip-" + new Date().getTime() + ".pdf"; resource = new StreamResource(new PayslipReportPDF(getBranchId(), getPayrollDate()), filename); break; } case "Advances Summary": { String filename = "Advances-" + new Date().getTime() + ".pdf"; resource = new StreamResource(new AdvancesSummaryReportPdf(getBranchId(), getPayrollDate()), filename); break; } default: { String filename = "Advances-" + new Date().getTime() + ".pdf"; resource = new StreamResource(new AdvancesReportPdf(getBranchId(), getPayrollDate(), reportType), filename); break; } } resource.setMIMEType("application/pdf"); VerticalLayout v = new VerticalLayout(); v.setSizeFull(); v.setSpacing(true); v.setMargin(new MarginInfo(false, false, true, false)); Embedded em = new Embedded(); em.setSource(resource); em.setSizeFull(); em.setType(Embedded.TYPE_BROWSER); v.addComponent(em); v.setExpandRatio(em, 1); setContent(v); }
From source file:com.hrms.main.AboutHRIS.java
public AboutHRIS() { setCaption("About HRIS"); setWidth("300px"); VerticalLayout vlayout = new VerticalLayout(); vlayout.setSpacing(true);// w ww. j a v a 2s. c o m vlayout.setMargin(true); Label version = new Label("Version: <b>1.5</b>"); version.setContentMode(Label.CONTENT_XHTML); vlayout.addComponent(version); Label title = new Label("Title: <b>Human Resource Information System</b>"); title.setContentMode(Label.CONTENT_XHTML); vlayout.addComponent(title); Label developer = new Label("Developed By: <b>Engr. Godfrey D. Beray</b>"); developer.setContentMode(Label.CONTENT_XHTML); vlayout.addComponent(developer); Label framework = new Label("Framework: <b>VAADIN - Sept2012</b>"); framework.setContentMode(Label.CONTENT_XHTML); vlayout.addComponent(framework); addComponent(vlayout); }
From source file:com.invient.vaadin.InvientChartsDemoWin.java
License:Apache License
public InvientChartsDemoWin() { VerticalLayout mainLayout = new VerticalLayout(); setContent(mainLayout);//from w w w . j a v a 2 s .co m setSizeFull(); mainLayout.setSizeFull(); setCaption("Invient Charts"); HorizontalLayout infoBar = new HorizontalLayout(); mainLayout.addComponent(infoBar); infoBar.setHeight("50px"); infoBar.setWidth("100%"); Label lblAppTitle = new Label("Demo Gallery for Invient Charts"); lblAppTitle.setSizeFull(); lblAppTitle.setStyleName("v-label-app-title"); infoBar.addComponent(lblAppTitle); mainSplit = new HorizontalSplitPanel(); mainSplit.setSizeFull(); mainLayout.addComponent(mainSplit); mainLayout.setExpandRatio(mainSplit, 1); leftLayout = new VerticalLayout(); leftLayout.setSpacing(true); mainSplit.setFirstComponent(leftLayout); rightLayout = new VerticalLayout(); rightLayout.setSpacing(true); rightLayout.setMargin(true); mainSplit.setSecondComponent(rightLayout); mainSplit.setSplitPosition(200, Sizeable.UNITS_PIXELS); navTree = createChartsTree(); leftLayout.addComponent(navTree); eventLog.setReadOnly(true); eventLog.setStyleName("v-textarea-chart-events-log"); eventLog.setSizeFull(); eventLog.setHeight("200px"); setTheme("chartdemo"); }
From source file:com.jain.addon.action.confirm.ConfirmWindow.java
License:Apache License
@JNIComponentInit public void init() { setModal(true);/*from w w w. j a va 2 s . c om*/ setWidth("25%"); VerticalLayout layout = new VerticalLayout(); setContent(layout); layout.setWidth("100%"); layout.setMargin(true); layout.setSpacing(true); layout.setStyleName(JNStyleConstants.J_ALTERNATE_VIEW); JNConfirm confirm = action.getConfirm(); HorizontalLayout hLayout = new HorizontalLayout(); hLayout.setSpacing(true); hLayout.setWidth("100%"); findNAddIcon(confirm, hLayout); Label label = new Label(confirm.message()); label.setContentMode(confirm.mode()); hLayout.addComponent(label); hLayout.setExpandRatio(label, 2); layout.addComponent(hLayout); layout.setComponentAlignment(hLayout, Alignment.MIDDLE_CENTER); ActionMenuBar<ConfirmWindow> menuBar = new ActionMenuBar<ConfirmWindow>(null, this); layout.addComponent(menuBar); layout.setExpandRatio(menuBar, 2); layout.setComponentAlignment(menuBar, Alignment.MIDDLE_CENTER); }
From source file:com.jain.addon.component.crud.JCrudWindow.java
License:Apache License
private void createActions(VerticalLayout layout) { if (!isViewOnly()) { ActionBar<JCrudWindow<T>> hLayout = new ActionBar<JCrudWindow<T>>(null, this); VerticalLayout vLayout = new VerticalLayout(); vLayout.setSizeUndefined();// ww w .j av a2 s. c o m vLayout.setStyleName(JNStyleConstants.J_VIEW); vLayout.addComponent(hLayout); layout.addComponent(vLayout); layout.setComponentAlignment(vLayout, Alignment.MIDDLE_CENTER); layout.setExpandRatio(vLayout, 1); } }
From source file:com.jain.addon.component.crud.JCrudWindow.java
License:Apache License
private void createFieldGroup(VerticalLayout layout) { JainBeanItem<T> item = new JainBeanItem<T>(getValue()); JFieldGroup<T> jainFieldGroup = new JFieldGroup<T>(getType(), columns); jainFieldGroup.setViewOnly(isViewOnly()); jainFieldGroup.setStyleName(JNStyleConstants.J_VIEW); jainFieldGroup.setAlternateStyleName(JNStyleConstants.J_ALTERNATE_VIEW); layout.addComponent(jainFieldGroup); fieldGroup = jainFieldGroup.createFieldGroup(getType(), item); }