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


Java VerticalLayout.setSizeFull方法代碼示例

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


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

示例1: init

import com.vaadin.ui.VerticalLayout; //導入方法依賴的package包/類
@Override
protected void init(VaadinRequest request) {
	final VerticalLayout root = new VerticalLayout();
	root.setSizeFull();
	root.setMargin(true);
	root.setSpacing(true);
	setContent(root);
	MHorizontalLayout horizontalLayout = new MHorizontalLayout();
	for (MenuEntry menuEntry : menuEntries) {
		horizontalLayout.addComponent(new MButton(menuEntry.getName(), event -> {
			navigator.navigateTo(menuEntry.getNavigationTarget());
		}));
	}
	root.addComponent(horizontalLayout);
	springViewDisplay = new Panel();
	springViewDisplay.setSizeFull();
	root.addComponent(springViewDisplay);
	root.setExpandRatio(springViewDisplay, 1.0f);

}
 
開發者ID:dve,項目名稱:spring-boot-plugins-example,代碼行數:21,代碼來源:VaadinUI.java

示例2: init

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

    final CssLayout navigationBar = new CssLayout();
    navigationBar.addStyleName(ValoTheme.LAYOUT_COMPONENT_GROUP);
    navigationBar.addComponent(createNavigationButton("Demo View (Default)",
            Constants.VIEW_DEFAULT));
    navigationBar.addComponent(createNavigationButton("Stream View",
            Constants.VIEW_STREAM));
    rootLayout.addComponent(navigationBar);

    springViewDisplay = new Panel();
    springViewDisplay.setSizeFull();
    
    rootLayout.addComponent(springViewDisplay);
    rootLayout.setExpandRatio(springViewDisplay, 1.0f);

}
 
開發者ID:MikeQin,項目名稱:spring-boot-vaadin-rabbitmq-pipeline-demo,代碼行數:22,代碼來源:NavigatorUI.java

示例3: createSubView

import com.vaadin.ui.VerticalLayout; //導入方法依賴的package包/類
private void createSubView(String title, ToolbarButtons[] buttons) {
    setSizeFull();
    final VerticalLayout layout = new VerticalLayout();
    layout.addStyleName(StyleConstants.BASE_CONTAINER);
    layout.setSizeFull();

    final VerticalLayout panel = new VerticalLayout();
    panel.addStyleName("panel");
    panel.setSizeFull();

    layout.addComponent(createHeader(title));
    layout.addComponent(panel);

    if (buttons != null) {
        panel.addComponent(createToolbar(buttons));
    }

    panel.addComponent(createTable());
    panel.setExpandRatio(this.table, 1L);
    layout.setExpandRatio(panel, 1L);
    addComponent(layout);
}
 
開發者ID:opensecuritycontroller,項目名稱:osc-core,代碼行數:23,代碼來源:CRUDBaseSubView.java

示例4: init

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

	VerticalLayout layout = new VerticalLayout();
	layout.setSizeFull();
	layout.setMargin(true);

	testGrid.setSizeFull();
	testGrid.getEditor().setEnabled(true);

	testGrid.setItems(getCustomers());

	layout.addComponent(testGrid);

	setContent(layout);
}
 
開發者ID:peterl1084,項目名稱:bean-grid,代碼行數:18,代碼來源:TestUI.java

示例5: init

import com.vaadin.ui.VerticalLayout; //導入方法依賴的package包/類
@Override
protected void init(VaadinRequest request) {
	// The root of the component hierarchy
	VerticalLayout content = new VerticalLayout();
	content.setSizeFull(); // Use entire window
	setContent(content); // Attach to the UI

	// Add some component
	content.addComponent(new Label("<b>Hello!</b> - How are you?", ContentMode.HTML));

}
 
開發者ID:commsen,項目名稱:EM,代碼行數:12,代碼來源:MainUI.java

示例6: mainLayout

import com.vaadin.ui.VerticalLayout; //導入方法依賴的package包/類
private HorizontalLayout mainLayout() {
  menuLayout = new VerticalLayout();
  menuLayout.setStyleName(ValoTheme.MENU_ROOT);
  menuLayout.setWidth(100, Unit.PERCENTAGE);
  menuLayout.setHeight(100, Unit.PERCENTAGE);
  menuLayout.setSizeFull();

  final CssLayout menuButtons = new CssLayout();
  menuButtons.setSizeFull();
  menuButtons.addStyleName(ValoTheme.MENU_PART);
  menuButtons.addStyleName(ValoTheme.MENU_PART_LARGE_ICONS);

  menuButtons.addComponents(
      createMenuButton(VaadinIcons.VIEWPORT, "Dashboard", DashboardComponent::new),
      createMenuButton(VaadinIcons.SITEMAP, "Sitemap", DashboardComponent::new),
      createMenuButton(VaadinIcons.CALC_BOOK, "Calculate", CalcComponent::new),
      createMenuButton(VaadinIcons.NOTEBOOK, "Write", WriteComponent::new),
      createMenuButtonForNotification(VaadinIcons.EXIT, "Logout", "You want to go?")
  );
  menuLayout.addComponent(menuButtons);

  contentLayout = new CssLayout(new Label("Content"));
  contentLayout.setSizeFull();

  final HorizontalLayout layout = new HorizontalLayout();
  layout.setSizeFull();
  layout.addComponent(menuLayout);
  layout.addComponent(contentLayout);

  layout.setExpandRatio(menuLayout, 0.20f);
  layout.setExpandRatio(contentLayout, 0.80f);

  return layout;
}
 
開發者ID:Java-Publications,項目名稱:javamagazin-009-microkernel,代碼行數:35,代碼來源:MainView.java

示例7: init

import com.vaadin.ui.VerticalLayout; //導入方法依賴的package包/類
/**
 * Initialise la vue
 */
@PostConstruct
public void init() {		
	
	/* Style */
	setSizeFull();
	setSpacing(true);		
	
	/*Layout des mails*/
	VerticalLayout layoutMailModel = new VerticalLayout();
	layoutMailModel.setSizeFull();
	layoutMailModel.setSpacing(true);
	layoutMailModel.setMargin(true);
	
	/*Layout des typ decision*/
	VerticalLayout layoutMailTypeDec = new VerticalLayout();
	layoutMailTypeDec.setSizeFull();
	layoutMailTypeDec.setSpacing(true);
	layoutMailTypeDec.setMargin(true);
	
	/*Le layout a onglet*/
	TabSheet sheet = new TabSheet();
	sheet.setImmediate(true);
	sheet.addStyleName(ValoTheme.TABSHEET_PADDED_TABBAR);
	addComponent(sheet);
	sheet.setSizeFull();
	
	sheet.addTab(layoutMailModel, applicationContext.getMessage("mail.model.title", null, UI.getCurrent().getLocale()),FontAwesome.ENVELOPE_O);
	sheet.addTab(layoutMailTypeDec, applicationContext.getMessage("mail.typdec.title", null, UI.getCurrent().getLocale()),FontAwesome.ENVELOPE);
	
	/*Populate le layoutMailModel*/
	populateMailModelLayout(layoutMailModel);
	
	/*Populate le layoutMailModel*/
	populateMailTypeDecLayout(layoutMailTypeDec);
	
	
	/* Inscrit la vue aux mises à jour de mail */
	mailEntityPusher.registerEntityPushListener(this);
}
 
開發者ID:EsupPortail,項目名稱:esup-ecandidat,代碼行數:43,代碼來源:ScolMailView.java

示例8: initLayout

import com.vaadin.ui.VerticalLayout; //導入方法依賴的package包/類
/**
 * Initialise le layout principal
 */
private void initLayout() {
	layout.setSizeFull();
	setContent(layout);

	menuLayout.setPrimaryStyleName(ValoTheme.MENU_ROOT);

	layoutWithSheet.setPrimaryStyleName(StyleConstants.VALO_CONTENT);
	layoutWithSheet.addStyleName(StyleConstants.SCROLLABLE);		
	layoutWithSheet.setSizeFull();
	
	VerticalLayout vlAll = new VerticalLayout();
	vlAll.addStyleName(StyleConstants.SCROLLABLE);
	vlAll.setSizeFull();
	
	subBarMenu.addStyleName(ValoTheme.TABSHEET_PADDED_TABBAR);
	subBarMenu.setVisible(false);
	vlAll.addComponent(subBarMenu);
	
	contentLayout.addStyleName(StyleConstants.SCROLLABLE);
	contentLayout.setSizeFull();
	vlAll.addComponent(contentLayout);
	vlAll.setExpandRatio(contentLayout, 1);
	
	layoutWithSheet.addComponent(vlAll);
	
	menuButtonLayout.addStyleName(StyleConstants.VALO_MY_MENU_MAX_WIDTH);	
	layout.setExpandRatio(layoutWithSheet, 1);

	Responsive.makeResponsive(this);
	addStyleName(ValoTheme.UI_WITH_MENU);
}
 
開發者ID:EsupPortail,項目名稱:esup-ecandidat,代碼行數:35,代碼來源:MainUI.java

示例9: 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

示例10: createComponent

import com.vaadin.ui.VerticalLayout; //導入方法依賴的package包/類
@Override
protected Component createComponent() {
  final CssLayout contentLayout = new CssLayout(new Label("Content"));
  contentLayout.setSizeFull();
  contentLayout.setId(cssLayoutID().apply(MainUI.class, "Content"));

  final VerticalLayout menuLayout = new VerticalLayout();
  menuLayout.setId(verticalLayoutID().apply(MainUI.class, "MenuLayout"));
  menuLayout.setStyleName(ValoTheme.MENU_ROOT);
  menuLayout.setWidth(100, Unit.PERCENTAGE);
  menuLayout.setHeight(100, Unit.PERCENTAGE);
  menuLayout.setSizeFull();

  // to hard bound
  menuLayout.addComponent(new MenuComponent(contentLayout));


  final HorizontalLayout mainLayout = new HorizontalLayout();
  mainLayout.setId(horizontalLayoutID().apply(MainUI.class, "MainLayout"));
  mainLayout.setSizeFull();
  mainLayout.addComponent(menuLayout);
  mainLayout.addComponent(contentLayout);

  mainLayout.setExpandRatio(menuLayout, 0.20f);
  mainLayout.setExpandRatio(contentLayout, 0.80f);

  return mainLayout;
}
 
開發者ID:Java-Publications,項目名稱:vaadin-016-helloworld-14,代碼行數:29,代碼來源:MainView.java

示例11: init

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

	// Root layout
       final VerticalLayout root = new VerticalLayout();
       root.setSizeFull();

       root.setSpacing(false);
       root.setMargin(false);

       setContent(root);

       // Main panel
       springViewDisplay = new Panel();
       springViewDisplay.setSizeFull();

       root.addComponent(springViewDisplay);
       root.setExpandRatio(springViewDisplay, 1);

       // Footer
       Layout footer = getFooter();
       root.addComponent(footer);
       root.setExpandRatio(footer, 0);

       // Error handler
	UI.getCurrent().setErrorHandler(new UIErrorHandler());

	// Disable session expired notification, the page will be reloaded on any action
	VaadinService.getCurrent().setSystemMessagesProvider(
			systemMessagesInfo -> {
				CustomizedSystemMessages msgs = new CustomizedSystemMessages();
				msgs.setSessionExpiredNotificationEnabled(false);
				return msgs;
			});
}
 
開發者ID:vianneyfaivre,項目名稱:Persephone,代碼行數:36,代碼來源:PersephoneUI.java

示例12: popupRowOnClick

import com.vaadin.ui.VerticalLayout; //導入方法依賴的package包/類
private PopupView popupRowOnClick() {
	VerticalLayout popupContent = new VerticalLayout();
	popupContent.setSizeFull();

	PopupView popup = new PopupView(null, popupContent);

	grid.addItemClickListener(e -> {
		popup.setData(e.getItem());
		popup.setPopupVisible(true);
	});

	popup.addPopupVisibilityListener(event -> {
		if (event.isPopupVisible()) {
			popupContent.removeAllComponents();

			PropertyItem item = (PropertyItem) popup.getData();

			Label popupTitle = new Label("<h2>Property details</h2>", ContentMode.HTML);
			popupTitle.setSizeFull();

			Button popupClose = new Button(VaadinIcons.CLOSE);
			popupClose.addClickListener(e -> popup.setPopupVisible(false));

			HorizontalLayout title = new HorizontalLayout(popupTitle, popupClose);
			title.setSizeFull();
			title.setExpandRatio(popupTitle, 3);
			title.setExpandRatio(popupClose, 1);
			title.setComponentAlignment(popupClose, Alignment.TOP_RIGHT);

			Label propertyKey= new Label(String.format("Key: '%s'", item.getKey()), ContentMode.TEXT);
			Label propertyValue = new Label(String.format("Value: '%s'", item.getValue()), ContentMode.TEXT);
			propertyValue.setSizeFull();
			Label propertyOrigin = new Label(String.format("Origin: '%s'", item.getOrigin()), ContentMode.TEXT);

			popupContent.addComponents(title, propertyKey, propertyValue, propertyOrigin);
		}
	});

	popup.setHideOnMouseOut(false);
	popup.setSizeFull();

	return popup;
}
 
開發者ID:vianneyfaivre,項目名稱:Persephone,代碼行數:44,代碼來源:PropertiesPage.java

示例13: InfoWindow

import com.vaadin.ui.VerticalLayout; //導入方法依賴的package包/類
/**
 * Crée une fenêtre d'information
 * @param message
 * @param titre
 */
public InfoWindow(String titre, String message, Integer width, Integer percentageHeight) {
	/* Style */
	if (width==null){
		width = 400;
	}
	setWidth(width, Unit.PIXELS);
	if (percentageHeight!=null){
		setHeight(percentageHeight,Unit.PERCENTAGE);
	}
	setModal(true);
	setResizable(false);
	setClosable(false);

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

	/* Titre */
	setCaption(titre);

	/* Texte */
	Label textLabel = new Label(message,ContentMode.HTML);
	
	if (percentageHeight!=null){
		layout.setSizeFull();
		/* Titre */
		VerticalLayout layoutItem = new VerticalLayout();
		layoutItem.setMargin(true);
		layoutItem.setWidth(100, Unit.PERCENTAGE);
		layoutItem.setSpacing(true);
		layoutItem.addComponent(textLabel);
		/* Panel */
		Panel panel = new Panel();
		panel.setSizeFull();
		panel.setContent(layoutItem);
		
		layout.addComponent(panel);
		layout.setExpandRatio(panel, 1);
	}else{
		layout.addComponent(textLabel);
	}
	
	

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

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

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

示例14: SearchCtrCandWindow

import com.vaadin.ui.VerticalLayout; //導入方法依賴的package包/類
/**
 * Crée une fenêtre de recherche de centre de candidature
 */
public SearchCtrCandWindow() {
	/* Style */
	setWidth(740, Unit.PIXELS);
	setHeight(480, Unit.PIXELS);
	setModal(true);
	setResizable(true);

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

	/* Titre */
	setCaption(applicationContext.getMessage("ctrCand.window.search.title", null, Locale.getDefault()));
	
	/* Table de Resultat de recherche*/
	grid.addItems(centreCandidatureController.getListCentreCandidature());
	grid.initColumn(FIELDS_ORDER, "ctrCand.table.", CentreCandidature_.codCtrCand.getName());
	grid.addSelectionListener(e->{
		// Le bouton d'enregistrement est actif seulement si un ctrCand est sélectionnée.
		boolean isSelected = grid.getSelectedItem() instanceof CentreCandidature;
		btnValider.setEnabled(isSelected);
	});
	grid.addItemClickListener(e->{
		if (e.isDoubleClick()) {
			grid.select(e.getItemId());
			btnValider.click();				
		}
	});
	
	grid.setColumnWidth(CentreCandidature_.codCtrCand.getName(), 180);
	grid.setExpendColumn(CentreCandidature_.libCtrCand.getName());
	
	layout.addComponent(grid);
	layout.setExpandRatio(grid, 1.0f);

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

	btnAnnuler = new OneClickButton(applicationContext.getMessage("btnAnnuler", null, UI.getCurrent().getLocale()), FontAwesome.TIMES);
	btnAnnuler.addClickListener(e -> close());
	buttonsLayout.addComponent(btnAnnuler);
	buttonsLayout.setComponentAlignment(btnAnnuler, Alignment.MIDDLE_LEFT);
	
	btnValider = new OneClickButton(applicationContext.getMessage("btnValid", null, UI.getCurrent().getLocale()), FontAwesome.SAVE);
	btnValider.setEnabled(false);
	btnValider.addStyleName(ValoTheme.BUTTON_PRIMARY);
	btnValider.addClickListener(e -> {
		performAction();
	});
	buttonsLayout.addComponent(btnValider);
	buttonsLayout.setComponentAlignment(btnValider, Alignment.MIDDLE_RIGHT);
	

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

示例15: init

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

    VerticalLayout layout = new VerticalLayout();
    layout.setSpacing(true);
    layout.setMargin(true);
    layout.setSizeFull();
    
    
    Grid<DemoPerson> grid = new Grid("<b>Demo Grid</b>", new ListDataProvider(DemoPerson.getPersonList()));
    grid.setCaptionAsHtml(true);
    grid.setSizeFull();
    grid.setSelectionMode(Grid.SelectionMode.NONE);

    Grid.Column<DemoPerson, String> idColumn = grid.addColumn(DemoPerson::getId).setCaption("Id");
    Grid.Column<DemoPerson, String> firstNameColumn = grid.addColumn(DemoPerson::getFirstName).setCaption("Firstname");
    Grid.Column<DemoPerson, String> surNameColumn = grid.addColumn(DemoPerson::getSurName).setCaption("Surname");
    Grid.Column<DemoPerson, String> companyColumn = grid.addColumn(DemoPerson::getCompany, 
            new ClickableTextRenderer(getCompanyClickListener())).setCaption("Company");
    Grid.Column<DemoPerson, String> companyTypeColumn = grid.addColumn(DemoPerson::getCompanyType).setCaption("Company Type");
    Grid.Column<DemoPerson, String> cityColumn = grid.addColumn(DemoPerson::getCity).setCaption("City");
    
    
    // Use the advanced form of the Clickable Text Renderer on 
    // column "city". This will require a value provider where the PRESENTATION
    // class is of type ClickableText. Because the city is of type String
    // the value provider must convert from String to ClickableText.
    cityColumn.setRenderer((String source) -> {
        ClickableText ct = new ClickableText();
        ct.description = "Will take you to " + source;  // Sets the HTML title attribute, aka tooltip
        
        // I want a space between the underlined text and the icon. To avoid the 
        // space being underlined (because of the link styling) I use a
        // a different style for the space itself.
        ct.value = source + "<span class=\"v-icon\">&nbsp;</span>" + VaadinIcons.EXTERNAL_LINK.getHtml();
        ct.isHTML = true;
        return ct;
    }, new ClickableTextRendererAdv<>(getCityClickListener()));
    
    
    layout.addComponent(grid);
    setContent(layout);
}
 
開發者ID:phansson,項目名稱:vaadin-clickabletextrenderer-v8,代碼行數:44,代碼來源:DemoUI.java


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