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


Java CssLayout.addStyleName方法代码示例

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


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

示例1: init

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

示例2: buildSparklines

import com.vaadin.ui.CssLayout; //导入方法依赖的package包/类
private Component buildSparklines() {
    CssLayout sparks = new CssLayout();
    sparks.addStyleName("sparks");
    sparks.setWidth("100%");
    Responsive.makeResponsive(sparks);

    SparklineChart s = new SparklineChart("Traffic", "K", "",
            DummyDataGenerator.chartColors[0], 22, 20, 80);
    sparks.addComponent(s);

    s = new SparklineChart("Revenue / Day", "M", "$",
            DummyDataGenerator.chartColors[2], 8, 89, 150);
    sparks.addComponent(s);

    s = new SparklineChart("Checkout Time", "s", "",
            DummyDataGenerator.chartColors[3], 10, 30, 120);
    sparks.addComponent(s);

    s = new SparklineChart("Theater Fill Rate", "%", "",
            DummyDataGenerator.chartColors[5], 50, 34, 100);
    sparks.addComponent(s);

    return sparks;
}
 
开发者ID:mcollovati,项目名称:vaadin-vertx-samples,代码行数:25,代码来源:DashboardView.java

示例3: buildLabels

import com.vaadin.ui.CssLayout; //导入方法依赖的package包/类
private Component buildLabels() {
    CssLayout labels = new CssLayout();
    labels.addStyleName("labels");

    Label welcome = new Label("Welcome");
    welcome.setSizeUndefined();
    welcome.addStyleName(ValoTheme.LABEL_H4);
    welcome.addStyleName(ValoTheme.LABEL_COLORED);
    labels.addComponent(welcome);

    Label title = new Label("QuickTickets Dashboard");
    title.setSizeUndefined();
    title.addStyleName(ValoTheme.LABEL_H3);
    title.addStyleName(ValoTheme.LABEL_LIGHT);
    labels.addComponent(title);
    return labels;
}
 
开发者ID:mcollovati,项目名称:vaadin-vertx-samples,代码行数:18,代码来源:LoginView.java

示例4: buildContent

import com.vaadin.ui.CssLayout; //导入方法依赖的package包/类
private Component buildContent() {
    final CssLayout menuContent = new CssLayout();
    menuContent.addStyleName("sidebar");
    menuContent.addStyleName(ValoTheme.MENU_PART);
    menuContent.addStyleName("no-vertical-drag-hints");
    menuContent.addStyleName("no-horizontal-drag-hints");
    menuContent.setWidth(null);
    menuContent.setHeight("100%");

    menuContent.addComponent(buildTitle());
    menuContent.addComponent(buildUserMenu());
    menuContent.addComponent(buildToggleButton());
    menuContent.addComponent(buildMenuItems());

    return menuContent;
}
 
开发者ID:mcollovati,项目名称:vaadin-vertx-samples,代码行数:17,代码来源:DashboardMenu.java

示例5: postInit

import com.vaadin.ui.CssLayout; //导入方法依赖的package包/类
@PostConstruct
private void postInit() {
    setSpacing(false);
    setMargin(false);
    setSizeFull();

    content = new CssLayout();
    content.setPrimaryStyleName("valo-content");
    content.addStyleName("v-scrollable");
    content.setWidth(100, Unit.PERCENTAGE);
    
    addComponents(appHeader,content);
    expand(content);
    addAttachListener(new AttachListener() {

        @Override
        public void attach(AttachEvent event) {
            Responsive.makeResponsive(getUI());
        }
    });
}
 
开发者ID:felixhusse,项目名称:bookery,代码行数:22,代码来源:AppLayout.java

示例6: LoginView

import com.vaadin.ui.CssLayout; //导入方法依赖的package包/类
public LoginView() {
    setSizeFull();
    CssLayout rootLayout = new CssLayout();
    rootLayout.addStyleName("login-screen");

    Component loginForm = buildLoginForm();
    
    VerticalLayout centeringLayout = new VerticalLayout();
    centeringLayout.setStyleName("centering-layout");
    centeringLayout.addComponent(loginForm);
    centeringLayout.setComponentAlignment(loginForm,Alignment.MIDDLE_CENTER);
    
    CssLayout loginInformation = buildLoginInformation();
    
    rootLayout.addComponent(centeringLayout);
    rootLayout.addComponent(loginInformation);
    
    setCompositionRoot(rootLayout);
    
}
 
开发者ID:felixhusse,项目名称:bookery,代码行数:21,代码来源:LoginView.java

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

示例8: addMenuItemComponent

import com.vaadin.ui.CssLayout; //导入方法依赖的package包/类
protected void addMenuItemComponent(final ViewDefinition viewDefinition, String parameters) {
    CssLayout dashboardWrapper = new CssLayout();
    dashboardWrapper.addStyleName("badgewrapper");
    dashboardWrapper.addStyleName(ValoTheme.MENU_ITEM);
    dashboardWrapper.setWidth(100.0f, Sizeable.Unit.PERCENTAGE);

    Label notificationsBadge = new Label();
    notificationsBadge.addStyleName(ValoTheme.MENU_BADGE);
    notificationsBadge.setWidthUndefined();
    notificationsBadge.setVisible(false);

    if (viewDefinition != null) {
        dashboardWrapper.addComponents(new ValoMenuItemButton(viewDefinition, parameters), notificationsBadge);
        menuItemsLayout.addComponent(dashboardWrapper);
    } else if (HybridbpmUI.getDeveloperMode()) {
        dashboardWrapper.addComponents(new ValoMenuAddViewButton(), notificationsBadge);
        menuItemsLayout.addComponent(dashboardWrapper);
    }
}
 
开发者ID:hybridbpm,项目名称:hybridbpm,代码行数:20,代码来源:MainMenu.java

示例9: buildLabels

import com.vaadin.ui.CssLayout; //导入方法依赖的package包/类
private Component buildLabels() {
	CssLayout labels = new CssLayout();
	labels.addStyleName("labels");

	Label welcome = new Label("Log in");
	welcome.setSizeUndefined();
	welcome.addStyleName(ValoTheme.LABEL_H4);
	welcome.addStyleName(ValoTheme.LABEL_COLORED);
	labels.addComponent(welcome);

	Label title = new Label("JAAS Demo");
	title.setSizeUndefined();
	title.addStyleName(ValoTheme.LABEL_H3);
	title.addStyleName(ValoTheme.LABEL_LIGHT);
	labels.addComponent(title);
	return labels;
}
 
开发者ID:KrishnaPhani,项目名称:KrishnasSpace,代码行数:18,代码来源:LoginUI.java

示例10: createRowItem

import com.vaadin.ui.CssLayout; //导入方法依赖的package包/类
protected final void createRowItem(final ResponsiveRow row, final Button button, final String description) {
	final CssLayout layout = new CssLayout();
	layout.addStyleName("v-layout-content-overview-panel-level2");
	Responsive.makeResponsive(layout);
	layout.setSizeUndefined();
	
	button.addStyleName("itembox");
	button.addStyleName("title");
	Responsive.makeResponsive(button);
	button.setWidth(100, Unit.PERCENTAGE);
	layout.addComponent(button);

	final Label descriptionLabel = new Label(description);
	descriptionLabel.addStyleName("itembox");
	Responsive.makeResponsive(descriptionLabel);
	descriptionLabel.setWidth(100, Unit.PERCENTAGE);
	layout.addComponent(descriptionLabel);

	row.addColumn().withDisplayRules(DISPLAY_SIZE_XS_DEVICE,DISPLAYS_SIZE_XM_DEVICE,DISPLAY_SIZE_MD_DEVICE,DISPLAY_SIZE_LG_DEVICE).withComponent(layout);
}
 
开发者ID:Hack23,项目名称:cia,代码行数:21,代码来源:AbstractPageModContentFactoryImpl.java

示例11: createRowComponent

import com.vaadin.ui.CssLayout; //导入方法依赖的package包/类
protected final void createRowComponent(final ResponsiveRow row, final Component component, final String description) {
	final CssLayout layout = new CssLayout();
	layout.addStyleName(".v-layout-content-pagemode-panel-level2");
	Responsive.makeResponsive(layout);
	layout.setSizeUndefined();

	final Label descriptionLabel = new Label(description);
	descriptionLabel.addStyleName("itembox");
	Responsive.makeResponsive(descriptionLabel);
	descriptionLabel.setWidth(100, Unit.PERCENTAGE);
	layout.addComponent(descriptionLabel);

	component.addStyleName("itembox");
	component.addStyleName("title");
	Responsive.makeResponsive(component);
	component.setWidth(100, Unit.PERCENTAGE);
	layout.addComponent(component);	

	row.addColumn().withDisplayRules(DISPLAY_SIZE_XS_DEVICE,DISPLAYS_SIZE_XM_DEVICE,DISPLAY_SIZE_MD_DEVICE,DISPLAY_SIZE_LG_DEVICE).withComponent(layout);
}
 
开发者ID:Hack23,项目名称:cia,代码行数:21,代码来源:AbstractPageModContentFactoryImpl.java

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

示例13: initLayout

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

示例14: createContentWrapper

import com.vaadin.ui.CssLayout; //导入方法依赖的package包/类
private Component createContentWrapper(String slotStyle, Component toolBar, Component content) {
    CssLayout slot = new CssLayout();
    slot.setWidth("100%");
    slot.addStyleName(slotStyle);

    CssLayout card = new CssLayout();
    card.setWidth("100%");
    card.addStyleName(ValoTheme.LAYOUT_CARD);
    
    if(toolBar instanceof SlotToolBar) {
    	((SlotToolBar)toolBar).setSlot(slot);
    }

    card.addComponents(toolBar, content);
    slot.addComponent(card);
    return slot;
}
 
开发者ID:xyfreemind,项目名称:trader,代码行数:18,代码来源:TradingAreaView.java

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


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