List of usage examples for com.vaadin.ui Alignment TOP_CENTER
Alignment TOP_CENTER
To view the source code for com.vaadin.ui Alignment TOP_CENTER.
Click Source Link
From source file:org.eclipse.hawkbit.ui.artifacts.upload.UploadResultWindow.java
License:Open Source License
private void createLayout() { final HorizontalLayout footer = new HorizontalLayout(); footer.setSizeUndefined();/* w w w . j av a 2s.c om*/ footer.addStyleName("confirmation-window-footer"); footer.setSpacing(true); footer.setMargin(false); footer.addComponents(closeBtn); footer.setComponentAlignment(closeBtn, Alignment.TOP_CENTER); final VerticalLayout uploadResultDetails = new VerticalLayout(); uploadResultDetails.setWidth(SPUIDefinitions.MIN_UPLOAD_CONFIRMATION_POPUP_WIDTH + "px"); uploadResultDetails.addStyleName("confirmation-popup"); uploadResultDetails.addComponent(uploadResultTable); uploadResultDetails.setComponentAlignment(uploadResultTable, Alignment.MIDDLE_CENTER); uploadResultDetails.addComponent(footer); uploadResultDetails.setComponentAlignment(footer, Alignment.MIDDLE_CENTER); uploadResultsWindow = new Window(); uploadResultsWindow.setContent(uploadResultDetails); uploadResultsWindow.setResizable(Boolean.FALSE); uploadResultsWindow.setClosable(Boolean.FALSE); uploadResultsWindow.setDraggable(Boolean.TRUE); uploadResultsWindow.setModal(true); uploadResultsWindow.setCaption(SPUILabelDefinitions.UPLOAD_RESULT); uploadResultsWindow.addStyleName(SPUIStyleDefinitions.CONFIRMATION_WINDOW_CAPTION); }
From source file:org.eclipse.hawkbit.ui.artifacts.UploadArtifactView.java
License:Open Source License
private VerticalLayout createDetailsAndUploadLayout() { detailAndUploadLayout = new VerticalLayout(); detailAndUploadLayout.addComponent(artifactDetailsLayout); detailAndUploadLayout.setComponentAlignment(artifactDetailsLayout, Alignment.TOP_CENTER); detailAndUploadLayout.setExpandRatio(artifactDetailsLayout, 1.0F); if (permChecker.hasCreateRepositoryPermission()) { detailAndUploadLayout.addComponent(dropAreaLayout.getDropAreaWrapper()); }/* w w w . j ava 2 s . c om*/ detailAndUploadLayout.setSizeFull(); detailAndUploadLayout.addStyleName("group"); detailAndUploadLayout.setSpacing(true); return detailAndUploadLayout; }
From source file:org.eclipse.hawkbit.ui.common.CommonDialogWindow.java
License:Open Source License
private final void init() { if (content instanceof AbstractOrderedLayout) { ((AbstractOrderedLayout) content).setSpacing(true); ((AbstractOrderedLayout) content).setMargin(true); }/*ww w . j ava 2s .c om*/ if (content instanceof GridLayout) { addStyleName("marginTop"); } if (content != null) { mainLayout.addComponent(content); mainLayout.setExpandRatio(content, 1.0F); } createMandatoryLabel(); final HorizontalLayout buttonLayout = createActionButtonsLayout(); mainLayout.addComponent(buttonLayout); mainLayout.setComponentAlignment(buttonLayout, Alignment.TOP_CENTER); setCaption(caption); setCaptionAsHtml(true); setContent(mainLayout); setResizable(false); center(); setModal(true); addStyleName("fontsize"); setOrginaleValues(); addComponentListeners(); }
From source file:org.eclipse.hawkbit.ui.common.ConfirmationDialog.java
License:Open Source License
private HorizontalLayout createButtonLayout(final Button cancelButton) { final HorizontalLayout hButtonLayout = new HorizontalLayout(); hButtonLayout.setSpacing(true);// ww w.jav a2 s . c o m hButtonLayout.addComponent(okButton); hButtonLayout.addComponent(cancelButton); hButtonLayout.setSizeUndefined(); hButtonLayout.setComponentAlignment(okButton, Alignment.TOP_CENTER); hButtonLayout.setComponentAlignment(cancelButton, Alignment.TOP_CENTER); return hButtonLayout; }
From source file:org.eclipse.hawkbit.ui.common.detailslayout.AbstractTableDetailsLayout.java
License:Open Source License
protected void buildLayout() { nameEditLayout = new HorizontalLayout(); nameEditLayout.setWidth(100.0F, Unit.PERCENTAGE); nameEditLayout.addComponent(caption); nameEditLayout.setComponentAlignment(caption, Alignment.TOP_LEFT); if (hasEditPermission()) { nameEditLayout.addComponent(editButton); nameEditLayout.setComponentAlignment(editButton, Alignment.TOP_RIGHT); nameEditLayout.addComponent(manageMetadataBtn); nameEditLayout.setComponentAlignment(manageMetadataBtn, Alignment.TOP_RIGHT); }/*from w w w . jav a 2 s .c o m*/ nameEditLayout.setExpandRatio(caption, 1.0F); nameEditLayout.addStyleName(SPUIStyleDefinitions.WIDGET_TITLE); addComponent(nameEditLayout); setComponentAlignment(nameEditLayout, Alignment.TOP_CENTER); addComponent(detailsTab); setComponentAlignment(nameEditLayout, Alignment.TOP_CENTER); setSizeFull(); setHeightUndefined(); addStyleName(SPUIStyleDefinitions.WIDGET_STYLE); }
From source file:org.eclipse.hawkbit.ui.common.filterlayout.AbstractFilterLayout.java
License:Open Source License
private void buildLayout() { setWidth(SPUIDefinitions.FILTER_BY_TYPE_WIDTH, Unit.PIXELS); setStyleName("filter-btns-main-layout"); setHeight(100.0F, Unit.PERCENTAGE);/* w ww .j av a 2 s.com*/ setSpacing(false); setMargin(false); addComponents(filterHeader, filterButtons); setComponentAlignment(filterHeader, Alignment.TOP_CENTER); setComponentAlignment(filterButtons, Alignment.TOP_CENTER); setExpandRatio(filterButtons, 1.0F); }
From source file:org.eclipse.hawkbit.ui.common.grid.AbstractGridComponentLayout.java
License:Open Source License
/** * Layouts header, grid and optional footer. *///from w w w . j a va2 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();// w ww . j a v a 2 s .c o 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); } }
From source file:org.eclipse.hawkbit.ui.common.table.AbstractTableHeader.java
License:Open Source License
private void buildLayout() { final HorizontalLayout titleFilterIconsLayout = createHeaderFilterIconLayout(); titleFilterIconsLayout.addComponents(headerCaption, searchField, searchResetIcon, showFilterButtonLayout); titleFilterIconsLayout.setComponentAlignment(headerCaption, Alignment.TOP_LEFT); titleFilterIconsLayout.setComponentAlignment(searchField, Alignment.TOP_RIGHT); titleFilterIconsLayout.setComponentAlignment(searchResetIcon, Alignment.TOP_RIGHT); titleFilterIconsLayout.setComponentAlignment(showFilterButtonLayout, Alignment.TOP_RIGHT); if (hasCreatePermission() && isAddNewItemAllowed()) { titleFilterIconsLayout.addComponent(addIcon); titleFilterIconsLayout.setComponentAlignment(addIcon, Alignment.TOP_RIGHT); }//from w w w . j a v a 2 s . co m if (hasCreatePermission() && isBulkUploadAllowed()) { titleFilterIconsLayout.addComponent(bulkUploadIcon); titleFilterIconsLayout.setComponentAlignment(bulkUploadIcon, Alignment.TOP_RIGHT); } titleFilterIconsLayout.addComponent(maxMinIcon); titleFilterIconsLayout.setComponentAlignment(maxMinIcon, Alignment.TOP_RIGHT); titleFilterIconsLayout.setExpandRatio(headerCaption, 0.4F); titleFilterIconsLayout.setExpandRatio(searchField, 0.6F); addComponent(titleFilterIconsLayout); final HorizontalLayout dropHintDropFilterLayout = new HorizontalLayout(); dropHintDropFilterLayout.addStyleName("filter-drop-hint-layout"); dropHintDropFilterLayout.setWidth(100, Unit.PERCENTAGE); if (isDropFilterRequired()) { filterDroppedInfo = new HorizontalLayout(); filterDroppedInfo.setImmediate(true); filterDroppedInfo.setStyleName("target-dist-filter-info"); filterDroppedInfo.setHeightUndefined(); filterDroppedInfo.setSizeUndefined(); displayFilterDropedInfoOnLoad(); final DragAndDropWrapper dropFilterLayout = new DragAndDropWrapper(filterDroppedInfo); dropFilterLayout.setId(getDropFilterId()); dropFilterLayout.setDropHandler(getDropFilterHandler()); dropHintDropFilterLayout.addComponent(dropFilterLayout); dropHintDropFilterLayout.setComponentAlignment(dropFilterLayout, Alignment.TOP_CENTER); dropHintDropFilterLayout.setExpandRatio(dropFilterLayout, 1.0F); } addComponent(dropHintDropFilterLayout); setComponentAlignment(dropHintDropFilterLayout, Alignment.TOP_CENTER); addStyleName("bordered-layout"); addStyleName("no-border-bottom"); }
From source file:org.eclipse.hawkbit.ui.common.table.AbstractTableLayout.java
License:Open Source License
private void buildLayout() { setSizeFull();//from ww w.j ava2s .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); if (isShortCutKeysRequired()) { final Panel tablePanel = new Panel(); tablePanel.setStyleName("table-panel"); tablePanel.setHeight(100.0F, Unit.PERCENTAGE); tablePanel.setContent(table); tablePanel.addActionHandler(getShortCutKeysHandler(i18n)); tablePanel.addStyleName(ValoTheme.PANEL_BORDERLESS); tableHeaderLayout.addComponent(tablePanel); tableHeaderLayout.setComponentAlignment(tablePanel, Alignment.TOP_CENTER); tableHeaderLayout.setExpandRatio(tablePanel, 1.0F); } else { tableHeaderLayout.addComponent(table); tableHeaderLayout.setComponentAlignment(table, Alignment.TOP_CENTER); tableHeaderLayout.setExpandRatio(table, 1.0F); } addComponent(tableHeaderLayout); addComponent(detailsLayout); setComponentAlignment(tableHeaderLayout, Alignment.TOP_CENTER); setComponentAlignment(detailsLayout, Alignment.TOP_CENTER); setExpandRatio(tableHeaderLayout, 1.0F); }