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

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

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

Panel.addStyleName介绍

暂无

代码示例

代码示例来源:origin: com.holon-platform.vaadin7/holon-vaadin

@Override
public PanelBuilder borderless() {
  getInstance().addStyleName(ValoTheme.PANEL_BORDERLESS);
  getInstance().addStyleName(Reindeer.PANEL_LIGHT);
  return builder();
}

代码示例来源:origin: com.holon-platform.vaadin/holon-vaadin

@Override
public PanelBuilder borderless() {
  getInstance().addStyleName(ValoTheme.PANEL_BORDERLESS);
  return builder();
}

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

protected void init()
{
  this.tabsheetPanel = new Panel();
  this.tabsheetPanel.addStyleName(ValoTheme.PANEL_BORDERLESS);
  this.tabsheetPanel.setSizeFull();
  super.setSizeFull();
}

代码示例来源:origin: org.activiti/activiti-explorer

protected void initAddSubTaskPanel(HorizontalLayout headerLayout) {
 // The add button is placed in a panel, so we can catch 'enter' and 'escape' events
 addSubTaskPanel = new Panel();
 addSubTaskPanel.setContent(new VerticalLayout());
 addSubTaskPanel.setSizeUndefined();
 addSubTaskPanel.addStyleName(Reindeer.PANEL_LIGHT);
 addSubTaskPanel.addStyleName("no-border");
 headerLayout.addComponent(addSubTaskPanel);
 
 initAddSubTaskPanelKeyboardActions();
 initAddButton();
}

代码示例来源:origin: OpenNMS/opennms

private Panel createPanel(Component content, String caption) {
    Panel panel = new Panel();
    panel.setSizeFull();
    panel.setCaption(caption);
    panel.setContent(content);
    panel.addStyleName("novscroll");

    return panel;
  }
}

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

@Override
public com.vaadin.ui.Component getPopupComponent()
{
  Panel popupPanel = new Panel();
  popupPanel.addStyleName(ValoTheme.PANEL_BORDERLESS);
  popupPanel.setHeight("300px");
  popupPanel.setWidth("300px");
  popupViewLayout.setImmediate(true);
  popupPanel.setContent(popupViewLayout);
  popupPanel.setImmediate(true);
  return popupPanel;
}

代码示例来源:origin: org.activiti/activiti-explorer

protected void initInformationPanel() {
 Panel infoPanel = new Panel();
 infoPanel.addStyleName(Reindeer.PANEL_LIGHT);
 infoPanel.setSizeFull();
 
 profilePanelLayout.addComponent(infoPanel);
 profilePanelLayout.setExpandRatio(infoPanel, 1.0f); // info panel should take all the remaining width available
 
 // All the information sections are put under each other in a vertical layout
 this.infoPanelLayout = new VerticalLayout();
 infoPanel.setContent(infoPanelLayout);
 
 initAboutSection();
 initContactSection();
 
}

代码示例来源:origin: peholmst/vaadin4spring

@Override
  public void createSection(Accordion compositionRoot, SideBarSectionDescriptor descriptor, Collection<SideBarItemDescriptor> itemDescriptors) {
    final Panel panel = new Panel();
    panel.addStyleName(SIDE_BAR_SECTION_STYLE);
    panel.setSizeFull();
    final VerticalLayout layout = new VerticalLayout();
    panel.setContent(layout);
    for (SideBarItemDescriptor item : itemDescriptors) {
      layout.addComponent(itemComponentFactory.createItemComponent(item));
    }
    compositionRoot.addTab(panel, descriptor.getCaption());
  }
}

代码示例来源:origin: org.opencms/opencms-core

/**
 * @see org.opencms.ui.dialogs.history.diff.I_CmsDiffProvider#diff(org.opencms.file.CmsObject, org.opencms.gwt.shared.CmsHistoryResourceBean, org.opencms.gwt.shared.CmsHistoryResourceBean)
 */
public Optional<Component> diff(CmsObject cms, CmsHistoryResourceBean v1, CmsHistoryResourceBean v2) {
  Panel panel = new Panel("");
  panel.addStyleName(ValoTheme.PANEL_BORDERLESS);
  HorizontalLayout hl = new HorizontalLayout();
  panel.setContent(hl);
  hl.addComponent(createButton(cms, v1));
  hl.addComponent(createButton(cms, v2));
  VerticalLayout outerContainer = new VerticalLayout();
  outerContainer.addComponent(hl);
  outerContainer.setComponentAlignment(hl, Alignment.MIDDLE_RIGHT);
  outerContainer.setMargin(true);
  hl.setSpacing(true);
  return Optional.fromNullable((Component)outerContainer);
}

代码示例来源:origin: com.holon-platform.vaadin/holon-vaadin

/**
 * Constructor
 */
public AbstractDialog() {
  super();
  // defaults
  setModal(true);
  setResizable(false);
  setDraggable(false);
  setClosable(false);
  // style name
  addStyleName("h-dialog");
  // build
  content = new Panel();
  content.setWidth("100%");
  content.addStyleName(ValoTheme.PANEL_BORDERLESS);
  content.addStyleName("h-dialog-content");
  actions = new HorizontalLayout();
  actions.setWidth("100%");
  actions.setSpacing(true);
  actions.addStyleName(ValoTheme.WINDOW_BOTTOM_TOOLBAR);
  actions.addStyleName("h-dialog-actions");
  root = new VerticalLayout();
  root.addComponent(content);
  root.addComponent(actions);
  setContent(root);
}

代码示例来源:origin: com.holon-platform.vaadin7/holon-vaadin

/**
 * Constructor
 */
public AbstractDialog() {
  super();
  // defaults
  setModal(true);
  setResizable(false);
  setDraggable(false);
  setClosable(false);
  // style name
  addStyleName("h-dialog");
  // build
  content = new Panel();
  content.setWidth("100%");
  content.addStyleName(ValoTheme.PANEL_BORDERLESS);
  content.addStyleName("h-dialog-content");
  actions = new HorizontalLayout();
  actions.setWidth("100%");
  actions.setSpacing(true);
  actions.addStyleName(ValoTheme.WINDOW_BOTTOM_TOOLBAR);
  actions.addStyleName("h-dialog-actions");
  root = new VerticalLayout();
  root.addComponent(content);
  root.addComponent(actions);
  setContent(root);
}

代码示例来源:origin: org.opencms/opencms-core

/**
 * Creates a resource list panel.<p>
 *
 * @param caption the caption to use
 * @param resources the resources
 *
 * @return the panel
 */
protected Panel createResourceListPanel(String caption, List<CmsResource> resources) {
  Panel result = new Panel(caption);
  result.addStyleName("v-scrollable");
  result.setSizeFull();
  VerticalLayout resourcePanel = new VerticalLayout();
  result.setContent(resourcePanel);
  resourcePanel.addStyleName(OpenCmsTheme.REDUCED_MARGIN);
  resourcePanel.addStyleName(OpenCmsTheme.REDUCED_SPACING);
  resourcePanel.setSpacing(true);
  resourcePanel.setMargin(true);
  for (CmsResource resource : resources) {
    resourcePanel.addComponent(new CmsResourceInfo(resource));
  }
  return result;
}

代码示例来源:origin: org.activiti/activiti-explorer

imagePanel.addStyleName(Reindeer.PANEL_LIGHT);
imagePanel.setWidth(100, UNITS_PERCENTAGE);
imagePanel.setHeight("100%");

代码示例来源:origin: org.activiti/activiti-explorer

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);
}

代码示例来源:origin: org.opencms/opencms-core

/**
 * Creates the main component of the editor with all sub-components.
 * @return the completely filled main component of the editor.
 * @throws IOException thrown if setting the table's content data source fails.
 * @throws CmsException thrown if setting the table's content data source fails.
 */
private Component createMainComponent() throws IOException, CmsException {
  VerticalLayout mainComponent = new VerticalLayout();
  mainComponent.setSizeFull();
  mainComponent.addStyleName("o-message-bundle-editor");
  m_table = createTable();
  Panel navigator = new Panel();
  navigator.setSizeFull();
  navigator.setContent(m_table);
  navigator.addActionHandler(new CmsMessageBundleEditorTypes.TableKeyboardHandler(m_table));
  navigator.addStyleName("v-panel-borderless");
  mainComponent.addComponent(m_options.getOptionsComponent());
  mainComponent.addComponent(navigator);
  mainComponent.setExpandRatio(navigator, 1f);
  m_options.updateShownOptions(m_model.hasMasterMode(), m_model.canAddKeys());
  return mainComponent;
}

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

protected void init()
{
  this.tabsheetPanel = new Panel();
  this.tabsheetPanel.addStyleName(ValoTheme.PANEL_BORDERLESS);
  this.tabsheetPanel.setSizeFull();
  
  this.createModuleTreePanel();
  
  this.setWidth("100%");
  this.setHeight("100%");
  
  HorizontalSplitPanel hsplit = new HorizontalSplitPanel();
  hsplit.setStyleName(ValoTheme.SPLITPANEL_LARGE);
  HorizontalLayout leftLayout = new HorizontalLayout();
  leftLayout.setSizeFull();
  leftLayout.setMargin(true);
  leftLayout.addComponent(this.topologyTreePanel);
  hsplit.setFirstComponent(leftLayout);
  HorizontalLayout rightLayout = new HorizontalLayout();
  rightLayout.setSizeFull();
  rightLayout.setMargin(true);
  rightLayout.addComponent(this.tabsheetPanel);
  hsplit.setSecondComponent(rightLayout);
  hsplit.setSplitPosition(30, Unit.PERCENTAGE);
  this.flowStates = this.topologyCache.getStateMap();
  
  this.setContent(hsplit);
}

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

protected void init()
{
  this.tabsheetPanel = new Panel();
  this.tabsheetPanel.addStyleName(ValoTheme.PANEL_BORDERLESS);
  this.tabsheetPanel.setSizeFull();
  this.createTopologyTreePanel();
  this.setWidth("100%");
  this.setHeight("100%");
  this.businessStreamCombo = new ComboBox();
  HorizontalSplitPanel hsplit = new HorizontalSplitPanel();
  hsplit.setStyleName(ValoTheme.SPLITPANEL_LARGE);
  HorizontalLayout leftLayout = new HorizontalLayout();
  leftLayout.setSizeFull();
  leftLayout.setMargin(true);
  leftLayout.addComponent(this.topologyTreePanel);
  hsplit.setFirstComponent(leftLayout);
  HorizontalLayout rightLayout = new HorizontalLayout();
  rightLayout.setSizeFull();
  rightLayout.setMargin(true);
  rightLayout.addComponent(this.tabsheetPanel);
  hsplit.setSecondComponent(rightLayout);
  hsplit.setSplitPosition(300, Unit.PIXELS);
  this.flowStates = this.topologyCache.getStateMap();
  this.setContent(hsplit);
}

代码示例来源:origin: uk.q3c.krail/krail

@Override
public void doBuild(ViewChangeBusMessage event) {
  super.doBuild(event);
  centrePanel = new Panel();
  centrePanel.addStyleName(ChameleonTheme.PANEL_BUBBLE);
  centrePanel.setSizeUndefined();
  VerticalLayout vl = new VerticalLayout();
  centrePanel.setContent(vl);
  vl.setSpacing(true);
  vl.setSizeUndefined();
  label = new Label();
  usernameBox = new TextField();
  passwordBox = new PasswordField();
  Label demoInfoLabel = new Label("for this demo, enter any user name, and a password of 'password'");
  Label demoInfoLabel2 = new Label("In a real application your Shiro Realm implementation defines how to authenticate");
  submitButton = new Button();
  submitButton.addClickListener(this);
  statusMsgLabel = new Label("Please enter your username and password");
  vl.addComponent(label);
  vl.addComponent(demoInfoLabel);
  vl.addComponent(demoInfoLabel2);
  vl.addComponent(usernameBox);
  vl.addComponent(passwordBox);
  vl.addComponent(submitButton);
  vl.addComponent(statusMsgLabel);
  setMiddleCentre(centrePanel);
}

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

private void init() {
  final Panel rootPanel = new Panel();
  rootPanel.setSizeFull();
  rootPanel.addStyleName("config-panel");
  final VerticalLayout vLayout = new VerticalLayout();
  vLayout.setMargin(true);
  vLayout.setSizeFull();
  final Label header = new Label(i18n.getMessage("configuration.rollout.title"));
  header.addStyleName("config-panel-header");
  vLayout.addComponent(header);
  final HorizontalLayout hLayout = new HorizontalLayout();
  hLayout.setSpacing(true);
  hLayout.setImmediate(true);
  approvalCheckbox = SPUIComponentProvider.getCheckBox("", "", null, false, "");
  approvalCheckbox.setId(UIComponentIdProvider.ROLLOUT_APPROVAL_ENABLED_CHECKBOX);
  approvalCheckbox.setValue(approvalConfigurationItem.isConfigEnabled());
  approvalCheckbox.addValueChangeListener(this);
  approvalConfigurationItem.addChangeListener(this);
  hLayout.addComponent(approvalCheckbox);
  hLayout.addComponent(approvalConfigurationItem);
  final Link linkToApprovalHelp = SPUIComponentProvider
      .getHelpLink(uiProperties.getLinks().getDocumentation().getRollout());
  hLayout.addComponent(linkToApprovalHelp);
  hLayout.setComponentAlignment(linkToApprovalHelp, Alignment.BOTTOM_RIGHT);
  vLayout.addComponent(hLayout);
  rootPanel.setContent(vLayout);
  setCompositionRoot(rootPanel);
}

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

private void init() {
  final Panel rootPanel = new Panel();
  rootPanel.setSizeFull();
  rootPanel.addStyleName("config-panel");
  final VerticalLayout vLayout = new VerticalLayout();
  vLayout.setMargin(true);
  vLayout.setSizeFull();
  final Label header = new Label(i18n.getMessage("configuration.rollout.title"));
  header.addStyleName("config-panel-header");
  vLayout.addComponent(header);
  final HorizontalLayout hLayout = new HorizontalLayout();
  hLayout.setSpacing(true);
  hLayout.setImmediate(true);
  approvalCheckbox = SPUIComponentProvider.getCheckBox("", "", null, false, "");
  approvalCheckbox.setId(UIComponentIdProvider.ROLLOUT_APPROVAL_ENABLED_CHECKBOX);
  approvalCheckbox.setValue(approvalConfigurationItem.isConfigEnabled());
  approvalCheckbox.addValueChangeListener(this);
  approvalConfigurationItem.addChangeListener(this);
  hLayout.addComponent(approvalCheckbox);
  hLayout.addComponent(approvalConfigurationItem);
  final Link linkToApprovalHelp = SPUIComponentProvider
      .getHelpLink(i18n, uiProperties.getLinks().getDocumentation().getRollout());
  hLayout.addComponent(linkToApprovalHelp);
  hLayout.setComponentAlignment(linkToApprovalHelp, Alignment.BOTTOM_RIGHT);
  vLayout.addComponent(hLayout);
  rootPanel.setContent(vLayout);
  setCompositionRoot(rootPanel);
}

相关文章