當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。