List of usage examples for com.vaadin.ui VerticalLayout setSizeFull
@Override public void setSizeFull()
From source file:org.casbah.ui.MainCAView.java
License:Open Source License
public void init() throws CAProviderException { final X509Certificate caCert = provider.getCACertificate(); Panel panel = new Panel("CA Details"); VerticalLayout mainLayout = new VerticalLayout(); panel.setContent(mainLayout);//from w w w. j av a2 s . c o m mainLayout.setSizeFull(); VerticalLayout caInfo = new VerticalLayout(); TextField name = new TextField("Distinguished Name"); String nameValue = caCert.getSubjectX500Principal().getName(); name.setValue(nameValue); name.setColumns(50); name.setReadOnly(true); TextField issuer = new TextField("Issuer"); issuer.setColumns(50); issuer.setValue(caCert.getIssuerX500Principal().getName()); issuer.setReadOnly(true); DateField expDate = new DateField("Expiration Date"); expDate.setResolution(DateField.RESOLUTION_SEC); expDate.setValue(caCert.getNotAfter()); expDate.setReadOnly(true); TextField serial = new TextField("Serial"); serial.setValue(caCert.getSerialNumber().toString(16)); serial.setReadOnly(true); caInfo.addComponent(name); caInfo.addComponent(issuer); caInfo.addComponent(expDate); caInfo.addComponent(serial); caInfo.setSizeFull(); HorizontalLayout caButtons = new HorizontalLayout(); caButtons.addComponent(new Button("View Certificate", new Button.ClickListener() { private static final long serialVersionUID = 1L; public void buttonClick(ClickEvent event) { try { showEncodedCertificate(caCert, caCert.getSerialNumber().toString(16)); } catch (CAProviderException e) { e.printStackTrace(); } } })); caButtons.addComponent(new Button("Download Certificate", new Button.ClickListener() { private static final long serialVersionUID = 1L; public void buttonClick(ClickEvent event) { try { downloadEncodedCertificate(caCert, caCert.getSerialNumber().toString(16)); } catch (CAProviderException e) { e.printStackTrace(); } } })); caButtons.addComponent(new Button("Sign a CSR", new Button.ClickListener() { private static final long serialVersionUID = 1L; public void buttonClick(ClickEvent event) { try { uploadAndSignCsr(); } catch (CAProviderException pe) { pe.printStackTrace(); } } })); caButtons.addComponent(new Button("Get CRL", new Button.ClickListener() { private static final long serialVersionUID = 1L; @Override public void buttonClick(ClickEvent event) { try { downloadCrlList(provider.getLatestCrl(false)); } catch (CAProviderException pe) { logger.log(Level.SEVERE, "Could not retrieve CRL", pe); getWindow().showNotification("An error occurred while retrieving the CRL", Notification.TYPE_ERROR_MESSAGE); } } })); panel.addComponent(caInfo); panel.addComponent(caButtons); panel.setSizeFull(); setSizeFull(); setCompositionRoot(panel); }
From source file:org.dussan.vaadin.dcharts.test.DChartsTestUI.java
License:Apache License
@Override protected void init(VaadinRequest request) { VerticalLayout layout = new VerticalLayout(); layout.setSizeFull(); setContent(layout);/*from w w w . j av a 2 s . co m*/ Page.getCurrent().setTitle("dCharts Application"); DCharts charts1 = chartsDemo1(); DCharts charts2 = chartsDemo2(); DCharts charts3_1 = chartsDemo3_1(); DCharts charts3_2 = chartsDemo3_2(); DCharts charts4 = chartsDemo4(); DCharts charts5 = chartsDemo5(); DCharts charts6 = chartsDemo6(); DCharts charts7 = chartsDemo7(); DCharts charts8 = chartsDemo8(); HorizontalLayout layout3 = new HorizontalLayout(); layout3.addComponent(charts3_1); layout3.addComponent(charts3_2); TabSheet demoTabSheet = new TabSheet(); layout.addComponent(demoTabSheet); demoTabSheet.addTab(charts1, "Demo 1"); demoTabSheet.addTab(charts2, "Demo 2"); demoTabSheet.addTab(layout3, "Demo 3"); demoTabSheet.addTab(charts4, "Demo 4"); demoTabSheet.addTab(charts5, "Demo 5"); demoTabSheet.addTab(charts6, "Demo 6"); demoTabSheet.addTab(charts7, "Demo 7"); demoTabSheet.addTab(charts8, "Demo 8"); }
From source file:org.eclipse.emf.ecp.controls.vaadin.internal.AbstractVaadinList.java
License:Open Source License
@Override public VerticalLayout render() { setting = getVElement().getDomainModelReference().getIterator().next(); final VerticalLayout layout = new VerticalLayout(); layout.setSizeFull(); table = createTable();/*w ww . j a v a 2 s . c o m*/ createRemoveColumn(setting); toolbar = createToolbar(); renderList(layout); return layout; }
From source file:org.eclipse.hawkbit.ui.AbstractHawkbitUI.java
License:Open Source License
@Override protected void init(final VaadinRequest vaadinRequest) { LOG.info("ManagementUI init starts uiid - {}", getUI().getUIId()); if (pushStrategy != null) { pushStrategy.init(getUI());//from w ww. j a va 2 s. co m } addDetachListener(this); SpringContextHelper.setContext(context); Responsive.makeResponsive(this); addStyleName(ValoTheme.UI_WITH_MENU); setResponsive(Boolean.TRUE); final HorizontalLayout rootLayout = new HorizontalLayout(); rootLayout.setSizeFull(); HawkbitCommonUtil.initLocalization(this, uiProperties.getLocalization(), i18n); dashboardMenu.init(); dashboardMenu.setResponsive(true); final VerticalLayout contentVerticalLayout = new VerticalLayout(); contentVerticalLayout.setSizeFull(); contentVerticalLayout.setStyleName("main-content"); contentVerticalLayout.addComponent(buildHeader()); contentVerticalLayout.addComponent(buildViewTitle()); final Panel content = buildContent(); contentVerticalLayout.addComponent(content); contentVerticalLayout.setExpandRatio(content, 1); rootLayout.addComponent(dashboardMenu); rootLayout.addComponent(contentVerticalLayout); rootLayout.setExpandRatio(contentVerticalLayout, 1); setContent(rootLayout); final Navigator navigator = new Navigator(this, content); navigator.addViewChangeListener(new ViewChangeListener() { private static final long serialVersionUID = 1L; @Override public boolean beforeViewChange(final ViewChangeEvent event) { return true; } @Override public void afterViewChange(final ViewChangeEvent event) { final DashboardMenuItem view = dashboardMenu.getByViewName(event.getViewName()); dashboardMenu.postViewChange(new PostViewChangeEvent(view)); if (view == null) { viewTitle.setCaption(null); return; } viewTitle.setCaption(view.getDashboardCaptionLong()); notificationUnreadButton.setCurrentView(event.getNewView()); } }); navigator.setErrorView(errorview); navigator.addProvider(new ManagementViewProvider()); setNavigator(navigator); navigator.addView(EMPTY_VIEW, new Navigator.EmptyView()); if (UI.getCurrent().getErrorHandler() == null) { UI.getCurrent().setErrorHandler(new HawkbitUIErrorHandler()); } LOG.info("Current locale of the application is : {}", getLocale()); }
From source file:org.eclipse.hawkbit.ui.artifacts.upload.UploadDropAreaLayout.java
License:Open Source License
private VerticalLayout createDropAreaLayout() { final VerticalLayout dropAreaLayout = new VerticalLayout(); final Label dropHereLabel = new Label(i18n.getMessage(UIMessageIdProvider.LABEL_DROP_AREA_UPLOAD)); dropHereLabel.setWidth(null);//from w ww .ja va2 s. c om final Label dropIcon = new Label(FontAwesome.ARROW_DOWN.getHtml(), ContentMode.HTML); dropIcon.addStyleName("drop-icon"); dropIcon.setWidth(null); dropAreaLayout.addComponent(dropIcon); dropAreaLayout.setComponentAlignment(dropIcon, Alignment.TOP_CENTER); dropAreaLayout.addComponent(dropHereLabel); dropAreaLayout.setComponentAlignment(dropHereLabel, Alignment.TOP_CENTER); uploadButtonLayout.setWidth(null); uploadButtonLayout.addStyleName("upload-button"); dropAreaLayout.addComponent(uploadButtonLayout); dropAreaLayout.setComponentAlignment(uploadButtonLayout, Alignment.BOTTOM_CENTER); dropAreaLayout.setSizeFull(); dropAreaLayout.setStyleName("upload-drop-area-layout-info"); dropAreaLayout.setSpacing(false); return dropAreaLayout; }
From source file:org.eclipse.hawkbit.ui.artifacts.upload.UploadLayout.java
License:Open Source License
private static VerticalLayout createDropAreaLayout() { final VerticalLayout dropAreaLayout = new VerticalLayout(); final Label dropHereLabel = new Label("Drop files to upload"); dropHereLabel.setWidth(null);/*from www. j av a 2s . co m*/ final Label dropIcon = new Label(FontAwesome.ARROW_DOWN.getHtml(), ContentMode.HTML); dropIcon.addStyleName("drop-icon"); dropIcon.setWidth(null); dropAreaLayout.addComponent(dropIcon); dropAreaLayout.setComponentAlignment(dropIcon, Alignment.BOTTOM_CENTER); dropAreaLayout.addComponent(dropHereLabel); dropAreaLayout.setComponentAlignment(dropHereLabel, Alignment.TOP_CENTER); dropAreaLayout.setSizeFull(); dropAreaLayout.setStyleName("upload-drop-area-layout-info"); dropAreaLayout.setSpacing(false); return dropAreaLayout; }
From source file:org.eclipse.hawkbit.ui.common.AbstractMetadataPopupLayout.java
License:Open Source License
private void buildLayout() { final HorizontalLayout headerLayout = new HorizontalLayout(); headerLayout.addStyleName(SPUIStyleDefinitions.WIDGET_TITLE); headerLayout.setSpacing(false);/*w w w . j a va2 s. c o m*/ headerLayout.setMargin(false); headerLayout.setSizeFull(); headerLayout.addComponent(headerCaption); if (hasCreatePermission()) { headerLayout.addComponents(addIcon); headerLayout.setComponentAlignment(addIcon, Alignment.MIDDLE_RIGHT); } headerLayout.setExpandRatio(headerCaption, 1.0F); final HorizontalLayout headerWrapperLayout = new HorizontalLayout(); headerWrapperLayout .addStyleName("bordered-layout" + " " + "no-border-bottom" + " " + "metadata-table-margin"); headerWrapperLayout.addComponent(headerLayout); headerWrapperLayout.setWidth("100%"); headerLayout.setHeight("30px"); final VerticalLayout tableLayout = new VerticalLayout(); tableLayout.setSizeFull(); tableLayout.setHeight("100%"); tableLayout.addComponent(headerWrapperLayout); tableLayout.addComponent(metaDataGrid); tableLayout.addStyleName("table-layout"); tableLayout.setExpandRatio(metaDataGrid, 1.0F); final VerticalLayout metadataFieldsLayout = createMetadataFieldsLayout(); mainLayout = new HorizontalLayout(); mainLayout.addComponent(tableLayout); mainLayout.addComponent(metadataFieldsLayout); mainLayout.setExpandRatio(tableLayout, 0.5F); mainLayout.setExpandRatio(metadataFieldsLayout, 0.5F); mainLayout.setSizeFull(); mainLayout.setSpacing(true); setCompositionRoot(mainLayout); setSizeFull(); }
From source file:org.eclipse.hawkbit.ui.common.AbstractMetadataPopupLayout.java
License:Open Source License
protected VerticalLayout createMetadataFieldsLayout() { final VerticalLayout metadataFieldsLayout = new VerticalLayout(); metadataFieldsLayout.setSizeFull(); metadataFieldsLayout.setHeight("100%"); metadataFieldsLayout.addComponent(keyTextField); metadataFieldsLayout.addComponent(valueTextArea); metadataFieldsLayout.setSpacing(true); metadataFieldsLayout.setExpandRatio(valueTextArea, 1F); return metadataFieldsLayout; }
From source file:org.eclipse.hawkbit.ui.common.grid.AbstractGridComponentLayout.java
License:Open Source License
/** * Layouts header, grid and optional footer. *///w w w .java2 s.c o m protected void buildLayout() { setSizeFull(); setSpacing(true); setMargin(false); setStyleName("group"); final VerticalLayout gridHeaderLayout = new VerticalLayout(); gridHeaderLayout.setSizeFull(); gridHeaderLayout.setSpacing(false); gridHeaderLayout.setMargin(false); gridHeaderLayout.setStyleName("table-layout"); gridHeaderLayout.addComponent(gridHeader); gridHeaderLayout.setComponentAlignment(gridHeader, Alignment.TOP_CENTER); gridHeaderLayout.addComponent(grid); gridHeaderLayout.setComponentAlignment(grid, Alignment.TOP_CENTER); gridHeaderLayout.setExpandRatio(grid, 1.0F); addComponent(gridHeaderLayout); setComponentAlignment(gridHeaderLayout, Alignment.TOP_CENTER); setExpandRatio(gridHeaderLayout, 1.0F); if (hasFooterSupport()) { final Layout footerLayout = getFooterSupport().createFooterMessageComponent(); addComponent(footerLayout); setComponentAlignment(footerLayout, Alignment.BOTTOM_CENTER); } }
From source file:org.eclipse.hawkbit.ui.common.grid.AbstractGridLayout.java
License:Open Source License
private void buildLayout() { setSizeFull();/*from w ww . java2 s .co m*/ setSpacing(true); setMargin(false); setStyleName("group"); final VerticalLayout tableHeaderLayout = new VerticalLayout(); tableHeaderLayout.setSizeFull(); tableHeaderLayout.setSpacing(false); tableHeaderLayout.setMargin(false); tableHeaderLayout.setStyleName("table-layout"); tableHeaderLayout.addComponent(tableHeader); tableHeaderLayout.setComponentAlignment(tableHeader, Alignment.TOP_CENTER); tableHeaderLayout.addComponent(grid); tableHeaderLayout.setComponentAlignment(grid, Alignment.TOP_CENTER); tableHeaderLayout.setExpandRatio(grid, 1.0f); addComponent(tableHeaderLayout); setComponentAlignment(tableHeaderLayout, Alignment.TOP_CENTER); setExpandRatio(tableHeaderLayout, 1.0f); if (hasCountMessage()) { final HorizontalLayout rolloutGroupTargetsCountLayout = createCountMessageComponent(); addComponent(rolloutGroupTargetsCountLayout); setComponentAlignment(rolloutGroupTargetsCountLayout, Alignment.BOTTOM_CENTER); } }