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

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

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

Window.<init>介绍

[英]Creates a new, empty window.
[中]创建一个新的空窗口。

代码示例

代码示例来源:origin: org.aperteworkflow/gui-commons

public static Window modalWindow(String title, ComponentContainer content) {
  Window window = new Window(title, content);
  window.setClosable(false);
  window.setModal(true);
  window.setSizeUndefined();
  return window;
}

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

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

代码示例来源:origin: com.haulmont.thirdparty/popupbutton

public void buttonClick(ClickEvent event) {
    Window w = new Window();
    w.center();
    w.setContent(createPopupButton());
    addWindow(w);
  }
});

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

/**
   * Build window based on type.
   *
   * @return Window
   */
  public Window buildWindow() {
    final Window window = new Window(caption);
    window.setContent(content);
    window.setSizeUndefined();
    window.setModal(true);
    window.setResizable(false);

    decorateWindow(window);

    if (SPUIDefinitions.CREATE_UPDATE_WINDOW.equals(type)) {
      window.setClosable(false);
    }

    return window;
  }
}

代码示例来源:origin: viritin/viritin

public Window openInModalPopup() {
  popup = new Window(getModalWindowTitle(), this);
  popup.setModal(true);
  UI.getCurrent().addWindow(popup);
  focusFirst();
  return popup;
}

代码示例来源:origin: viritin/viritin

public Window openInModalPopup() {
  popup = new Window(getModalWindowTitle(), this);
  popup.setModal(true);
  UI.getCurrent().addWindow(popup);
  focusFirst();
  return popup;
}

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

/**
   * Build window based on type.
   *
   * @return Window
   */
  public Window buildWindow() {
    final Window window = new Window(caption);
    window.setContent(content);
    window.setSizeUndefined();
    window.setModal(true);
    window.setResizable(false);

    decorateWindow(window);

    if (SPUIDefinitions.CREATE_UPDATE_WINDOW.equals(type)) {
      window.setClosable(false);
    }

    return window;
  }
}

代码示例来源:origin: org.aperteworkflow/gui-commons

@Override
public void init() {
  final Window mainWindow = new Window();
  setMainWindow(mainWindow);
  ApplicationContext applicationContext = getContext();
  if (applicationContext instanceof PortletApplicationContext2) {
    PortletApplicationContext2 portletCtx = (PortletApplicationContext2) applicationContext;
    portletCtx.addPortletListener(this, this);
  } else {
    mainWindow.addComponent(new Label(getMessage("please.use.from.a.portlet")));
  }
}

代码示例来源:origin: org.aperteworkflow/editor

@Override
public void init() {
  super.init();
  mainWindow = new Window(I18NSource.ThreadUtil.getThreadI18nSource().getMessage("application.title"));
  jsHelper = new JavaScriptHelper(mainWindow);
  jsHelper.preventWindowClosing();
  mainWindow.addParameterHandler(this);
  setMainWindow(mainWindow);
}

代码示例来源:origin: info.magnolia.ui/magnolia-ui-framework

public Window buildAndOpen() {
    Window window = new Window();
    window.setCaption(this.title);
    window.setContent(this.build());
    window.center();
    window.setModal(this.modal);
    UI.getCurrent().addWindow(window);
    return window;
  }
}

代码示例来源:origin: org.aperteworkflow/editor

@Override
public void init() {
  Window mainWindow = new Window("");
  setMainWindow(mainWindow);
  mainWindow.removeAllComponents();
  HorizontalLayout main = new HorizontalLayout();
  main.setSpacing(true);
  main.setMargin(true);
  main.setWidth(100, Sizeable.UNITS_PERCENTAGE);
  mainWindow.setContent(main);
}

代码示例来源:origin: org.aperteworkflow/editor

@Override
public void init() {
  super.init();
  
  mainWindow = new Window(I18NSource.ThreadUtil.getThreadI18nSource().getMessage("application.title"));
  mainWindow.addParameterHandler(this);
  jsHelper = new JavaScriptHelper(mainWindow);
  jsHelper.preventWindowClosing();
  setMainWindow(mainWindow);
}

代码示例来源:origin: org.aperteworkflow/editor

@Override
public void init() {
  super.init();
  I18NSource messages = I18NSource.ThreadUtil.getThreadI18nSource();
  mainWindow = new Window(messages.getMessage("process.editor.title"));
  mainWindow.addParameterHandler(this);
  mainWindowJavaScriptHelper = new JavaScriptHelper(mainWindow);
  mainWindowJavaScriptHelper.preventWindowClosing();
  setMainWindow(mainWindow);
}

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

public void buttonClick(Button.ClickEvent event)
  {
    ReplayStatusPanel panel = new ReplayStatusPanel(getReplayEvents(), (ReplayService) replayService, platformConfigurationService, topologyService);
    Window window = new Window("Replay Events");
    window.setHeight("80%");
    window.setWidth("80%");
    window.setModal(true);
    window.setContent(panel);
    UI.getCurrent().addWindow(window);
  }
});

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

private void createNotificationWindow() {
  notificationsWindow = new Window();
  notificationsWindow.setWidth(300.0F, Unit.PIXELS);
  notificationsWindow.addStyleName(STYLE_POPUP);
  notificationsWindow.addStyleName(STYLE_NO_CLOSEBOX);
  notificationsWindow.setClosable(true);
  notificationsWindow.setResizable(false);
  notificationsWindow.setDraggable(false);
  notificationsWindow.setId(UIComponentIdProvider.NOTIFICATION_UNREAD_POPUP_ID);
  notificationsWindow.addCloseListener(event -> refreshCaption());
  notificationsWindow.addBlurListener(this::closeWindow);
}

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

private void createNotificationWindow() {
  notificationsWindow = new Window();
  notificationsWindow.setWidth(300.0F, Unit.PIXELS);
  notificationsWindow.addStyleName(STYLE_POPUP);
  notificationsWindow.addStyleName(STYLE_NO_CLOSEBOX);
  notificationsWindow.setClosable(true);
  notificationsWindow.setResizable(false);
  notificationsWindow.setDraggable(false);
  notificationsWindow.setId(UIComponentIdProvider.NOTIFICATION_UNREAD_POPUP_ID);
  notificationsWindow.addCloseListener(event -> refreshCaption());
  notificationsWindow.addBlurListener(this::closeWindow);
}

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

public void buttonClick(ClickEvent event) 
  {                
    UserDirectoryManagementPanel authMethodPanel = new UserDirectoryManagementPanel(authenticationMethod, 
        securityService, authenticationProviderFactory, ldapService);
    
    Window window = new Window("Configure User Directory");
    window.setModal(true);
    window.setHeight("90%");
    window.setWidth("90%");
    
    window.setContent(authMethodPanel);
    
    window.addCloseListener(new Window.CloseListener() 
    {
      // inline close-listener
      public void windowClose(CloseEvent e) 
      {
        populateAll();
      }
    });
    
    UI.getCurrent().addWindow(window);
  }
});

代码示例来源: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: info.magnolia.ui/magnolia-ui-framework

public Window build() {
  Window dialog = new Window();
  dialog.addStyleName("light-box");
  dialog.setDraggable(false);
  dialog.setResizable(false);
  dialog.setModal(true);
  dialog.setWidth(95, Sizeable.Unit.PERCENTAGE);
  CssLayout contentWrapper = new CssLayout(content);
  contentWrapper.setSizeFull();
  contentWrapper.setStyleName("light-box-content");
  dialog.setContent(contentWrapper);
  dialog.center();
  return dialog;
}

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

@Override
  public void itemClick(ItemClickEvent event)
  {
    Window subWindow = new Window("Sub-window");
    VerticalLayout subContent = new VerticalLayout();
    subContent.setMargin(true);
    subWindow.setContent(subContent);
    
    Item item = event.getItem();
    
    final Property<String> moduleProperty =
        item.getItemProperty("Module");
    
    // Put some components in it
    subContent.addComponent(new Label(moduleProperty.getValue()));
    subContent.addComponent(new Button("Awlright"));
    
    // Center it in the browser window
    subWindow.center();
    
    // Open it in the UI
    UI.getCurrent().addWindow(subWindow);
  }
}

相关文章