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


Java Panel.setSizeFull方法代碼示例

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


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

示例1: init

import com.vaadin.ui.Panel; //導入方法依賴的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.Panel; //導入方法依賴的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: init

import com.vaadin.ui.Panel; //導入方法依賴的package包/類
@Override
protected void init(VaadinRequest request) {
	log.info("Levanto la pagina UI");
	
	final VerticalLayout root = new VerticalLayout();
       root.setSizeFull();
       root.setMargin(true);
       root.setSpacing(true);
       setContent(root);
	
       final Panel viewContainer = new Panel();
       viewContainer.setSizeFull();
       root.addComponent(viewContainer);
       root.setExpandRatio(viewContainer, 1.0f);
       
       Navigator navigator = new Navigator(this, viewContainer);
       //Navigator navigator = new Navigator(this, this);
       navigator.addProvider(viewProvider);
       
       log.info("Termina de levantar la pagina UI");

}
 
開發者ID:damiancom,項目名稱:garantia,代碼行數:23,代碼來源:LoginUI.java

示例4: MovieDetailsWindow

import com.vaadin.ui.Panel; //導入方法依賴的package包/類
private MovieDetailsWindow(final Movie movie, final Date startTime,
        final Date endTime) {
    addStyleName("moviedetailswindow");
    Responsive.makeResponsive(this);

    setCaption(movie.getTitle());
    center();
    setCloseShortcut(KeyCode.ESCAPE, null);
    setResizable(false);
    setClosable(false);
    setHeight(90.0f, Unit.PERCENTAGE);

    VerticalLayout content = new VerticalLayout();
    content.setSizeFull();
    setContent(content);

    Panel detailsWrapper = new Panel(buildMovieDetails(movie, startTime,
            endTime));
    detailsWrapper.setSizeFull();
    detailsWrapper.addStyleName(ValoTheme.PANEL_BORDERLESS);
    detailsWrapper.addStyleName("scroll-divider");
    content.addComponent(detailsWrapper);
    content.setExpandRatio(detailsWrapper, 1f);

    content.addComponent(buildFooter());
}
 
開發者ID:mcollovati,項目名稱:vaadin-vertx-samples,代碼行數:27,代碼來源:MovieDetailsWindow.java

示例5: initLayout

import com.vaadin.ui.Panel; //導入方法依賴的package包/類
private void initLayout() {
	final VerticalLayout root = new VerticalLayout();
	root.setSizeFull();
	root.setMargin(true);
	root.setSpacing(true);
	setContent(root);

	final CssLayout navigationBar = new CssLayout();
	navigationBar.addStyleName(ValoTheme.LAYOUT_COMPONENT_GROUP);

	navigationBar.addComponent(createNavigationButton("Default View",
               DefaultView.VIEW_NAME));		
       navigationBar.addComponent(createNavigationButton("MongoDB View",
               MongoDBUIView.VIEW_NAME));
       navigationBar.addComponent(createNavigationButton("Combobox Example View",
               CityComboboxView.VIEW_NAME));
       
	root.addComponent(navigationBar);

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

}
 
開發者ID:theMightyFly,項目名稱:demo-spring-vaadin,代碼行數:26,代碼來源:MyVaadinUI.java

示例6: initInformationPanel

import com.vaadin.ui.Panel; //導入方法依賴的package包/類
protected void initInformationPanel() {
  Panel infoPanel = new Panel();
  infoPanel.addStyleName(Reindeer.PANEL_LIGHT);
  infoPanel.setSizeFull();
  
  profilePanelLayout.addComponent(infoPanel);
  profilePanelLayout.setExpandRatio(infoPanel, 1.0f); // info panel should take all the remaining width available
  
  // All the information sections are put under each other in a vertical layout
  this.infoPanelLayout = new VerticalLayout();
  infoPanel.setContent(infoPanelLayout);
  
  initAboutSection();
  initContactSection();
  
}
 
開發者ID:logicalhacking,項目名稱:SecureBPMN,代碼行數:17,代碼來源:ProfilePanel.java

示例7: DetailPanel

import com.vaadin.ui.Panel; //導入方法依賴的package包/類
public DetailPanel() {
  setSizeFull();
  addStyleName(ExplorerLayout.STYLE_DETAIL_PANEL);
  setMargin(true);
  
  CssLayout cssLayout = new CssLayout(); // Needed for rounded corners
  cssLayout.addStyleName(ExplorerLayout.STYLE_DETAIL_PANEL);
  cssLayout.setSizeFull();
  super.addComponent(cssLayout);
  
  mainPanel = new Panel();
  mainPanel.addStyleName(Reindeer.PANEL_LIGHT);
  mainPanel.setSizeFull();
  cssLayout.addComponent(mainPanel);
  
  // Use default layout
  VerticalLayout verticalLayout = new VerticalLayout();
  verticalLayout.setWidth(100, UNITS_PERCENTAGE);
  verticalLayout.setMargin(true);
  mainPanel.setContent(verticalLayout);
}
 
開發者ID:logicalhacking,項目名稱:SecureBPMN,代碼行數:22,代碼來源:DetailPanel.java

示例8: createTab

import com.vaadin.ui.Panel; //導入方法依賴的package包/類
private VerticalLayout createTab(String caption, String title, FormLayout content, String guid) {
    VerticalLayout tabSheet = new VerticalLayout();
    tabSheet.setCaption(caption);
    tabSheet.setStyleName(StyleConstants.TAB_SHEET);
    Panel panel = new Panel();
    // creating subHeader inside panel
    panel.setContent(content);
    panel.setSizeFull();
    tabSheet.addComponent(ViewUtil.createSubHeader(title, guid));
    tabSheet.addComponent(panel);
    return tabSheet;
}
 
開發者ID:opensecuritycontroller,項目名稱:osc-core,代碼行數:13,代碼來源:MaintenanceView.java

示例9: createComponent

import com.vaadin.ui.Panel; //導入方法依賴的package包/類
private VerticalLayout createComponent(String caption, String title, FormLayout content, String guid) {
    VerticalLayout tabSheet = new VerticalLayout();
    Panel panel = new Panel();
    // creating subHeader inside panel
    panel.setContent(content);
    panel.setSizeFull();
    tabSheet.addComponent(ViewUtil.createSubHeader(title, guid));
    tabSheet.addComponent(panel);
    return tabSheet;
}
 
開發者ID:opensecuritycontroller,項目名稱:osc-core,代碼行數:11,代碼來源:PluginView.java

示例10: RowLayout

import com.vaadin.ui.Panel; //導入方法依賴的package包/類
private RowLayout(Step step) {
  this.step = step;

  label = getLabelProvider().getStepLabel(step);

  divider = new CssLayout();
  divider.addStyleName(STYLE_DIVIDER);
  divider.setHeight(100, Unit.PERCENTAGE);

  contentContainer = new Panel();
  contentContainer.addStyleName(STYLE_CONTENT_CONTAINER);
  contentContainer.addStyleName(ValoTheme.PANEL_BORDERLESS);
  contentContainer.setSizeFull();

  buttonBar = new HorizontalLayout();
  buttonBar.addStyleName(STYLE_BUTTON_BAR);
  buttonBar.setMargin(false);
  buttonBar.setSpacing(true);
  buttonBar.setWidth(100, Unit.PERCENTAGE);
  buttonBar.setMargin(new MarginInfo(false, false, !isLastStep(step), false));

  rootLayout = new GridLayout(2, 3);
  rootLayout.setSizeFull();
  rootLayout.setMargin(false);
  rootLayout.setSpacing(false);
  rootLayout.setColumnExpandRatio(1, 1);
  rootLayout.setRowExpandRatio(1, 1);
  rootLayout.addComponent(label, 0, 0, 1, 0);
  rootLayout.addComponent(divider, 0, 1, 0, 2);
  rootLayout.addComponent(contentContainer, 1, 1, 1, 1);
  rootLayout.addComponent(buttonBar, 1, 2, 1, 2);

  setCompositionRoot(rootLayout);
  addStyleName(STYLE_COMPONENT);
  setWidth(100, Unit.PERCENTAGE);
  setActive(false);
}
 
開發者ID:Juchar,項目名稱:md-stepper,代碼行數:38,代碼來源:VerticalStepper.java

示例11: init

import com.vaadin.ui.Panel; //導入方法依賴的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: initLayouts

import com.vaadin.ui.Panel; //導入方法依賴的package包/類
private void initLayouts() {
    navBar = new NavBar(this);
    // Use panel as main content container to allow it's content to scroll
    content = new Panel();
    content.setSizeFull();
    content.addStyleName(UIConstants.PANEL_BORDERLESS);

    addComponents(navBar, content);
    setExpandRatio(content, 1);
}
 
開發者ID:apache,項目名稱:incubator-tamaya-sandbox,代碼行數:11,代碼來源:ApplicationLayout.java

示例13: getAddonComponent

import com.vaadin.ui.Panel; //導入方法依賴的package包/類
@Override
public Component getAddonComponent() {
    Window w = new Window("Medium Editor in window");
    w.setWidth(500, Unit.PIXELS);
    w.setHeight(400, Unit.PIXELS);
    
    
    Panel p = new Panel();
    p.addStyleName(ValoTheme.PANEL_WELL);
    p.setSizeFull();

    MediumEditor editor = new MediumEditor();
    editor.setSizeFull();
    editor.setFocusOutlineEnabled(false);
    editor.setJsLoggingEnabled(true);
    editor.setContent(Lorem.getHtmlParagraphs(3, 5));
    editor.configure(
            editor.options()
            .toolbar()
            .buttons(Buttons.BOLD, Buttons.ITALIC, 
                    Buttons.JUSTIFY_CENTER, 
                    Buttons.ANCHOR)
            .done()
            .autoLink(true)
            .imageDragging(false)
            .done()
            );
    editors.add(editor);
    p.setContent(editor);
    w.setContent(p);

    Button b = new Button("Open Window");
    b.addClickListener(e -> {
        w.setPosition(e.getClientX(), e.getClientY());
        UI.getCurrent().addWindow(w);
    });


    return b; 
}
 
開發者ID:moberwasserlechner,項目名稱:vaadin-medium-editor,代碼行數:41,代碼來源:WindowEditorView.java

示例14: buildPreview

import com.vaadin.ui.Panel; //導入方法依賴的package包/類
private Component buildPreview() {
    previewLabel = new Label();
    previewLabel.setSizeFull();

    Panel panel = new Panel(previewLabel);
    panel.setCaption("Preview");
    panel.setSizeFull();
    panel.addStyleName(ValoTheme.PANEL_BORDERLESS);
    panel.addStyleName("addon-code");
    return panel;
}
 
開發者ID:moberwasserlechner,項目名稱:vaadin-medium-editor,代碼行數:12,代碼來源:AddonDemoUI.java

示例15: buildCode

import com.vaadin.ui.Panel; //導入方法依賴的package包/類
private Component buildCode() {
    codeLabel = new Label();
    codeLabel.setContentMode(ContentMode.HTML);

    Panel codePanel = new Panel(codeLabel);
    codePanel.setSizeFull();
    codePanel.addStyleName(ValoTheme.PANEL_BORDERLESS);
    codePanel.addStyleName("addon-code");
    return codePanel;
}
 
開發者ID:moberwasserlechner,項目名稱:vaadin-medium-editor,代碼行數:11,代碼來源:AddonDemoUI.java


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