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

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

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

Panel.setContent介绍

暂无

代码示例

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

/**
 * Creates a new empty panel which contains the given content.
 *
 * @param content
 *            the content for the panel.
 */
public Panel(Component content) {
  registerRpc(rpc);
  setContent(content);
  setWidth(100, Unit.PERCENTAGE);
  getState().tabIndex = -1;
}

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

/**
 * Set the actual content of the panel.
 */
public void setDetailContainer(ComponentContainer component) {
 mainPanel.setContent(component);
}

代码示例来源:origin: vaadin/spring-tutorial

@Override
  public void showView(View view) {
    springViewDisplay.setContent((Component) view);
  }
}

代码示例来源:origin: org.opennms.features/jmxconfiggenerator.webui

private void setContentPanelComponent(Component c) {
  contentPanel.setContent(c);
}

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

/**
 * Sets the content.<p>
 *
 * @param content the content widget
 */
public void setContent(Component content) {
  m_contentPanel.setContent(content);
  if (content instanceof Layout.MarginHandler) {
    ((Layout.MarginHandler)content).setMargin(true);
  }
}

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

/**
 * Sets the main component.<p>
 *
 * @param component the main component
 */
public void setMainContent(Component component) {
  component.addStyleName("borderless");
  m_main.setContent(component);
}

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

/**
 * Adds a child category panel.<p>
 *
 * @param label the label
 * @param child the child widget
 */
public void addChild(String label, CmsAppHierarchyPanel child) {
  Panel panel = new Panel();
  panel.setCaption(label);
  panel.setContent(child);
  addComponent(panel);
}

代码示例来源:origin: korpling/ANNIS

@Override
 public Panel createComponent(VisualizerInput input,
     VisualizationToggle visToggle) {
  Panel p = new Panel();
  p.setHeight(input.getMappings().getProperty("height", "-1") + "px");
  p.setContent(new PDFPanel(input, "-1"));
  return p;
 }
}

代码示例来源: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: de.mhus.lib/mhu-lib-vaadin

protected void setContent(AbstractComponent c) {
  AbstractComponentContainer x = (AbstractComponentContainer) content.getContent();
  if (x == null) {
    x = new VerticalLayout();
    content.setContent(x);
  }
  x.removeAllComponents();
  x.addComponent(c);
}

代码示例来源:origin: org.opennms.features/jmxconfiggenerator.webui

private void initContentPanel() {
  contentPanel = new Panel();
  contentPanel.setContent(new VerticalLayout());
  contentPanel.getContent().setSizeFull();
  contentPanel.setSizeFull();
}

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

@Override
  public void valueChange(Property.ValueChangeEvent valueChangeEvent) {
    String newImage = "/opennms/charts?chart-name=" + valueChangeEvent.getProperty().getValue();
    Image image = new Image(null, new ExternalResource(newImage));
    image.setStyleName("preview");
    panel.setContent(image);
  }
});

代码示例来源: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.opennms.features.vaadin-dashlets/dashlet-charts

@Override
  public void valueChange(Property.ValueChangeEvent valueChangeEvent) {
    String newImage = "/opennms/charts?chart-name=" + valueChangeEvent.getProperty().getValue();
    Image image = new Image(null, new ExternalResource(newImage));
    image.setStyleName("preview");
    panel.setContent(image);
  }
});

代码示例来源: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: 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.opennms.features/jmxconfiggenerator.webui

private Panel wrapToPanel(Component component) {
  Panel panel = new Panel(component.getCaption());
  panel.setSizeFull();
  VerticalLayout layout = new VerticalLayout();
  layout.setMargin(false);
  layout.setSpacing(false);
  layout.setSizeFull();
  layout.addComponent(component);
  panel.setContent(layout);
  component.setCaption(null);
  return panel;
}

代码示例来源:origin: de.mhus.lib/mhu-lib-vaadin6

protected void addToCurrent(VaadinFormBuilder builder) {
  if (!MString.isEmpty(getElement().getTitle())) {
    panel = new Panel(getElement().getTitle());
    panel.setContent(layout);
    panel.setWidth("100%");
    builder.addComposite((LayoutComposite)getElement(), panel);
  } else
    super.addToCurrent(builder);
}

代码示例来源:origin: kingbbode/spring-boot-ehcache-monitor

private void init(CacheManager cacheManager) {
  VerticalLayout content = new VerticalLayout();
  content.addComponent(createTitleBar());
  content.addComponent(createCacheGrid(cacheManager));
  Panel panel = new Panel();
  panel.setSizeFull();
  panel.setContent(createCacheCharts(cacheManager));
  content.addComponent(panel);
  setCompositionRoot(content);
}

相关文章