本文整理汇总了Java中com.vaadin.ui.Panel.setStyleName方法的典型用法代码示例。如果您正苦于以下问题:Java Panel.setStyleName方法的具体用法?Java Panel.setStyleName怎么用?Java Panel.setStyleName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.vaadin.ui.Panel
的用法示例。
在下文中一共展示了Panel.setStyleName方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: init
import com.vaadin.ui.Panel; //导入方法依赖的package包/类
/**
* Init method adds all Configuration Views to the list of Views.
*/
@PostConstruct
public void init() {
if (defaultDistributionSetTypeLayout.getComponentCount() > 0) {
configurationViews.add(defaultDistributionSetTypeLayout);
}
configurationViews.add(repositoryConfigurationView);
configurationViews.add(authenticationConfigurationView);
configurationViews.add(pollingConfigurationView);
if (customConfigurationViews != null) {
configurationViews.addAll(
customConfigurationViews.stream().filter(ConfigurationGroup::show).collect(Collectors.toList()));
}
final Panel rootPanel = new Panel();
rootPanel.setStyleName("tenantconfig-root");
final VerticalLayout rootLayout = new VerticalLayout();
rootLayout.setSizeFull();
rootLayout.setMargin(true);
rootLayout.setSpacing(true);
configurationViews.forEach(rootLayout::addComponent);
final HorizontalLayout buttonContent = saveConfigurationButtonsLayout();
rootLayout.addComponent(buttonContent);
rootLayout.setComponentAlignment(buttonContent, Alignment.BOTTOM_LEFT);
rootPanel.setContent(rootLayout);
setCompositionRoot(rootPanel);
configurationViews.forEach(view -> view.addChangeListener(this));
}
示例2: buildLayout
import com.vaadin.ui.Panel; //导入方法依赖的package包/类
private void buildLayout() {
setSizeFull();
setSpacing(true);
setMargin(false);
setStyleName("group");
final VerticalLayout tableHeaderLayout = new VerticalLayout();
tableHeaderLayout.setSizeFull();
tableHeaderLayout.setSpacing(false);
tableHeaderLayout.setMargin(false);
tableHeaderLayout.setStyleName("table-layout");
tableHeaderLayout.addComponent(tableHeader);
tableHeaderLayout.setComponentAlignment(tableHeader, Alignment.TOP_CENTER);
if (isShortCutKeysRequired()) {
final Panel tablePanel = new Panel();
tablePanel.setStyleName("table-panel");
tablePanel.setHeight(100.0F, Unit.PERCENTAGE);
tablePanel.setContent(table);
tablePanel.addActionHandler(getShortCutKeysHandler());
tablePanel.addStyleName(ValoTheme.PANEL_BORDERLESS);
tableHeaderLayout.addComponent(tablePanel);
tableHeaderLayout.setComponentAlignment(tablePanel, Alignment.TOP_CENTER);
tableHeaderLayout.setExpandRatio(tablePanel, 1.0F);
} else {
tableHeaderLayout.addComponent(table);
tableHeaderLayout.setComponentAlignment(table, Alignment.TOP_CENTER);
tableHeaderLayout.setExpandRatio(table, 1.0F);
}
addComponent(tableHeaderLayout);
addComponent(detailsLayout);
setComponentAlignment(tableHeaderLayout, Alignment.TOP_CENTER);
setComponentAlignment(detailsLayout, Alignment.TOP_CENTER);
setExpandRatio(tableHeaderLayout, 1.0F);
}
示例3: buildContent
import com.vaadin.ui.Panel; //导入方法依赖的package包/类
private Panel buildContent() {
final Panel content = new Panel();
content.setSizeFull();
content.setStyleName("view-content");
return content;
}