当前位置: 首页>>代码示例>>Java>>正文


Java CssLayout.setSizeFull方法代码示例

本文整理汇总了Java中com.vaadin.ui.CssLayout.setSizeFull方法的典型用法代码示例。如果您正苦于以下问题:Java CssLayout.setSizeFull方法的具体用法?Java CssLayout.setSizeFull怎么用?Java CssLayout.setSizeFull使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.vaadin.ui.CssLayout的用法示例。


在下文中一共展示了CssLayout.setSizeFull方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: buildSubmenu

import com.vaadin.ui.CssLayout; //导入方法依赖的package包/类
private void buildSubmenu(CssLayout submenu, Set<OSCViewProvider<?>> views) {
    for (final OSCViewProvider<?> view : views) {
        String viewName = view.getName();
        NativeButton b = new NativeButton(viewName);
        // selecting default menu button
        if (view.getName().equals(VIEW_FRAGMENT_ALERTS)) {
            b.addStyleName("selected");
        }
        b.addClickListener(new ClickListener() {
            @Override
            public void buttonClick(ClickEvent event) {
                clearMenuSelection();
                event.getButton().addStyleName("selected");
                if (!MainUI.this.nav.getState().equals(viewName)) {
                    MainUI.this.nav.navigateTo(viewName);
                }
            }
        });
        submenu.setSizeFull();
        submenu.addComponent(b);
    }
}
 
开发者ID:opensecuritycontroller,项目名称:osc-core,代码行数:23,代码来源:MainUI.java

示例2: init

import com.vaadin.ui.CssLayout; //导入方法依赖的package包/类
@Override
protected void init(VaadinRequest vaadinRequest) {
    root = new CssLayout(appBar, navigationDrawer, content);
    root.setPrimaryStyleName("root");
    root.setSizeFull();
    Responsive.makeResponsive(root);
    setContent(root);

    appBar.getNaviIcon().addClickListener(event -> navigationDrawer.toggle());

    content.setPrimaryStyleName("content");
    content.setSizeFull();

    initNavigationItems();
    initDummyContent();
}
 
开发者ID:vaadin,项目名称:material-theme-fw8,代码行数:17,代码来源:DemoUI.java

示例3: init

import com.vaadin.ui.CssLayout; //导入方法依赖的package包/类
@PostConstruct
void init() {
  Label header = new Label("Control Panel");
  header.setStyleName(ValoTheme.LABEL_H1);
  addComponent(header);

  dashboard = new CssLayout();
  dashboard.setSizeFull();

  widgetMap = new HashMap<>();

  panelMap = new HashMap<>();

  generateDashboard();

  addComponent(dashboard);

  ui.setPollInterval(2000);
  ui.addPollListener(event -> {
    generateDashboard();
  });
}
 
开发者ID:daergoth,项目名称:HomeWire-Server,代码行数:23,代码来源:ControlPanelView.java

示例4: initLayout

import com.vaadin.ui.CssLayout; //导入方法依赖的package包/类
protected void initLayout() {
    container = new CssLayout();
    container.setSizeFull();
    container.setPrimaryStyleName(CURRENCYFIELD_LAYOUT_STYLENAME);

    container.addComponent(currencyLabel);

    if (useWrapper()) {
        ie9InputWrapper = new CssLayout(textField);
        ie9InputWrapper.setSizeFull();
        ie9InputWrapper.setPrimaryStyleName(IE9_INPUT_WRAP_STYLENAME);

        container.addComponent(ie9InputWrapper);
    } else {
        container.addComponent(textField);
    }

    setFocusDelegate(textField);
}
 
开发者ID:cuba-platform,项目名称:cuba,代码行数:20,代码来源:CubaCurrencyField.java

示例5: MainScreen

import com.vaadin.ui.CssLayout; //导入方法依赖的package包/类
public MainScreen(MyUI ui) {

        setStyleName("main-screen");

        CssLayout viewContainer = new CssLayout();
        viewContainer.addStyleName("valo-content");
        viewContainer.setSizeFull();

        //final Navigator navigator = new Navigator(ui, viewContainer);
        final Navigator navigator = new DiscoveryNavigator(ui, viewContainer);

        navigator.setErrorView(ErrorView.class);
        menu = new Menu(navigator);
        menu.addView(new SampleCrudView(), SampleCrudView.VIEW_NAME,
                SampleCrudView.VIEW_NAME, FontAwesome.EDIT);
        menu.addView(new AboutView(), AboutView.VIEW_NAME, AboutView.VIEW_NAME,
                FontAwesome.INFO_CIRCLE);

        navigator.addViewChangeListener(viewChangeListener);

        addComponent(menu);
        addComponent(viewContainer);
        setExpandRatio(viewContainer, 1);
        setSizeFull();
    }
 
开发者ID:jvalenciag,项目名称:VaadinSpringShiroMongoDB,代码行数:26,代码来源:MainScreen.java

示例6: init

import com.vaadin.ui.CssLayout; //导入方法依赖的package包/类
@Override
protected void init(VaadinRequest request) {
	final VerticalLayout mainLayout = new VerticalLayout();
	HorizontalLayout horizontalLayout = new HorizontalLayout();
	CssLayout viewLayout = new CssLayout();
	Page.getCurrent().setTitle("Vaadin Demo");
	mainLayout.setSizeFull();
	viewLayout.setSizeFull();
	mainLayout.setMargin(true);
	setContent(mainLayout);
	mainLayout.addComponent(horizontalLayout);
	mainLayout.addComponent(viewLayout);
	mainLayout.setExpandRatio(viewLayout, 1f);
	Navigator navigator = new Navigator(this, viewLayout);
	setNavigator(navigator);
	setupHeader(horizontalLayout);
	Map<String, Class<? extends MyView>> myViews = getViewProvider();
	navigator.addView("", new HomeView(myViews.keySet()));
	navigator.addProvider(new CachedViewProvider(myViews));
}
 
开发者ID:KrishnaPhani,项目名称:KrishnasSpace,代码行数:21,代码来源:VaadinUI.java

示例7: DetailPanel

import com.vaadin.ui.CssLayout; //导入方法依赖的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: MainScreen

import com.vaadin.ui.CssLayout; //导入方法依赖的package包/类
public MainScreen(MockAppUI ui) {

        setStyleName("main-screen");

        CssLayout viewContainer = new CssLayout();
        viewContainer.addStyleName("valo-content");
        viewContainer.setSizeFull();

        final Navigator navigator = new Navigator(ui, viewContainer);
        navigator.setErrorView(ErrorView.class);
        menu = new Menu(navigator);
        menu.addView(new SampleCrudView(), SampleCrudView.VIEW_NAME,
                SampleCrudView.VIEW_NAME, FontAwesome.EDIT);
        menu.addView(new AboutView(), AboutView.VIEW_NAME, AboutView.VIEW_NAME,
                FontAwesome.INFO_CIRCLE);

        navigator.addViewChangeListener(viewChangeListener);

        addComponent(menu);
        addComponent(viewContainer);
        setExpandRatio(viewContainer, 1);
        setSizeFull();
    }
 
开发者ID:vaadin,项目名称:archetype-application-example,代码行数:24,代码来源:MainScreen.java

示例9: MainScreen

import com.vaadin.ui.CssLayout; //导入方法依赖的package包/类
@Autowired
public MainScreen(final VaadinSecurity vaadinSecurity, SpringViewProvider springViewProvider, ValoSideBar sideBar) {
    HorizontalLayout layout = new HorizontalLayout();
    layout.setSizeFull();
    setCompositionRoot(layout);
    setSizeFull();

    // By adding a security item filter, only views that are accessible to the user will show up in the side bar.
    sideBar.setItemFilter(new VaadinSecurityItemFilter(vaadinSecurity));
    layout.addComponent(sideBar);

    CssLayout viewContainer = new CssLayout();
    viewContainer.setSizeFull();
    layout.addComponent(viewContainer);
    layout.setExpandRatio(viewContainer, 1f);

    Navigator navigator = new Navigator(UI.getCurrent(), viewContainer);
    // Without an AccessDeniedView, the view provider would act like the restricted views did not exist at all.
    springViewProvider.setAccessDeniedViewClass(AccessDeniedView.class);
    navigator.addProvider(springViewProvider);
    navigator.setErrorView(ErrorView.class);
    navigator.navigateTo(navigator.getState());
}
 
开发者ID:peholmst,项目名称:vaadin4spring,代码行数:24,代码来源:MainScreen.java

示例10: AttachmentPreviewView

import com.vaadin.ui.CssLayout; //导入方法依赖的package包/类
public AttachmentPreviewView() {
    CssLayout imgWrap = new CssLayout();
    imgWrap.setStyleName("image-wrap");
    imgWrap.setSizeFull();

    this.setStyleName("attachment-preview-view");
    this.setSizeFull();
    this.addComponent(imgWrap, "top: 0px left: 0px; z-index: 0;");

    backBtn = new NavigationButton(UserUIContext.getMessage(GenericI18Enum.M_BUTTON_BACK));
    backBtn.setStyleName("back-btn");

    this.addComponent(backBtn, "top: 15px; left: 15px; z-index: 1;");

    previewImage = new Image();
    imgWrap.addComponent(previewImage);
}
 
开发者ID:MyCollab,项目名称:mycollab,代码行数:18,代码来源:AttachmentPreviewView.java

示例11: mainLayout

import com.vaadin.ui.CssLayout; //导入方法依赖的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

示例12: createComponent

import com.vaadin.ui.CssLayout; //导入方法依赖的package包/类
@Override
protected Component createComponent() {

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

  return menuButtons;
}
 
开发者ID:Java-Publications,项目名称:vaadin-016-helloworld-14,代码行数:12,代码来源:MenuComponent.java

示例13: createComponent

import com.vaadin.ui.CssLayout; //导入方法依赖的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

示例14: init

import com.vaadin.ui.CssLayout; //导入方法依赖的package包/类
@Override
protected void init(VaadinRequest request) {

    final CssLayout root = new CssLayout();
    root.setSizeFull();
    setContent(root);

    Navigator navigator = new Navigator(this, root);
    navigator.addProvider(viewProvider);
}
 
开发者ID:fluoxa,项目名称:Iris,代码行数:11,代码来源:IrisUi.java

示例15: createPaperItemWrapper

import com.vaadin.ui.CssLayout; //导入方法依赖的package包/类
public static CssLayout createPaperItemWrapper(Component ... content) {
    CssLayout paperWrapper = new CssLayout();
    applyPaperItem(paperWrapper);
    paperWrapper.setSizeFull();
    Arrays.stream(content).forEach(c -> paperWrapper.addComponent(c));
    return paperWrapper;
}
 
开发者ID:alump,项目名称:GridStack,代码行数:8,代码来源:GridStackStyling.java


注:本文中的com.vaadin.ui.CssLayout.setSizeFull方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。