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

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

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

Panel.getContent介绍

暂无

代码示例

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

errors = validateComponentRelativeSizes(panel.getContent(), errors,
      parent);
} else if (component instanceof ComponentContainer) {

代码示例来源:origin: com.haulmont.cuba/cuba-web-widgets

@Override
public ComponentContainer getContent() {
  return (ComponentContainer) super.getContent();
}

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

/**
 * Add component to detail-container.
 */
public void addDetailComponent(Component c, int index) {
 if(mainPanel.getContent() instanceof AbstractOrderedLayout) {
  ((AbstractOrderedLayout) mainPanel.getContent()).addComponent(c, index);      
 } else {
  throw new UnsupportedOperationException("Cannot add components indexed component, detail content is not AbstractOrderedLayout");
 }
}

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

/**
 * Set expand-ratio of detail-component
 */
public void setDetailExpandRatio(Component component, float ratio) {
 if(mainPanel.getContent() instanceof AbstractOrderedLayout) {
  ((AbstractOrderedLayout) mainPanel.getContent()).setExpandRatio(component, ratio);      
 } else {
  throw new UnsupportedOperationException("Cannot set ExpandRatio, detail content is not AbstractOrderedLayout");
 }
}

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

public void updateAll() {
  for (int y = 0; y < getRows(); y++) {
    for (int x = 0; x < getColumns(); x++) {
      Panel panel = (Panel) getComponent(x, y);
      if (panel != null) {
        Component component = panel.getContent();
        if (component != null) {
          m_displayDashlets.get(component).refresh();
        }
      }
    }
  }
}

代码示例来源: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.metawidget.modules/metawidget-all

private Component getComponent( HasComponents container, String name ) {
  Iterator<Component> iterator = container.iterator();
  while ( iterator.hasNext() ) {
    AbstractComponent childComponent = (AbstractComponent) iterator.next();
    // Drill into unnamed containers
    if ( childComponent.getData() == null && childComponent instanceof Panel ) {
      childComponent = (AbstractComponent) getComponent( (HasComponents) ( (Panel) childComponent ).getContent(), name );
      if ( childComponent != null ) {
        return childComponent;
      }
      continue;
    }
    if ( childComponent.getData() == null && childComponent instanceof HasComponents ) {
      childComponent = (AbstractComponent) getComponent( (HasComponents) childComponent, name );
      if ( childComponent != null ) {
        return childComponent;
      }
      continue;
    }
    // Match by name
    if ( name.equals( childComponent.getData() ) ) {
      return childComponent;
    }
  }
  // Not found
  return null;
}

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

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

代码示例来源:origin: KrailOrg/krail

@Test
public void changeViewToForm() {
  // given
  Form form = mock(Form.class);
  when(form.getRootComponent()).thenReturn(viewContent);
  when(form.getName()).thenReturn("toForm");
  // when
  ui.changeView(form);
  // then
  verify(form).getRootComponent();
  verify(translator, never()).translate(toView);
  verify(form).translate();
  verify(viewContent).setSizeFull();
  assertThat(ui.getViewDisplayPanel()
      .getContent()).isEqualTo(viewContent);
}

代码示例来源:origin: KrailOrg/krail

@Test
public void changeView() {
  // given
  when(toView.getRootComponent()).thenReturn(viewContent);
  when(toView.getName()).thenReturn("toView");
  // when
  ui.changeView(toView);
  // then
  verify(toView).getRootComponent();
  verify(translator).translate(toView);
  verify(viewContent).setSizeFull();
  assertThat(ui.getViewDisplayPanel()
         .getContent()).isEqualTo(viewContent);
}

代码示例来源:origin: org.metawidget.modules/metawidget-all

return (ComponentContainer) tabPanel.getContent();

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

protected void addDropPanel() {
 Panel dropPanel = new Panel();
 DragAndDropWrapper dragAndDropWrapper = new DragAndDropWrapper(dropPanel);
 dragAndDropWrapper.setDropHandler(this);
 dragAndDropWrapper.setWidth("80%");
 addComponent(dragAndDropWrapper);
 setComponentAlignment(dragAndDropWrapper, Alignment.MIDDLE_CENTER);
 
 Label dropLabel = new Label(i18nManager.getMessage(Messages.UPLOAD_DROP));
 dropLabel.setSizeUndefined();
 dropPanel.addComponent(dropLabel);
 ((VerticalLayout)dropPanel.getContent()).setComponentAlignment(dropLabel, Alignment.MIDDLE_CENTER);
}

代码示例来源:origin: nz.co.senanque/madura-vaadinsupport

public void afterPropertiesSet() throws Exception {
  setSizeFull();
  Panel loginPanel = new Panel();
  AbstractLayout panelLayout = (AbstractLayout) loginPanel.getContent();
  panelLayout.setMargin(false);
  loginPanel.setWidth("460px");

代码示例来源:origin: com.haulmont.cuba/cuba-web

label.setStyleName("c-log-content");
((Layout)scrollablePanel.getContent()).addComponent(label);

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

private void refreshData() {
  if (commentsPanel == null) return;
  VerticalLayout layout = (VerticalLayout) commentsPanel.getContent();
  layout.removeAllComponents();
  layout.setSpacing(true);

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

p.setHeight("240px");
VerticalLayout layout = (VerticalLayout) p.getContent();

相关文章