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

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

本文整理了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

  1. @Override
  2. public PanelBuilder borderless() {
  3. getInstance().addStyleName(ValoTheme.PANEL_BORDERLESS);
  4. getInstance().addStyleName(Reindeer.PANEL_LIGHT);
  5. return builder();
  6. }

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

  1. @Override
  2. public PanelBuilder borderless() {
  3. getInstance().addStyleName(ValoTheme.PANEL_BORDERLESS);
  4. return builder();
  5. }

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

  1. protected void init()
  2. {
  3. this.tabsheetPanel = new Panel();
  4. this.tabsheetPanel.addStyleName(ValoTheme.PANEL_BORDERLESS);
  5. this.tabsheetPanel.setSizeFull();
  6. super.setSizeFull();
  7. }

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

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

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

  1. private Panel createPanel(Component content, String caption) {
  2. Panel panel = new Panel();
  3. panel.setSizeFull();
  4. panel.setCaption(caption);
  5. panel.setContent(content);
  6. panel.addStyleName("novscroll");
  7. return panel;
  8. }
  9. }

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

  1. @Override
  2. public com.vaadin.ui.Component getPopupComponent()
  3. {
  4. Panel popupPanel = new Panel();
  5. popupPanel.addStyleName(ValoTheme.PANEL_BORDERLESS);
  6. popupPanel.setHeight("300px");
  7. popupPanel.setWidth("300px");
  8. popupViewLayout.setImmediate(true);
  9. popupPanel.setContent(popupViewLayout);
  10. popupPanel.setImmediate(true);
  11. return popupPanel;
  12. }

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

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

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

  1. @Override
  2. public void createSection(Accordion compositionRoot, SideBarSectionDescriptor descriptor, Collection<SideBarItemDescriptor> itemDescriptors) {
  3. final Panel panel = new Panel();
  4. panel.addStyleName(SIDE_BAR_SECTION_STYLE);
  5. panel.setSizeFull();
  6. final VerticalLayout layout = new VerticalLayout();
  7. panel.setContent(layout);
  8. for (SideBarItemDescriptor item : itemDescriptors) {
  9. layout.addComponent(itemComponentFactory.createItemComponent(item));
  10. }
  11. compositionRoot.addTab(panel, descriptor.getCaption());
  12. }
  13. }

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

  1. /**
  2. * @see org.opencms.ui.dialogs.history.diff.I_CmsDiffProvider#diff(org.opencms.file.CmsObject, org.opencms.gwt.shared.CmsHistoryResourceBean, org.opencms.gwt.shared.CmsHistoryResourceBean)
  3. */
  4. public Optional<Component> diff(CmsObject cms, CmsHistoryResourceBean v1, CmsHistoryResourceBean v2) {
  5. Panel panel = new Panel("");
  6. panel.addStyleName(ValoTheme.PANEL_BORDERLESS);
  7. HorizontalLayout hl = new HorizontalLayout();
  8. panel.setContent(hl);
  9. hl.addComponent(createButton(cms, v1));
  10. hl.addComponent(createButton(cms, v2));
  11. VerticalLayout outerContainer = new VerticalLayout();
  12. outerContainer.addComponent(hl);
  13. outerContainer.setComponentAlignment(hl, Alignment.MIDDLE_RIGHT);
  14. outerContainer.setMargin(true);
  15. hl.setSpacing(true);
  16. return Optional.fromNullable((Component)outerContainer);
  17. }

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

  1. /**
  2. * Constructor
  3. */
  4. public AbstractDialog() {
  5. super();
  6. // defaults
  7. setModal(true);
  8. setResizable(false);
  9. setDraggable(false);
  10. setClosable(false);
  11. // style name
  12. addStyleName("h-dialog");
  13. // build
  14. content = new Panel();
  15. content.setWidth("100%");
  16. content.addStyleName(ValoTheme.PANEL_BORDERLESS);
  17. content.addStyleName("h-dialog-content");
  18. actions = new HorizontalLayout();
  19. actions.setWidth("100%");
  20. actions.setSpacing(true);
  21. actions.addStyleName(ValoTheme.WINDOW_BOTTOM_TOOLBAR);
  22. actions.addStyleName("h-dialog-actions");
  23. root = new VerticalLayout();
  24. root.addComponent(content);
  25. root.addComponent(actions);
  26. setContent(root);
  27. }

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

  1. /**
  2. * Constructor
  3. */
  4. public AbstractDialog() {
  5. super();
  6. // defaults
  7. setModal(true);
  8. setResizable(false);
  9. setDraggable(false);
  10. setClosable(false);
  11. // style name
  12. addStyleName("h-dialog");
  13. // build
  14. content = new Panel();
  15. content.setWidth("100%");
  16. content.addStyleName(ValoTheme.PANEL_BORDERLESS);
  17. content.addStyleName("h-dialog-content");
  18. actions = new HorizontalLayout();
  19. actions.setWidth("100%");
  20. actions.setSpacing(true);
  21. actions.addStyleName(ValoTheme.WINDOW_BOTTOM_TOOLBAR);
  22. actions.addStyleName("h-dialog-actions");
  23. root = new VerticalLayout();
  24. root.addComponent(content);
  25. root.addComponent(actions);
  26. setContent(root);
  27. }

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

  1. /**
  2. * Creates a resource list panel.<p>
  3. *
  4. * @param caption the caption to use
  5. * @param resources the resources
  6. *
  7. * @return the panel
  8. */
  9. protected Panel createResourceListPanel(String caption, List<CmsResource> resources) {
  10. Panel result = new Panel(caption);
  11. result.addStyleName("v-scrollable");
  12. result.setSizeFull();
  13. VerticalLayout resourcePanel = new VerticalLayout();
  14. result.setContent(resourcePanel);
  15. resourcePanel.addStyleName(OpenCmsTheme.REDUCED_MARGIN);
  16. resourcePanel.addStyleName(OpenCmsTheme.REDUCED_SPACING);
  17. resourcePanel.setSpacing(true);
  18. resourcePanel.setMargin(true);
  19. for (CmsResource resource : resources) {
  20. resourcePanel.addComponent(new CmsResourceInfo(resource));
  21. }
  22. return result;
  23. }

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

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

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

  1. public DetailPanel() {
  2. setSizeFull();
  3. addStyleName(ExplorerLayout.STYLE_DETAIL_PANEL);
  4. setMargin(true);
  5. CssLayout cssLayout = new CssLayout(); // Needed for rounded corners
  6. cssLayout.addStyleName(ExplorerLayout.STYLE_DETAIL_PANEL);
  7. cssLayout.setSizeFull();
  8. super.addComponent(cssLayout);
  9. mainPanel = new Panel();
  10. mainPanel.addStyleName(Reindeer.PANEL_LIGHT);
  11. mainPanel.setSizeFull();
  12. cssLayout.addComponent(mainPanel);
  13. // Use default layout
  14. VerticalLayout verticalLayout = new VerticalLayout();
  15. verticalLayout.setWidth(100, UNITS_PERCENTAGE);
  16. verticalLayout.setMargin(true);
  17. mainPanel.setContent(verticalLayout);
  18. }

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

  1. /**
  2. * Creates the main component of the editor with all sub-components.
  3. * @return the completely filled main component of the editor.
  4. * @throws IOException thrown if setting the table's content data source fails.
  5. * @throws CmsException thrown if setting the table's content data source fails.
  6. */
  7. private Component createMainComponent() throws IOException, CmsException {
  8. VerticalLayout mainComponent = new VerticalLayout();
  9. mainComponent.setSizeFull();
  10. mainComponent.addStyleName("o-message-bundle-editor");
  11. m_table = createTable();
  12. Panel navigator = new Panel();
  13. navigator.setSizeFull();
  14. navigator.setContent(m_table);
  15. navigator.addActionHandler(new CmsMessageBundleEditorTypes.TableKeyboardHandler(m_table));
  16. navigator.addStyleName("v-panel-borderless");
  17. mainComponent.addComponent(m_options.getOptionsComponent());
  18. mainComponent.addComponent(navigator);
  19. mainComponent.setExpandRatio(navigator, 1f);
  20. m_options.updateShownOptions(m_model.hasMasterMode(), m_model.canAddKeys());
  21. return mainComponent;
  22. }

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

  1. protected void init()
  2. {
  3. this.tabsheetPanel = new Panel();
  4. this.tabsheetPanel.addStyleName(ValoTheme.PANEL_BORDERLESS);
  5. this.tabsheetPanel.setSizeFull();
  6. this.createModuleTreePanel();
  7. this.setWidth("100%");
  8. this.setHeight("100%");
  9. HorizontalSplitPanel hsplit = new HorizontalSplitPanel();
  10. hsplit.setStyleName(ValoTheme.SPLITPANEL_LARGE);
  11. HorizontalLayout leftLayout = new HorizontalLayout();
  12. leftLayout.setSizeFull();
  13. leftLayout.setMargin(true);
  14. leftLayout.addComponent(this.topologyTreePanel);
  15. hsplit.setFirstComponent(leftLayout);
  16. HorizontalLayout rightLayout = new HorizontalLayout();
  17. rightLayout.setSizeFull();
  18. rightLayout.setMargin(true);
  19. rightLayout.addComponent(this.tabsheetPanel);
  20. hsplit.setSecondComponent(rightLayout);
  21. hsplit.setSplitPosition(30, Unit.PERCENTAGE);
  22. this.flowStates = this.topologyCache.getStateMap();
  23. this.setContent(hsplit);
  24. }

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

  1. protected void init()
  2. {
  3. this.tabsheetPanel = new Panel();
  4. this.tabsheetPanel.addStyleName(ValoTheme.PANEL_BORDERLESS);
  5. this.tabsheetPanel.setSizeFull();
  6. this.createTopologyTreePanel();
  7. this.setWidth("100%");
  8. this.setHeight("100%");
  9. this.businessStreamCombo = new ComboBox();
  10. HorizontalSplitPanel hsplit = new HorizontalSplitPanel();
  11. hsplit.setStyleName(ValoTheme.SPLITPANEL_LARGE);
  12. HorizontalLayout leftLayout = new HorizontalLayout();
  13. leftLayout.setSizeFull();
  14. leftLayout.setMargin(true);
  15. leftLayout.addComponent(this.topologyTreePanel);
  16. hsplit.setFirstComponent(leftLayout);
  17. HorizontalLayout rightLayout = new HorizontalLayout();
  18. rightLayout.setSizeFull();
  19. rightLayout.setMargin(true);
  20. rightLayout.addComponent(this.tabsheetPanel);
  21. hsplit.setSecondComponent(rightLayout);
  22. hsplit.setSplitPosition(300, Unit.PIXELS);
  23. this.flowStates = this.topologyCache.getStateMap();
  24. this.setContent(hsplit);
  25. }

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

  1. @Override
  2. public void doBuild(ViewChangeBusMessage event) {
  3. super.doBuild(event);
  4. centrePanel = new Panel();
  5. centrePanel.addStyleName(ChameleonTheme.PANEL_BUBBLE);
  6. centrePanel.setSizeUndefined();
  7. VerticalLayout vl = new VerticalLayout();
  8. centrePanel.setContent(vl);
  9. vl.setSpacing(true);
  10. vl.setSizeUndefined();
  11. label = new Label();
  12. usernameBox = new TextField();
  13. passwordBox = new PasswordField();
  14. Label demoInfoLabel = new Label("for this demo, enter any user name, and a password of 'password'");
  15. Label demoInfoLabel2 = new Label("In a real application your Shiro Realm implementation defines how to authenticate");
  16. submitButton = new Button();
  17. submitButton.addClickListener(this);
  18. statusMsgLabel = new Label("Please enter your username and password");
  19. vl.addComponent(label);
  20. vl.addComponent(demoInfoLabel);
  21. vl.addComponent(demoInfoLabel2);
  22. vl.addComponent(usernameBox);
  23. vl.addComponent(passwordBox);
  24. vl.addComponent(submitButton);
  25. vl.addComponent(statusMsgLabel);
  26. setMiddleCentre(centrePanel);
  27. }

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

  1. private void init() {
  2. final Panel rootPanel = new Panel();
  3. rootPanel.setSizeFull();
  4. rootPanel.addStyleName("config-panel");
  5. final VerticalLayout vLayout = new VerticalLayout();
  6. vLayout.setMargin(true);
  7. vLayout.setSizeFull();
  8. final Label header = new Label(i18n.getMessage("configuration.rollout.title"));
  9. header.addStyleName("config-panel-header");
  10. vLayout.addComponent(header);
  11. final HorizontalLayout hLayout = new HorizontalLayout();
  12. hLayout.setSpacing(true);
  13. hLayout.setImmediate(true);
  14. approvalCheckbox = SPUIComponentProvider.getCheckBox("", "", null, false, "");
  15. approvalCheckbox.setId(UIComponentIdProvider.ROLLOUT_APPROVAL_ENABLED_CHECKBOX);
  16. approvalCheckbox.setValue(approvalConfigurationItem.isConfigEnabled());
  17. approvalCheckbox.addValueChangeListener(this);
  18. approvalConfigurationItem.addChangeListener(this);
  19. hLayout.addComponent(approvalCheckbox);
  20. hLayout.addComponent(approvalConfigurationItem);
  21. final Link linkToApprovalHelp = SPUIComponentProvider
  22. .getHelpLink(uiProperties.getLinks().getDocumentation().getRollout());
  23. hLayout.addComponent(linkToApprovalHelp);
  24. hLayout.setComponentAlignment(linkToApprovalHelp, Alignment.BOTTOM_RIGHT);
  25. vLayout.addComponent(hLayout);
  26. rootPanel.setContent(vLayout);
  27. setCompositionRoot(rootPanel);
  28. }

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

  1. private void init() {
  2. final Panel rootPanel = new Panel();
  3. rootPanel.setSizeFull();
  4. rootPanel.addStyleName("config-panel");
  5. final VerticalLayout vLayout = new VerticalLayout();
  6. vLayout.setMargin(true);
  7. vLayout.setSizeFull();
  8. final Label header = new Label(i18n.getMessage("configuration.rollout.title"));
  9. header.addStyleName("config-panel-header");
  10. vLayout.addComponent(header);
  11. final HorizontalLayout hLayout = new HorizontalLayout();
  12. hLayout.setSpacing(true);
  13. hLayout.setImmediate(true);
  14. approvalCheckbox = SPUIComponentProvider.getCheckBox("", "", null, false, "");
  15. approvalCheckbox.setId(UIComponentIdProvider.ROLLOUT_APPROVAL_ENABLED_CHECKBOX);
  16. approvalCheckbox.setValue(approvalConfigurationItem.isConfigEnabled());
  17. approvalCheckbox.addValueChangeListener(this);
  18. approvalConfigurationItem.addChangeListener(this);
  19. hLayout.addComponent(approvalCheckbox);
  20. hLayout.addComponent(approvalConfigurationItem);
  21. final Link linkToApprovalHelp = SPUIComponentProvider
  22. .getHelpLink(i18n, uiProperties.getLinks().getDocumentation().getRollout());
  23. hLayout.addComponent(linkToApprovalHelp);
  24. hLayout.setComponentAlignment(linkToApprovalHelp, Alignment.BOTTOM_RIGHT);
  25. vLayout.addComponent(hLayout);
  26. rootPanel.setContent(vLayout);
  27. setCompositionRoot(rootPanel);
  28. }

相关文章