buttons.setWidth("100%"); buttons.setHeight("30px"); buttons.setComponentAlignment(ok, Alignment.MIDDLE_CENTER); buttons.setComponentAlignment(cancel, Alignment.MIDDLE_CENTER); layout.addComponent(buttons); setRgbSliderValues(selectedColor);
private void addHelpLink() { if (StringUtils.isEmpty(helpLink)) { return; } final Link helpLinkComponent = SPUIComponentProvider.getHelpLink(i18n, helpLink); buttonsLayout.addComponent(helpLinkComponent); buttonsLayout.setComponentAlignment(helpLinkComponent, Alignment.MIDDLE_RIGHT); }
private void addHelpLink() { if (StringUtils.isEmpty(helpLink)) { return; } final Link helpLinkComponent = SPUIComponentProvider.getHelpLink(helpLink); buttonsLayout.addComponent(helpLinkComponent); buttonsLayout.setComponentAlignment(helpLinkComponent, Alignment.MIDDLE_RIGHT); }
private HorizontalLayout createButtonLayout(final Button cancelButton) { final HorizontalLayout hButtonLayout = new HorizontalLayout(); hButtonLayout.setSpacing(true); hButtonLayout.addComponent(okButton); hButtonLayout.addComponent(cancelButton); hButtonLayout.setSizeUndefined(); hButtonLayout.setComponentAlignment(okButton, Alignment.TOP_CENTER); hButtonLayout.setComponentAlignment(cancelButton, Alignment.TOP_CENTER); return hButtonLayout; }
private HorizontalLayout createButtonLayout(final Button cancelButton) { final HorizontalLayout hButtonLayout = new HorizontalLayout(); hButtonLayout.setSpacing(true); hButtonLayout.addComponent(okButton); hButtonLayout.addComponent(cancelButton); hButtonLayout.setSizeUndefined(); hButtonLayout.setComponentAlignment(okButton, Alignment.TOP_CENTER); hButtonLayout.setComponentAlignment(cancelButton, Alignment.TOP_CENTER); return hButtonLayout; }
public void setFooter(HorizontalLayout layout) { HorizontalLayout l = new HorizontalLayout(); l.addComponent(layout); l.setComponentAlignment(layout, Alignment.MIDDLE_CENTER); super.setFooter(l); }
@Override protected void buildLayout() { super.buildLayout(); getNameEditLayout().addComponent(artifactDetailsButton); getNameEditLayout().setComponentAlignment(artifactDetailsButton, Alignment.TOP_RIGHT); }
protected void initCountComponent() { countButton = new Button(count + ""); countButton.addStyleName(Reindeer.BUTTON_LINK); countButton.addStyleName(ExplorerLayout.STYLE_TOOLBAR_COUNT); // Initially hidden countButton.setVisible(false); layout.addComponent(countButton); layout.setComponentAlignment(countButton, Alignment.MIDDLE_LEFT); }
private Layout createFooter() { HorizontalLayout footer = new HorizontalLayout(); footer.setSpacing(true); footer.setMargin(true); footer.setWidth(100, Unit.PERCENTAGE); footer.addComponent(okayButton); footer.setComponentAlignment(okayButton, Alignment.BOTTOM_RIGHT); return footer; }
private Layout createFooter() { HorizontalLayout footer = new HorizontalLayout(); footer.setSpacing(true); footer.setMargin(true); footer.setWidth(100, Unit.PERCENTAGE); footer.addComponent(okayButton); footer.setComponentAlignment(okayButton, Alignment.BOTTOM_RIGHT); return footer; }
@Override protected Layout wrapFields() { VerticalLayout vl = new VerticalLayout(); vl.addComponent(dateField); HorizontalLayout hl = new HorizontalLayout(); hl.addComponent(timeField); hl.setComponentAlignment(timeField, Alignment.MIDDLE_CENTER); vl.addComponent(hl); return vl; }
public static HorizontalLayout horizontalLayout(com.vaadin.ui.Component c1, com.vaadin.ui.Component c2) { HorizontalLayout hl = new HorizontalLayout(); hl.setWidth(100, Sizeable.UNITS_PERCENTAGE); hl.setSpacing(true); hl.addComponent(c1); hl.addComponent(c2); hl.setComponentAlignment(c2, Alignment.TOP_RIGHT); hl.setExpandRatio(c1, 1.0f); return hl; }
protected void initButtons(I18nManager i18nManager) { HorizontalLayout buttonLayout = new HorizontalLayout(); buttonLayout.setSpacing(true); buttonLayout.setWidth(100, UNITS_PERCENTAGE); addComponent(buttonLayout); deployButton = new Button(i18nManager.getMessage(Messages.MODEL_DEPLOY_BUTTON_DEPLOY)); buttonLayout.addComponent(deployButton); buttonLayout.setComponentAlignment(deployButton, Alignment.BOTTOM_CENTER); }
@Override protected HorizontalLayout initContent() { this.layout.setMargin(false); this.layout.setSpacing(true); this.layout.addComponent(this.refLabel); this.layout.addComponent(new Label("\u00a0\u00a0")); this.layout.addComponent(this.changeButton); this.layout.setComponentAlignment(this.changeButton, Alignment.MIDDLE_LEFT); this.updateDisplay(); return this.layout; }
public HorizontalLayout createControls(String itemsPerPageCaption, String pageCaption) { HorizontalLayout pageSize = createPageSizeControls(itemsPerPageCaption); HorizontalLayout pageManagement = createPageManagementControls(pageCaption); HorizontalLayout controlBar = new HorizontalLayout(); controlBar.addComponent(pageSize); controlBar.addComponent(pageManagement); controlBar.setComponentAlignment(pageManagement, Alignment.MIDDLE_CENTER); controlBar.setWidth("100%"); controlBar.setExpandRatio(pageSize, 1); return controlBar; }
@Override protected HorizontalLayout initContent() { this.layout.setMargin(false); this.layout.setSpacing(true); this.layout.addComponent(this.refLabel); this.layout.addComponent(new Label("\u00a0\u00a0")); this.layout.addComponent(this.changeButton); this.layout.setComponentAlignment(this.changeButton, Alignment.MIDDLE_LEFT); this.updateDisplay(); return this.layout; }
protected void initClaimButton(HorizontalLayout layout) { if(!isCurrentUserAssignee() && canUserClaimTask()) { claimButton = new Button(i18nManager.getMessage(Messages.TASK_CLAIM)); claimButton.addListener(new ClaimTaskClickListener(task.getId(), taskService)); layout.addComponent(claimButton); layout.setComponentAlignment(claimButton, Alignment.MIDDLE_LEFT); } }
protected void initSortMenu() { MenuBar menuBar = new MenuBar(); menuBar.addStyleName(ExplorerLayout.STYLE_SEARCHBOX_SORTMENU); //TODO: Adding types of sorting manually and listener/events MenuItem rootItem = menuBar.addItem("Sort by", null); rootItem.addItem("Id", null); rootItem.addItem("Name", null); rootItem.addItem("Due date", null); rootItem.addItem("Creation date", null); layout.addComponent(menuBar); layout.setComponentAlignment(menuBar, Alignment.MIDDLE_RIGHT); }
private HorizontalLayout buildViewTitle() { final HorizontalLayout viewHeadercontent = new HorizontalLayout(); viewHeadercontent.setWidth("100%"); viewHeadercontent.addStyleName("view-header-layout"); viewTitle = new Label(); viewTitle.setWidth("100%"); viewTitle.setStyleName("header-content"); viewHeadercontent.addComponent(viewTitle); viewHeadercontent.addComponent(notificationUnreadButton); viewHeadercontent.setComponentAlignment(notificationUnreadButton, Alignment.MIDDLE_RIGHT); return viewHeadercontent; }
private HorizontalLayout buildViewTitle() { final HorizontalLayout viewHeadercontent = new HorizontalLayout(); viewHeadercontent.setWidth("100%"); viewHeadercontent.addStyleName("view-header-layout"); viewTitle = new Label(); viewTitle.setWidth("100%"); viewTitle.setStyleName("header-content"); viewHeadercontent.addComponent(viewTitle); viewHeadercontent.addComponent(notificationUnreadButton); viewHeadercontent.setComponentAlignment(notificationUnreadButton, Alignment.MIDDLE_RIGHT); return viewHeadercontent; }