本文整理匯總了Java中com.vaadin.ui.VerticalLayout.setStyleName方法的典型用法代碼示例。如果您正苦於以下問題:Java VerticalLayout.setStyleName方法的具體用法?Java VerticalLayout.setStyleName怎麽用?Java VerticalLayout.setStyleName使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類com.vaadin.ui.VerticalLayout
的用法示例。
在下文中一共展示了VerticalLayout.setStyleName方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: mainLayout
import com.vaadin.ui.VerticalLayout; //導入方法依賴的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;
}
示例2: createTab
import com.vaadin.ui.VerticalLayout; //導入方法依賴的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;
}
示例3: createComponent
import com.vaadin.ui.VerticalLayout; //導入方法依賴的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;
}
示例4: getInfoLabels
import com.vaadin.ui.VerticalLayout; //導入方法依賴的package包/類
private VerticalLayout getInfoLabels(List<String> infos) {
VerticalLayout layout = new VerticalLayout();
infos.stream()
.filter(i -> !StringUtils.isEmpty(i))
.forEach(info -> layout.addComponent(new Label(info)));
layout.setStyleName("persephone-card-label");
layout.setMargin(false);
return layout;
}