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

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

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

Window.setResizable介绍

[英]Sets window resizable.
[中]设置窗口大小。

代码示例

代码示例来源:origin: stackoverflow.com

public void actionPerformed(ActionEvent e) {
     Object source = e.getSource();
     if (source instanceof JButton) {
      JButton button = (button) source;
      Window ancestorWin = SwingUtilities.getAncestorWindow(button);
      ancestorWin.setUndecorated(!isFullScreen);
      ancestorWin.setResizable(isFullScreen);
      // etc...

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

@Override
public ViewWindowConfigurator resizable(boolean resizable) {
  getInstance().setResizable(resizable);
  return this;
}

代码示例来源: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: 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.opencms/opencms-core

/**
 * @see org.opencms.ui.actions.I_CmsWorkplaceAction#executeAction(org.opencms.ui.I_CmsDialogContext)
 */
public void executeAction(final I_CmsDialogContext context) {
  CmsUserInfo dialog = new CmsUserInfo(new I_UploadListener() {
    public void onUploadFinished(List<String> uploadedFiles) {
      handleUpload(uploadedFiles, context);
    }
  }, context);
  Multimap<String, String> params = A_CmsUI.get().getParameters();
  int top = 55;
  int left = 0;
  if (params.containsKey("left")) {
    String buttonLeft = params.get("left").iterator().next();
    left = Integer.parseInt(buttonLeft) - 290;
  }
  final Window window = new Window();
  window.setModal(false);
  window.setClosable(true);
  window.setResizable(false);
  window.setContent(dialog);
  context.setWindow(window);
  window.addStyleName(OpenCmsTheme.DROPDOWN);
  UI.getCurrent().addWindow(window);
  window.setPosition(left, top);
}

代码示例来源: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: 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: OpenNMS/opennms

window.setResizable(false);

代码示例来源:origin: org.opennms.features/vaadin-surveillance-views

window.setResizable(false);

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

/**
   * Helper method to initialise this object.
   * 
   * @param message
   */
  protected void init(String text)
  {
    super.setWidth("50%");
    super.setHeight("50%");
    super.setModal(true);
    super.setResizable(true);
    super.center();
    
    TextArea ta = new TextArea();
    ta.setSizeFull();
    ta.setValue(text);
    ta.setWordwrap(false);
        HorizontalLayout layout = new HorizontalLayout();
    layout.setMargin(true);
    layout.addComponent(ta);
    layout.setSizeFull();
        Panel p = new Panel();
    p.setSizeFull();
    p.setContent(layout);
    
    super.setContent(p);
  }
}

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

window.setClosable(false);
window.setModal(true);
window.setResizable(false);
window.setSizeUndefined();

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

window.setResizable(false);

代码示例来源:origin: jreznot/electron-java-app

private void onMenuAbout() {
  Window helpWindow = new Window();
  helpWindow.setCaption("About");
  helpWindow.setModal(true);
  helpWindow.setResizable(false);
  helpWindow.setSizeUndefined();
  VerticalLayout content = new VerticalLayout();
  content.setSizeUndefined();
  content.setMargin(true);
  content.setSpacing(true);
  Label aboutLabel = new Label("Electron+Vaadin Demo\nAuthor: Yuriy Artamonov");
  aboutLabel.setContentMode(ContentMode.PREFORMATTED);
  aboutLabel.setSizeUndefined();
  content.addComponent(aboutLabel);
  Button okBtn = new Button("Ok", VaadinIcons.CHECK);
  okBtn.focus();
  okBtn.addClickListener(event -> helpWindow.close());
  content.addComponent(okBtn);
  content.setComponentAlignment(okBtn, Alignment.MIDDLE_CENTER);
  helpWindow.setContent(content);
  getUI().addWindow(helpWindow);
}

代码示例来源:origin: jreznot/electron-java-app

confirmationWindow.setResizable(false);
confirmationWindow.setModal(true);
confirmationWindow.setCaption("Exit confirmation");

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

window.setContent(panel);
window.setClosable(false);
window.setResizable(false);
A_CmsUI.get().addWindow(window);

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

super.setResizable(false);
super.center();

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

artifactDtlsWindow.setCaptionAsHtml(true);
artifactDtlsWindow.setClosable(true);
artifactDtlsWindow.setResizable(true);
artifactDtlsWindow.setImmediate(true);
artifactDtlsWindow.setWindowMode(WindowMode.NORMAL);

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

artifactDtlsWindow.setCaptionAsHtml(true);
artifactDtlsWindow.setClosable(true);
artifactDtlsWindow.setResizable(true);
artifactDtlsWindow.setImmediate(true);
artifactDtlsWindow.setWindowMode(WindowMode.NORMAL);

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

dialog.setCaption(messages.getMainMessage("dialogs.Information", locale));
dialog.setClosable(false);
dialog.setResizable(false);
dialog.setModal(true);

相关文章