List of usage examples for com.vaadin.ui Alignment MIDDLE_LEFT
Alignment MIDDLE_LEFT
To view the source code for com.vaadin.ui Alignment MIDDLE_LEFT.
Click Source Link
From source file:com.hybridbpm.ui.component.dashboard.panel.DashboardPanel.java
License:Apache License
public DashboardPanel(DashboardTab panelView, PanelDefinition pd) { this.dashboardTab = panelView; this.panelDefinition = pd; toolbar = new HorizontalLayout(); toolbar.setMargin(new MarginInfo(false, false, false, true)); toolbar.setWidth(99, Unit.PERCENTAGE); toolbar.setStyleName(HybridbpmStyle.LAYOUT_PADDING8); caption.addStyleName(ValoTheme.LABEL_H4); caption.addStyleName(ValoTheme.LABEL_COLORED); caption.addStyleName(ValoTheme.LABEL_NO_MARGIN); toolbar.removeAllComponents();//from w w w .java2s .co m toolbar.addComponents(caption, new PanelMenuBar(this)); toolbar.setExpandRatio(caption, 1); toolbar.setComponentAlignment(caption, Alignment.MIDDLE_LEFT); setSizeFull(); setStyleName(ValoTheme.LAYOUT_CARD); addStyleName("dashboard-panel"); configureModule(); }
From source file:com.invient.vaadin.InvientChartsDemoWin.java
License:Apache License
private void registerSVGAndPrintEvent(final InvientCharts chart) { GridLayout gridLayout = new GridLayout(2, 1); gridLayout.setWidth("100%"); gridLayout.setSpacing(true);// ww w.j a v a 2 s . c om Button svgBtn; gridLayout.addComponent(svgBtn = new Button("Get SVG")); gridLayout.setComponentAlignment(svgBtn, Alignment.MIDDLE_RIGHT); Button printBtn; gridLayout.addComponent(printBtn = new Button("Print")); gridLayout.setComponentAlignment(printBtn, Alignment.MIDDLE_LEFT); rightLayout.addComponent(gridLayout); svgBtn.addListener(new Button.ClickListener() { @Override public void buttonClick(ClickEvent event) { chart.addListener(new InvientCharts.ChartSVGAvailableListener() { @Override public void svgAvailable(ChartSVGAvailableEvent chartSVGAvailableEvent) { logEventInfo("[svgAvailable]" + " svg -> " + chartSVGAvailableEvent.getSVG()); } }); } }); printBtn.addListener(new Button.ClickListener() { @Override public void buttonClick(ClickEvent event) { chart.print(); } }); }
From source file:com.jain.addon.component.upload.JImage.java
License:Apache License
public void createImage() { if (image != null) layout.removeComponent(image);//from ww w.ja va2s. c o m image = new Embedded(); image.setWidth("100%"); layout.addComponent(image, 0); layout.setComponentAlignment(image, Alignment.MIDDLE_LEFT); }
From source file:com.jain.common.header.Header.java
License:Apache License
private void addHeaderMenu() { HorizontalLayout layout = new HorizontalLayout(); layout.setStyleName(ApplicationTheme.HEADER_SEGMENT); int i = 0;/*from w w w. j av a2s . c o m*/ Button button = null; for (JHeaderItem item : JHeaderItem.values()) { button = new Button(item.getDisplayName(), this); layout.addComponent(button); if (i == 0) { current = button; current.setStyleName(ApplicationTheme.FIRST); current.addStyleName(ApplicationTheme.SELECTED); i++; } } button.setStyleName(ApplicationTheme.LAST); addComponent(layout); setComponentAlignment(layout, Alignment.MIDDLE_LEFT); setExpandRatio(layout, 1); }
From source file:com.javalego.ui.vaadin.component.util.MessageBox.java
License:Apache License
/** * Constructor/*from w w w . java2s .c o m*/ * * @param text * @param question * @param message * @param buttonYes * @param buttonNo */ public MessageBox(String text, Icon question, String message, ButtonConfig buttonYes, ButtonConfig buttonNo) { this(text, question, new Label(message, ContentMode.HTML), Alignment.MIDDLE_LEFT, buttonYes, buttonNo); }
From source file:com.jiangyifen.ec2.ui.mgr.system.tabsheet.DynQueueMemberManagement.java
/** * ?(???)/*from w ww . ja v a 2 s .c o m*/ */ private void createBottomComponents() { HorizontalLayout bottomHLayout = new HorizontalLayout(); bottomHLayout.setSpacing(true); bottomHLayout.setWidth("100%"); this.addComponent(bottomHLayout); // HorizontalLayout bottomLeft = new HorizontalLayout(); bottomLeft.setSpacing(true); bottomLeft.setWidth("-1px"); bottomHLayout.addComponent(bottomLeft); bottomHLayout.setComponentAlignment(bottomLeft, Alignment.MIDDLE_LEFT); // ? save = new Button("? ", this); save.setStyleName("default"); bottomLeft.addComponent(save); bottomLeft.setComponentAlignment(save, Alignment.MIDDLE_LEFT); // ? cancel = new Button("? ", this); bottomLeft.addComponent(cancel); bottomLeft.setComponentAlignment(cancel, Alignment.MIDDLE_LEFT); // ? HorizontalLayout bottomRight = new HorizontalLayout(); bottomRight.setSpacing(true); bottomRight.setWidth("-1px"); bottomHLayout.addComponent(bottomRight); bottomHLayout.setComponentAlignment(bottomRight, Alignment.MIDDLE_RIGHT); Label priorityCaption = new Label("<B>?</B>", Label.CONTENT_XHTML); priorityCaption.setWidth("-1px"); bottomRight.addComponent(priorityCaption); bottomRight.setComponentAlignment(priorityCaption, Alignment.MIDDLE_RIGHT); priorityField = new TextField(); priorityField.addListener(this); priorityField.setWidth("100px"); priorityField.setImmediate(true); priorityField.setWriteThrough(false); bottomRight.addComponent(priorityField); bottomRight.setComponentAlignment(priorityField, Alignment.MIDDLE_RIGHT); // ????? setButtonsEnable(false); }
From source file:com.jiangyifen.ec2.ui.mgr.system.tabsheet.SystemLicence.java
public SystemLicence() { this.setMargin(true); this.setSizeUndefined(); licence_glo = new GridLayout(3, 5); licence_glo.setMargin(true);//from www.ja v a 2 s . co m licence_glo.setSpacing(true); licence_glo.setSizeUndefined(); this.addComponent(licence_glo); int row_index = 0; int column_index = 0; // Label key_lb = new Label("<b>?</b>", Label.CONTENT_XHTML); key_lb.setWidth("-1px"); licence_glo.addComponent(key_lb, (column_index++), row_index); licence_glo.setComponentAlignment(key_lb, Alignment.MIDDLE_LEFT); Label value_lb = new Label("<font color='blue'>?</font>", Label.CONTENT_XHTML); value_lb.setWidth("-1px"); licence_glo.addComponent(value_lb, (column_index++), row_index); licence_glo.setComponentAlignment(value_lb, Alignment.MIDDLE_LEFT); Label description_lb = new Label("<font color='" + DESCRIPTION_COL_COLOR + "'>??</font>", Label.CONTENT_XHTML); description_lb.setWidth("-1px"); licence_glo.addComponent(description_lb, (column_index++), row_index); licence_glo.setComponentAlignment(description_lb, Alignment.MIDDLE_LEFT); // grid ??? row_index++; column_index = 0; // ?? Label csrAmount_lb = new Label("<b>??</b>", Label.CONTENT_XHTML); csrAmount_lb.setWidth("-1px"); licence_glo.addComponent(csrAmount_lb, (column_index++), row_index); csrAmountValue_lb = new Label("<font color='" + VALUE_COL_COLOR + "'>" + 0 + "</font>", Label.CONTENT_XHTML); csrAmountValue_lb.setWidth("-1px"); licence_glo.addComponent(csrAmountValue_lb, (column_index++), row_index); Label csrAmountDescription_lb = new Label( "<font color='" + DESCRIPTION_COL_COLOR + "'>????!!</font>", Label.CONTENT_XHTML); csrAmountDescription_lb.setWidth("-1px"); licence_glo.addComponent(csrAmountDescription_lb, (column_index++), row_index); // grid ??? row_index++; column_index = 0; // Label expiredDate_lb = new Label("<b></b>", Label.CONTENT_XHTML); expiredDate_lb.setWidth("-1px"); licence_glo.addComponent(expiredDate_lb, (column_index++), row_index); expiredDateValue_lb = new Label("<font color='" + VALUE_COL_COLOR + "'>invalid</font>", Label.CONTENT_XHTML); expiredDateValue_lb.setWidth("-1px"); licence_glo.addComponent(expiredDateValue_lb, (column_index++), row_index); Label expiredDateDescription_lb = new Label("<font color='" + DESCRIPTION_COL_COLOR + "'>??!!</font>", Label.CONTENT_XHTML); expiredDateDescription_lb.setWidth("-1px"); licence_glo.addComponent(expiredDateDescription_lb, (column_index++), row_index); // grid ??? row_index++; column_index = 0; //?? Label licence_lb = new Label("<b>? ?</b>", Label.CONTENT_XHTML); licence_lb.setWidth("-1px"); licence_glo.addComponent(licence_lb, (column_index++), row_index); Label licenceValue_lb = new Label("<font color='" + VALUE_COL_COLOR + "'>" + serialNumber + "</font>", Label.CONTENT_XHTML); // Label licenceValue_lb = new Label("<font color='blue'>"+GlobalVariable.CONCURRENT_MAX_CSR+"</font>", Label.CONTENT_XHTML); licenceValue_lb.setWidth("-1px"); licence_glo.addComponent(licenceValue_lb, (column_index++), row_index); Label licenceDescription_lb = new Label( "<font color='" + DESCRIPTION_COL_COLOR + "'>???!!</font>", Label.CONTENT_XHTML); licenceDescription_lb.setWidth("-1px"); licence_glo.addComponent(licenceDescription_lb, (column_index++), row_index); this.addComponent(updateLicenseComponent()); //?? refreshLicenseInfo(); }
From source file:com.klwork.explorer.project.MyCalendarView.java
License:Apache License
private void initLayoutContent() { initNavigationButtons();//from w ww . j a v a2 s. c om initHideWeekEndButton(); initReadOnlyButton(); initDisabledButton(); initAddNewEventButton(); HorizontalLayout hl = new HorizontalLayout(); hl.setWidth("100%"); hl.setSpacing(true); hl.setMargin(new MarginInfo(false, false, true, false)); hl.addComponent(prevButton); hl.addComponent(captionLabel); hl.addComponent(monthButton); hl.addComponent(weekButton); hl.addComponent(nextButton); hl.setComponentAlignment(prevButton, Alignment.MIDDLE_LEFT); hl.setComponentAlignment(captionLabel, Alignment.MIDDLE_CENTER); hl.setComponentAlignment(monthButton, Alignment.MIDDLE_CENTER); hl.setComponentAlignment(weekButton, Alignment.MIDDLE_CENTER); hl.setComponentAlignment(nextButton, Alignment.MIDDLE_RIGHT); monthButton.setVisible(viewMode == Mode.WEEK); weekButton.setVisible(viewMode == Mode.DAY); HorizontalLayout controlPanel = new HorizontalLayout(); controlPanel.setSpacing(true); controlPanel.setMargin(new MarginInfo(false, false, true, false)); controlPanel.setWidth("100%"); //controlPanel.addComponent(localeSelect); //controlPanel.addComponent(timeZoneSelect); controlPanel.addComponent(formatSelect); controlPanel.addComponent(hideWeekendsButton); //controlPanel.addComponent(readOnlyButton); //controlPanel.addComponent(disabledButton); controlPanel.addComponent(addNewEvent); /*controlPanel.setComponentAlignment(timeZoneSelect, Alignment.MIDDLE_LEFT);*/ controlPanel.setComponentAlignment(formatSelect, Alignment.MIDDLE_LEFT); /*controlPanel.setComponentAlignment(localeSelect, Alignment.MIDDLE_LEFT);*/ controlPanel.setComponentAlignment(hideWeekendsButton, Alignment.MIDDLE_LEFT); /* controlPanel.setComponentAlignment(readOnlyButton, Alignment.MIDDLE_LEFT); controlPanel.setComponentAlignment(disabledButton, Alignment.MIDDLE_LEFT);*/ controlPanel.setComponentAlignment(addNewEvent, Alignment.MIDDLE_LEFT); GridLayout layout = (GridLayout) getContent(); layout.addComponent(controlPanel); layout.addComponent(hl); layout.addComponent(calendarComponent); layout.setRowExpandRatio(layout.getRows() - 1, 1.0f); }
From source file:com.klwork.explorer.project.ProjectSearchPanel.java
License:Apache License
protected void initInputField() { // Csslayout is used to style inputtext as rounded //CssLayout csslayout2 = new CssLayout(); CustomLayout csslayout = new CustomLayout("circularButton"); csslayout.setHeight(24, Unit.PIXELS); csslayout.setWidth(100, Unit.PERCENTAGE); layout.addComponent(csslayout);/* w ww . j ava 2 s . co m*/ inputField = new TextField(); inputField.setWidth(50, Unit.PERCENTAGE); inputField.addStyleName(ExplorerLayout.STYLE_SEARCHBOX); inputField.setInputPrompt("??"); inputField.focus(); csslayout.addComponent(inputField, "searchInput"); layout.setComponentAlignment(csslayout, Alignment.MIDDLE_LEFT); layout.setExpandRatio(csslayout, 1.0f); }
From source file:com.klwork.explorer.ui.base.AbstractMainGridPage.java
License:Apache License
protected void addSelectComponent() { VerticalLayout vLayout = new VerticalLayout(); vLayout.addStyleName("sidebar"); vLayout.addStyleName("menu"); vLayout.addStyleName("tasks"); vLayout.setMargin(new MarginInfo(true, false, false, false)); vLayout.setSizeFull();//from www. j a v a 2 s . c om HorizontalLayout tableHeadLayout = createSelectHead(); vLayout.addComponent(tableHeadLayout); vLayout.setComponentAlignment(tableHeadLayout, Alignment.MIDDLE_LEFT); AbstractSelect select = createSelectComponent(); vLayout.addComponent(select); vLayout.setExpandRatio(select, 1.0f); if (select != null) { grid.addComponent(vLayout, 1, 0); } }