com.vaadin.ui.Panel.setStyleName()方法的使用及代码示例

x33g5p2x  于2022-01-26 转载在 其他  
字(10.2k)|赞(0)|评价(0)|浏览(163)

本文整理了Java中com.vaadin.ui.Panel.setStyleName()方法的一些代码示例,展示了Panel.setStyleName()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Panel.setStyleName()方法的具体详情如下:
包路径:com.vaadin.ui.Panel
类名称:Panel
方法名:setStyleName

Panel.setStyleName介绍

暂无

代码示例

代码示例来源:origin: eclipse/hawkbit

private Panel buildContent() {
  final Panel content = new Panel();
  content.setSizeFull();
  content.setStyleName("view-content");
  return content;
}

代码示例来源:origin: org.eclipse.hawkbit/hawkbit-ui

private Panel buildContent() {
  final Panel content = new Panel();
  content.setSizeFull();
  content.setStyleName("view-content");
  return content;
}

代码示例来源:origin: org.eclipse.hawkbit/hawkbit-ui

/**
 * 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(rolloutConfigurationView);
  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));
}

代码示例来源:origin: eclipse/hawkbit

/**
 * 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(rolloutConfigurationView);
  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));
}

代码示例来源:origin: org.ikasan/ikasan-dashboard-jar

this.searchPanel.setStyleName("dashboard");

代码示例来源:origin: org.ikasan/ikasan-dashboard-jar

private void createResultsPanel()
{
  this.resultsPanel = new Panel();
  this.resultsPanel.setSizeFull();
  this.resultsPanel.setStyleName("dashboard");
  
  this.resultsTable = new Table();
  this.resultsTable.setSizeFull();
  this.resultsTable.addContainerProperty("Name", String.class,  null);
  this.resultsTable.addContainerProperty("Description", String.class,  null);
  this.resultsTable.addItemClickListener(new ItemClickEvent.ItemClickListener() 
  {
    @Override
    public void itemClick(ItemClickEvent itemClickEvent) 
    {
     businessStream = (BusinessStream)itemClickEvent.getItemId();
     UI.getCurrent().removeWindow(PolicyAssociationBusinessStreamSearchWindow.this);
    }
  });
  
  HorizontalLayout layout = new HorizontalLayout();
  layout.addComponent(this.resultsTable);
  layout.setSizeFull();
  layout.setMargin(true);
  
  this.resultsPanel.setContent(layout);
}

代码示例来源:origin: org.ikasan/ikasan-dashboard-jar

p1.setStyleName("dashboard");
p1.setWidth("90%");
p1.setHeight("90%");
p2.setStyleName("dashboard");
p2.setWidth("90%");
p2.setHeight("90%");
p3.setStyleName("dashboard");
p3.setWidth("90%");
p3.setHeight("90%");
p4.setStyleName("dashboard");
p4.setWidth("90%");
p4.setHeight("90%");
p5.setStyleName("dashboard");
p5.setWidth("90%");
p5.setHeight("90%");
p6.setStyleName("dashboard");
p6.setWidth("90%");
p6.setHeight("90%");

代码示例来源:origin: org.ikasan/ikasan-dashboard-jar

private void createResultsPanel()
{
  this.resultsPanel = new Panel();
  this.resultsPanel.setSizeFull();
  this.resultsPanel.setStyleName("dashboard");
  
  this.resultsTable = new FilterTable();
  this.resultsTable.setFilterBarVisible(true);
  this.resultsTable.setSizeFull();
  this.container = this.buildContainer();
  this.resultsTable.setContainerDataSource(this.container);
  
  this.resultsTable.addItemClickListener(new ItemClickEvent.ItemClickListener() 
  {
    @Override
    public void itemClick(ItemClickEvent itemClickEvent) 
    {
     flow = (Flow)itemClickEvent.getItemId();
     UI.getCurrent().removeWindow(PolicyAssociationFlowSearchWindow.this);
    }
  });
  
  HorizontalLayout layout = new HorizontalLayout();
  layout.addComponent(this.resultsTable);
  layout.setSizeFull();
  layout.setMargin(true);
  
  this.resultsPanel.setContent(layout);
}

代码示例来源:origin: org.ikasan/ikasan-dashboard-jar

private void createResultsPanel()
{
  this.resultsPanel = new Panel();
  this.resultsPanel.setSizeFull();
  this.resultsPanel.setStyleName("dashboard");
  
  this.resultsTable = new FilterTable();
  this.resultsTable.setSizeFull();
  this.container = buildContainer();
  this.resultsTable.setContainerDataSource(container);
  this.resultsTable.setFilterBarVisible(true);
  
  this.resultsTable.addItemClickListener(new ItemClickEvent.ItemClickListener() 
  {
    @Override
    public void itemClick(ItemClickEvent itemClickEvent) 
    {
     module = (Module)itemClickEvent.getItemId();
     UI.getCurrent().removeWindow(PolicyAssociationModuleSearchWindow.this);
    }
  });
  
  HorizontalLayout layout = new HorizontalLayout();
  layout.addComponent(this.resultsTable);
  layout.setSizeFull();
  layout.setMargin(true);
  
  this.resultsPanel.setContent(layout);
}

代码示例来源:origin: info.magnolia.ui/magnolia-ui-framework

shortcutPanel.setStyleName("shortcut-panel");
shortcutPanel.setWidth(null);
shortcutPanel.setContent(notification.asVaadinComponent());

代码示例来源:origin: org.ikasan/ikasan-dashboard-jar

this.searchPanel.setStyleName("dashboard");

代码示例来源:origin: org.ikasan/ikasan-dashboard-jar

this.searchPanel.setStyleName("dashboard");

代码示例来源:origin: org.aperteworkflow/editor

private VerticalLayout buildWidgetEditorTabContent() {
  I18NSource messages = I18NSource.ThreadUtil.getThreadI18nSource();
  VerticalLayout availableWidgetsLayout = new VerticalLayout();
  availableWidgetsLayout.setSpacing(true);
  availableWidgetsLayout.setWidth("100%");
  availableWidgetsLayout.addComponent(availableWidgetsPane);
  VerticalLayout stepLayout = new VerticalLayout();
  stepLayout.setWidth("100%");
  stepLayout.setSpacing(true);
  stepLayout.setMargin(true);
  stepLayout.addComponent(new Label(messages.getMessage("userstep.editor.widgets.instructions"), Label.CONTENT_XHTML));
  stepLayout.addComponent(availableWidgetsLayout);
  Panel treePanel = new Panel();
  treePanel.setStyleName(Reindeer.PANEL_LIGHT);
  treePanel.addComponent(stepTree);
  treePanel.setWidth("245px");
  HorizontalLayout treeAndParamLayout = new HorizontalLayout();
  treeAndParamLayout.setWidth("100%");
  treeAndParamLayout.setSpacing(true);
  treeAndParamLayout.addComponent(treePanel);
  treeAndParamLayout.addComponent(paramPanel);
  treeAndParamLayout.setExpandRatio(paramPanel, 1.0f);
  stepLayout.addComponent(treeAndParamLayout);
  stepLayout.setExpandRatio(treeAndParamLayout, 1.0f);
  return stepLayout;
}

代码示例来源:origin: info.magnolia.ui/magnolia-ui-framework

@Override
public void openAlert(MessageStyleType type, String title, View body, String okButton, final AlertCallback callback) {
  final BaseDialog dialog = new LightDialog();
  dialog.addStyleName(type.getCssClass());
  dialog.addStyleName("alert");
  dialog.setCaption(title);
  CompositeIcon icon = (CompositeIcon) Classes.getClassFactory().newInstance(type.getIconClass());
  icon.setStyleName("dialog-icon");
  dialog.setHeaderToolbar(icon);
  dialog.showCloseButton();
  dialog.setContent(body.asVaadinComponent());
  Panel shortcutPanel = new Panel();
  shortcutPanel.setStyleName("shortcut-panel");
  shortcutPanel.setHeight(100, Unit.PERCENTAGE);
  shortcutPanel.setWidth(100, Unit.PERCENTAGE);
  shortcutPanel.setContent(dialog);
  final OverlayCloser overlayCloser = openOverlay(new ViewAdapter(shortcutPanel), ModalityLevel.LIGHT);
  final ShortcutListener escapeShortcut = new ShortcutListener("Escape shortcut", ShortcutAction.KeyCode.ESCAPE, null) {
    @Override
    public void handleAction(Object sender, Object target) {
      callback.onOk();
      dialog.closeSelf();
    }
  };
  shortcutPanel.addShortcutListener(escapeShortcut);
  addOkHandler(dialog, okButton, overlayCloser, callback);
  dialog.addDialogCloseHandler(createCloseHandler(overlayCloser));
}

代码示例来源:origin: info.magnolia.ui/magnolia-ui-framework

shortcutPanel.setStyleName("shortcut-panel");
shortcutPanel.setHeight(100, Unit.PERCENTAGE);
shortcutPanel.setWidth(100, Unit.PERCENTAGE);

代码示例来源:origin: org.ikasan/ikasan-dashboard-jar

protected Panel createTrueFalsePanel(ConfigurationParameter parameter, Validator validator)
  paramPanel.setStyleName("dashboard");
  paramPanel.setWidth("100%");

代码示例来源:origin: org.eclipse.hawkbit/hawkbit-ui

if (isShortCutKeysRequired()) {
  final Panel tablePanel = new Panel();
  tablePanel.setStyleName("table-panel");
  tablePanel.setHeight(100.0F, Unit.PERCENTAGE);
  tablePanel.setContent(table);

代码示例来源:origin: eclipse/hawkbit

if (isShortCutKeysRequired()) {
  final Panel tablePanel = new Panel();
  tablePanel.setStyleName("table-panel");
  tablePanel.setHeight(100.0F, Unit.PERCENTAGE);
  tablePanel.setContent(table);

代码示例来源:origin: org.aperteworkflow/base-widgets

commentsPanel.setStyleName("borderless light");
commentsPanel.setWidth("100%");

代码示例来源:origin: org.aperteworkflow/base-widgets

} else {
  Panel p = new Panel();
  p.setStyleName(Reindeer.PANEL_LIGHT);
  p.setWidth("100%");
  p.setHeight("240px");

相关文章