當前位置: 首頁>>代碼示例>>Java>>正文


Java VerticalLayout.setComponentAlignment方法代碼示例

本文整理匯總了Java中com.vaadin.ui.VerticalLayout.setComponentAlignment方法的典型用法代碼示例。如果您正苦於以下問題:Java VerticalLayout.setComponentAlignment方法的具體用法?Java VerticalLayout.setComponentAlignment怎麽用?Java VerticalLayout.setComponentAlignment使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在com.vaadin.ui.VerticalLayout的用法示例。


在下文中一共展示了VerticalLayout.setComponentAlignment方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: getVarLayout

import com.vaadin.ui.VerticalLayout; //導入方法依賴的package包/類
private void getVarLayout(String title, List<String> liste, HorizontalLayout hlContent){
	if (liste==null || liste.size()==0){
		return;
	}
	
	VerticalLayout vl = new VerticalLayout();
	if (title!=null){
		Label labelTitle = new Label(title);
		vl.addComponent(labelTitle);
		vl.setComponentAlignment(labelTitle, Alignment.MIDDLE_CENTER);
	}
	
	StringBuilder txt = new StringBuilder("<ul>");
	liste.forEach(e->txt.append("<li><input type='text' value='${"+e+"}'></li>"));
	txt.append("</ul>");
	Label labelSearch = new Label(txt.toString(),ContentMode.HTML);
	
	vl.addComponent(labelSearch);
	hlContent.addComponent(vl);
}
 
開發者ID:EsupPortail,項目名稱:esup-ecandidat,代碼行數:21,代碼來源:ScolMailWindow.java

示例2: ProgressIndicatorWindow

import com.vaadin.ui.VerticalLayout; //導入方法依賴的package包/類
public ProgressIndicatorWindow() {
    center();
    setVisible(true);
    setResizable(false);
    setDraggable(false);
    setImmediate(true);
    setModal(true);
    setClosable(false);
    setCaption("Loading");

    VerticalLayout layout = new VerticalLayout();
    layout.setMargin(true);
    layout.setWidth("100%");

    this.currentStatus = new Label();
    this.currentStatus.addStyleName(StyleConstants.TEXT_ALIGN_CENTER);
    this.currentStatus.setSizeFull();
    this.currentStatus.setImmediate(true);

    ProgressBar progressBar = new ProgressBar();
    progressBar.setSizeFull();
    progressBar.setIndeterminate(true);
    progressBar.setImmediate(true);
    progressBar.setVisible(true);

    layout.addComponent(progressBar);
    layout.addComponent(this.currentStatus);
    layout.setComponentAlignment(this.currentStatus, Alignment.MIDDLE_CENTER);
    layout.setComponentAlignment(progressBar, Alignment.MIDDLE_CENTER);
    setContent(layout);
}
 
開發者ID:opensecuritycontroller,項目名稱:osc-core,代碼行數:32,代碼來源:ProgressIndicatorWindow.java

示例3: init

import com.vaadin.ui.VerticalLayout; //導入方法依賴的package包/類
@Override
protected void init(VaadinRequest request) {
    setSizeFull();

    user = new TextField("User:");
    user.setWidth("300px");
    user.setRequiredIndicatorVisible(true);

    password = new PasswordField("Password:");
    password.setWidth("300px");
    user.setRequiredIndicatorVisible(true);
    password.setValue("");

    VerticalLayout fields = new VerticalLayout(user, password, loginButton);
    fields.setCaption("Please login to access the application");
    fields.setSpacing(true);
    fields.setMargin(new MarginInfo(true, true, true, false));
    fields.setSizeUndefined();

    VerticalLayout uiLayout = new VerticalLayout(fields);
    uiLayout.setSizeFull();
    uiLayout.setComponentAlignment(fields, Alignment.MIDDLE_CENTER);

    setFocusedComponent(user);

    setContent(uiLayout);
}
 
開發者ID:kuylim,項目名稱:spring-boot-security-vaadin,代碼行數:28,代碼來源:LoginUI.java

示例4: CtrCandOdfCandidatureWindow

import com.vaadin.ui.VerticalLayout; //導入方法依賴的package包/類
/**
 * Crée une fenêtre de choix pour le gestionnaire : proposition ou candidature simple
 * @param message
 */
public CtrCandOdfCandidatureWindow(String message) {
	/* Style */
	setWidth(630, Unit.PIXELS);
	setModal(true);
	setResizable(false);
	setClosable(false);

	/* Layout */
	VerticalLayout layout = new VerticalLayout();
	layout.setMargin(true);
	layout.setSpacing(true);
	setContent(layout);

	/* Titre */
	setCaption(applicationContext.getMessage("candidature.gest.window", null, UI.getCurrent().getLocale()));

	/* Texte */
	layout.addComponent(new Label(message));
	layout.addComponent(new Label(applicationContext.getMessage("candidature.gest.window.choice", null, UI.getCurrent().getLocale())));
	
	/*Le container d'options*/
	BeanItemContainer<SimpleTablePresentation> optContainer = new BeanItemContainer<SimpleTablePresentation>(SimpleTablePresentation.class);
	SimpleTablePresentation optionClassique = new SimpleTablePresentation(ConstanteUtils.OPTION_CLASSIQUE,applicationContext.getMessage("candidature.gest.window.choice.classique", null, UI.getCurrent().getLocale()),null);
	SimpleTablePresentation optionProposition = new SimpleTablePresentation(ConstanteUtils.OPTION_PROP,applicationContext.getMessage("candidature.gest.window.choice.proposition", null, UI.getCurrent().getLocale()),null);
	optContainer.addItem(optionClassique);
	optContainer.addItem(optionProposition);
	
	optionGroupAction.setContainerDataSource(optContainer);
	optionGroupAction.addStyleName(StyleConstants.OPTION_GROUP_HORIZONTAL);
	optionGroupAction.setItemCaptionPropertyId(SimpleTablePresentation.CHAMPS_TITLE);
	optionGroupAction.setItemCaptionMode(ItemCaptionMode.PROPERTY);
	optionGroupAction.setValue(optionClassique);
	
	layout.addComponent(optionGroupAction);
	layout.setComponentAlignment(optionGroupAction, Alignment.MIDDLE_CENTER);
	

	/* Boutons */
	HorizontalLayout buttonsLayout = new HorizontalLayout();
	buttonsLayout.setWidth(100, Unit.PERCENTAGE);
	buttonsLayout.setSpacing(true);
	layout.addComponent(buttonsLayout);

	OneClickButton btnNon = new OneClickButton(applicationContext.getMessage("confirmWindow.btnNon", null, UI.getCurrent().getLocale()),FontAwesome.TIMES);
	btnNon.addClickListener(e -> close());
	buttonsLayout.addComponent(btnNon);
	buttonsLayout.setComponentAlignment(btnNon, Alignment.MIDDLE_LEFT);

	OneClickButton btnOui = new OneClickButton(applicationContext.getMessage("confirmWindow.btnOui", null, UI.getCurrent().getLocale()),FontAwesome.CHECK);
	btnOui.setIcon(FontAwesome.CHECK);
	btnOui.addStyleName(ValoTheme.BUTTON_PRIMARY);
	btnOui.addClickListener(e -> {
		SimpleTablePresentation option = (SimpleTablePresentation)optionGroupAction.getValue();
		odfCandidatureListener.btnOkClick(option.getCode());
		close();
	});
	buttonsLayout.addComponent(btnOui);
	buttonsLayout.setComponentAlignment(btnOui, Alignment.MIDDLE_RIGHT);

	/* Centre la fenêtre */
	center();
}
 
開發者ID:EsupPortail,項目名稱:esup-ecandidat,代碼行數:67,代碼來源:CtrCandOdfCandidatureWindow.java


注:本文中的com.vaadin.ui.VerticalLayout.setComponentAlignment方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。