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

x33g5p2x  于2022-02-03 转载在 其他  
字(4.8k)|赞(0)|评价(0)|浏览(141)

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

Window.getContent介绍

暂无

代码示例

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

/**
 * Validates the layout and returns a collection of errors.
 *
 * @since 7.1
 * @param ui
 *            The UI to validate
 * @return A collection of errors. An empty collection if there are no
 *         errors.
 */
public static List<InvalidLayout> validateLayouts(UI ui) {
  List<InvalidLayout> invalidRelativeSizes = ComponentSizeValidator
      .validateComponentRelativeSizes(ui.getContent(),
          new ArrayList<>(), null);
  // Also check any existing subwindows
  if (ui.getWindows() != null) {
    for (Window subWindow : ui.getWindows()) {
      invalidRelativeSizes = ComponentSizeValidator
          .validateComponentRelativeSizes(subWindow.getContent(),
              invalidRelativeSizes, null);
    }
  }
  return invalidRelativeSizes;
}

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

public void pushScreen(String viewName, ComponentContainer newView) {
  screenStack.push((ComponentContainer) getMainWindow().getContent());
  switchScreen(viewName, newView);
}

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

public void setWidth(int width) {
  if (width < 0) return;
  VerticalLayout innerLayout = (VerticalLayout) getMainWindow().getContent();
  if (!isFull) innerLayout.setWidth(width,Sizeable.UNITS_PIXELS);
  this.width = width;
  doRememberSize(new int[] {width,height,isFull?1:0});
}

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

public void setHeight(int height) {
  if (height < 0) return;
  VerticalLayout innerLayout = (VerticalLayout) getMainWindow().getContent();
  /*if (!isFull)*/ innerLayout.setHeight(height,Sizeable.UNITS_PIXELS);
  this.height = height;
  doRememberSize(new int[] {width,height,isFull?1:0});
}

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

@Override
public void init() {
  window = new Window();
  setMainWindow(window);
  layout = (VerticalLayout) getMainWindow().getContent();
}

代码示例来源:origin: apache/ace

public void init() {
  setTheme("ace");
  if (!m_dependenciesResolved.get()) {
    final Window message = new Window("Apache ACE");
    message.getContent().setSizeFull();
    setMainWindow(message);
    Label richText = new Label("<h1>Apache ACE User Interface</h1>"
      + "<p>Due to missing component dependencies on the server, probably due to misconfiguration, "
      + "the user interface cannot be properly started. Please contact your server administrator. "
      + "You can retry accessing the user interface by <a href=\"?restartApplication\">following this link</a>.</p>");
    richText.setContentMode(Label.CONTENT_XHTML);
    // TODO we might want to add some more details here as to what's
    // missing on the other hand, the user probably can't fix that anyway
    message.addComponent(richText);
    return;
  }
  m_mainWindow = new Window("Apache ACE");
  m_mainWindow.getContent().setSizeFull();
  m_mainWindow.setBorder(Window.BORDER_NONE);
  setMainWindow(m_mainWindow);
  // Authenticate the user either by showing a login window; or by another means...
  authenticate();
}

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

/**
 * Creates the main window and adds the header, main and button panels to
 * it.
 */
private void initMainWindow() {
  Window window = new Window("JmxConfigGenerator GUI Tool");
  VerticalLayout layout = new VerticalLayout();
  layout.addComponent(headerPanel);
  layout.addComponent(contentPanel);
  // content Panel should use most of the space :)
  layout.setExpandRatio(contentPanel, 1);
  window.setContent(layout);
  window.getContent().setSizeFull();
  window.setSizeFull();
  addWindow(window);
}

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

public void setFullSize(boolean full) {
  VerticalLayout innerLayout = (VerticalLayout) getMainWindow().getContent();
  // innerLayout.setSizeUndefined();
  if (full) {
    // innerLayout.setSizeFull();
    innerLayout.setWidth("100%");
  } else {
    isFull = false;
    innerLayout.setHeightUnits(Sizeable.UNITS_PIXELS);
    innerLayout.setWidthUnits(Sizeable.UNITS_PIXELS);
    setWidth(width);
    setHeight(height);
  }
    
  isFull = full;
  if (hasButtons) {
    bFull.setCaption(full ? " * " : " o ");
    //bHeightAdd.setEnabled(!full);
    //bHeightSub.setEnabled(!full);
    bWidthAdd.setEnabled(!full);
    bWidthSub.setEnabled(!full);
  }
}

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

vl.addComponent(buttonBar);
vl.addComponent(newView);
final Component oldContent = window.getContent();
if (oldContent instanceof CmsBasicDialog) {
  List<CmsResource> infoResources = ((CmsBasicDialog)oldContent).getInfoResources();

代码示例来源:origin: org.apache.ace/org.apache.ace.webui.vaadin

final Window message = new Window("Apache ACE");
  setMainWindow(message);
  message.getContent().setSizeFull();
  Label richText = new Label(
    "<h1>Apache ACE User Interface</h1>" +
main.getContent().setSizeFull();

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

setMainWindow(window);
VerticalLayout innerLayout = (VerticalLayout) getMainWindow().getContent();
innerLayout.setHeightUnits(Sizeable.UNITS_PIXELS);
innerLayout.setWidthUnits(Sizeable.UNITS_PIXELS);

相关文章

微信公众号

最新文章

更多