本文整理汇总了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);
}
示例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;
}
示例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;
}
示例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;
}
示例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());
}
});
}
示例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);
}
示例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();
}
示例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);
}
}
示例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;
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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;
}
示例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();
}