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

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

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

Window.setWidth介绍

暂无

代码示例

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

Window window = workbook.getWindow();        
window.setHeight(450);
window.setWidth(600);

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

Window win = getScene().getWindow();
win.setWidth(...);
win.setHeight(...);

代码示例来源:origin: mstahv/spring-boot-spatial-example

@Override
public Window openInModalPopup() {
  Window w = super.openInModalPopup();
  w.setHeight("95%");
  w.setWidth("70%");
  return w;
}

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

pan[beNumber].addClickListener(new    MyCustomListener(beNumber));

class MyCustomListener implements MouseEvents.ClickListener{

final int beNumber;//I guess you use int in your arrays

public MyCustomListener(int beNumber){
this.beNumber = beNumber;
}
@Override
 public void click(MouseEvents.ClickEvent event) {

                // Create a sub-window and set the content
            Window subWindow = new Window("Patient Transfer", new WardMovementView(beNumber));//pass that var to your custom component if you want to use it
             subWindow.setCaptionAsHtml(true);
             subWindow.setModal(true);
             subWindow.setWidth("1200px");
             subWindow.setHeight("800px");
            UI.getCurrent().addWindow(subWindow);

           }

}

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

pan[beNumber].addClickListener(new MouseEvents.ClickListener() {

  private static final long serialVersionUID = 1L;

  @Override
  public void click(MouseEvents.ClickEvent event) {

    // Create a sub-window and set the content
    Window subWindow = new PatientTranfserWindow("Patient Transfer", new WardMovementView());
    subWindow.setCaptionAsHtml(true);
    subWindow.setModal(true);
    subWindow.setWidth("1200px");
    subWindow.setHeight("800px");
    subWindow.setBENumber(beNumber);
    UI.getCurrent().addWindow(subWindow);

  }
});

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

/**
 * Forces a width for the message dialog.
 *
 * @param width The forced width
 * @return The {@link MessageBox} instance
 */
public MessageBox withWidth(String width) {
  window.setWidth(width);
  if (-1f != window.getWidth()) {
    mainLayout.setWidth("100%");
  } else {
    mainLayout.setWidth(-1f, Unit.PIXELS);
  }
  return this;
}

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

window.setWidth("800px");
  break;
case max:
  window.setWidth("90%");
  break;
case narrow:
default:
  window.setWidth("600px");
  break;

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

@Override
public void start(Stage primaryStage) {
  Button btn = new Button("Resize");
  btn.setOnAction((ActionEvent event) -> {
    changeStageSize(primaryStage, 800, 500);
    primaryStage.centerOnScreen();
  });

  StackPane root = new StackPane(btn);
  Scene scene = new Scene(root);

  primaryStage.setScene(scene);
  primaryStage.show();
}

public void changeStageSize(Window stage, int width, int height) {
  stage.setWidth(width);
  stage.setHeight(height);
}

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

protected void addEntity(String stringInput) {
  final ET newInstance = instantiateOption(stringInput);
  if (newInstanceForm != null) {
    String caption = "Add new " + elementType.getSimpleName();
    newInstanceForm.setEntity(newInstance);
    newInstanceForm.setSavedHandler(this);
    newInstanceForm.setResetHandler(this);
    Window w = newInstanceForm.openInModalPopup();
    w.setWidth("70%");
    w.setCaption(caption);
  } else {
    onSave(newInstance);
  }
}

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

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

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

window.setResizable(false);
window.setWidth("80%");
window.setHeight("90%");

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

window.setResizable(false);
window.setWidth("80%");
window.setHeight("90%");

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

window.setResizable(false);
window.setWidth("80%");
window.setHeight("90%");

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

newConfirmationWindow.setBorder(0);
newConfirmationWindow.setClosable(false);
newConfirmationWindow.setWidth(500, Sizeable.UNITS_PIXELS);

相关文章