List of usage examples for com.vaadin.ui Alignment TOP_RIGHT
Alignment TOP_RIGHT
To view the source code for com.vaadin.ui Alignment TOP_RIGHT.
Click Source Link
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 ww w. j a v a2s . 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.AbstractFilterHeader.java
License:Open Source License
private void buildLayout() { setStyleName("filter-btns-header-layout"); typeHeaderLayout = new HorizontalLayout(); typeHeaderLayout.setHeight(32, Unit.PIXELS); typeHeaderLayout.setWidth(100.0F, Unit.PERCENTAGE); typeHeaderLayout.addComponentAsFirst(title); typeHeaderLayout.addStyleName(SPUIStyleDefinitions.WIDGET_TITLE); typeHeaderLayout.setComponentAlignment(title, Alignment.TOP_LEFT); if (menu != null) { typeHeaderLayout.addComponent(menu); typeHeaderLayout.setComponentAlignment(menu, Alignment.TOP_RIGHT); }//from w w w . jav a 2s . co m typeHeaderLayout.addComponent(hideIcon); typeHeaderLayout.setComponentAlignment(hideIcon, Alignment.TOP_RIGHT); typeHeaderLayout.setExpandRatio(title, 1.0F); addComponent(typeHeaderLayout); }
From source file:org.eclipse.hawkbit.ui.common.grid.AbstractGridHeader.java
License:Open Source License
private void buildLayout() { final HorizontalLayout titleFilterIconsLayout = createHeaderFilterIconLayout(); titleFilterIconsLayout.addComponents(headerCaptionLayout); if (isAllowSearch() && isRollout()) { titleFilterIconsLayout.addComponents(searchField, searchResetIcon); titleFilterIconsLayout.setExpandRatio(headerCaptionLayout, 0.3F); titleFilterIconsLayout.setExpandRatio(searchField, 0.7F); }//from ww w.j a v a 2s . co m if (hasCreatePermission() && isRollout()) { titleFilterIconsLayout.addComponent(addButton); titleFilterIconsLayout.setComponentAlignment(addButton, Alignment.TOP_LEFT); } if (showCloseButton()) { titleFilterIconsLayout.addComponent(closeButton); titleFilterIconsLayout.setComponentAlignment(closeButton, Alignment.TOP_RIGHT); } titleFilterIconsLayout.setHeight("40px"); addComponent(titleFilterIconsLayout); addStyleName("bordered-layout"); addStyleName("no-border-bottom"); }
From source file:org.eclipse.hawkbit.ui.common.grid.DefaultGridHeader.java
License:Open Source License
/** * Builds the title layout./*ww w. j a v a 2 s .c o m*/ * * @return title-layout */ protected HorizontalLayout buildTitleLayout() { titleLayout = new HorizontalLayout(); titleLayout.addStyleName(SPUIStyleDefinitions.WIDGET_TITLE); titleLayout.setSpacing(false); titleLayout.setMargin(false); titleLayout.setSizeFull(); titleLayout.addComponent(title); titleLayout.setComponentAlignment(title, Alignment.TOP_LEFT); titleLayout.setExpandRatio(title, 0.8F); if (hasHeaderMaximizeSupport()) { titleLayout.addComponents(getHeaderMaximizeSupport().maxMinButton); titleLayout.setComponentAlignment(getHeaderMaximizeSupport().maxMinButton, Alignment.TOP_RIGHT); titleLayout.setExpandRatio(getHeaderMaximizeSupport().maxMinButton, 0.2F); } return titleLayout; }
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 ww .j a v a 2s .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.distributions.smtable.SwModuleDetails.java
License:Open Source License
@Override protected void buildLayout() { super.buildLayout(); getNameEditLayout().addComponent(artifactDetailsButton); getNameEditLayout().setComponentAlignment(artifactDetailsButton, Alignment.TOP_RIGHT); }
From source file:org.eclipse.hawkbit.ui.filtermanagement.CreateOrUpdateFilterHeader.java
License:Open Source License
private void buildLayout() { captionLayout = new HorizontalLayout(); captionLayout.setDescription(i18n.getMessage("tooltip.click.to.edit")); captionLayout.setId(UIComponentIdProvider.TARGET_FILTER_QUERY_NAME_LAYOUT_ID); titleFilterIconsLayout = new HorizontalLayout(); titleFilterIconsLayout.addComponents(headerCaption, captionLayout); titleFilterIconsLayout.setSpacing(true); final HorizontalLayout breadcrumbLayout = new HorizontalLayout(); breadcrumbLayout.addComponent(breadcrumbButton); breadcrumbLayout.addComponent(new Label(">")); breadcrumbName = new LabelBuilder().buildCaptionLabel(); breadcrumbLayout.addComponent(breadcrumbName); breadcrumbName.addStyleName("breadcrumbPaddingLeft"); final HorizontalLayout titleFilterLayout = new HorizontalLayout(); titleFilterLayout.setSizeFull();//w ww.j a v a 2 s. co m titleFilterLayout.addComponents(titleFilterIconsLayout, closeIcon); titleFilterLayout.setExpandRatio(titleFilterIconsLayout, 1.0F); titleFilterLayout.setComponentAlignment(titleFilterIconsLayout, Alignment.TOP_LEFT); titleFilterLayout.setComponentAlignment(closeIcon, Alignment.TOP_RIGHT); final HorizontalLayout iconLayout = new HorizontalLayout(); iconLayout.setSizeUndefined(); iconLayout.setSpacing(false); iconLayout.addComponents(helpLink, searchIcon, saveButton); final HorizontalLayout queryLayout = new HorizontalLayout(); queryLayout.setSizeUndefined(); queryLayout.setSpacing(true); queryLayout.addComponents(queryTextField, iconLayout); addComponent(breadcrumbLayout); addComponent(titleFilterLayout); addComponent(queryLayout); setSpacing(true); addStyleName(SPUIStyleDefinitions.WIDGET_TITLE); addStyleName("bordered-layout"); }
From source file:org.eclipse.hawkbit.ui.management.actionhistory.ActionHistoryHeader.java
License:Open Source License
private void buildLayout() { final HorizontalLayout titleMaxIconsLayout = new HorizontalLayout(); titleMaxIconsLayout.addStyleName(SPUIStyleDefinitions.WIDGET_TITLE); titleMaxIconsLayout.setSpacing(false); titleMaxIconsLayout.setMargin(false); titleMaxIconsLayout.setSizeFull();/*from w w w .j a va 2 s.c o m*/ titleMaxIconsLayout.addComponents(titleOfActionHistory, maxMinButton); titleMaxIconsLayout.setComponentAlignment(titleOfActionHistory, Alignment.TOP_LEFT); titleMaxIconsLayout.setComponentAlignment(maxMinButton, Alignment.TOP_RIGHT); titleMaxIconsLayout.setExpandRatio(titleOfActionHistory, 0.8f); titleMaxIconsLayout.setExpandRatio(maxMinButton, 0.2f); // Note: here the only purpose of adding drop hints to the layout is to // maintain consistent // height for all widgets headers. addComponent(titleMaxIconsLayout); setComponentAlignment(titleMaxIconsLayout, Alignment.TOP_LEFT); setWidth(100, Unit.PERCENTAGE); setImmediate(true); addStyleName("action-history-header"); addStyleName("bordered-layout"); addStyleName("no-border-bottom"); }
From source file:org.eclipse.hawkbit.ui.management.targettag.filter.MultipleTargetFilter.java
License:Open Source License
private Component getSimpleFilterTab() { simpleFilterTab = new VerticalLayout(); targetTagTableLayout = new VerticalLayout(); targetTagTableLayout.setSizeFull();//from ww w .jav a 2 s . c o m if (menu != null) { targetTagTableLayout.addComponent(menu); targetTagTableLayout.setComponentAlignment(menu, Alignment.TOP_RIGHT); } targetTagTableLayout.addComponent(filterByButtons); targetTagTableLayout.setComponentAlignment(filterByButtons, Alignment.MIDDLE_CENTER); targetTagTableLayout.setId(UIComponentIdProvider.TARGET_TAG_DROP_AREA_ID); targetTagTableLayout.setExpandRatio(filterByButtons, 1.0F); simpleFilterTab.setCaption(i18n.getMessage("caption.filter.simple")); simpleFilterTab.addComponent(targetTagTableLayout); simpleFilterTab.setExpandRatio(targetTagTableLayout, 1.0F); simpleFilterTab.addComponent(filterByStatusFooter); simpleFilterTab.setComponentAlignment(filterByStatusFooter, Alignment.MIDDLE_CENTER); simpleFilterTab.setSizeFull(); simpleFilterTab.addStyleName(SPUIStyleDefinitions.SIMPLE_FILTER_HEADER); return simpleFilterTab; }
From source file:org.eclipse.hawkbit.ui.management.targettag.filter.MultipleTargetFilter.java
License:Open Source License
protected void removeMenuBarAndAddCancelButton() { targetTagTableLayout.removeComponent(menu); targetTagTableLayout.addComponent(createCancelButtonForUpdateOrDeleteTag(), 0); targetTagTableLayout.setComponentAlignment(cancelTagButton, Alignment.TOP_RIGHT); }