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

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

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

Window.attach介绍

暂无

代码示例

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

@Override
public void attach() {
 super.attach();
 // setCloseShortcut(ShortcutAction.KeyCode.ESCAPE, null);
}

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

@Override
public void attach() {
  super.attach();
  // We need to poll, otherwise hiding the progress window will not be
  // visible to the client, because it is triggered by the server.
  // Polling fixes this. But do not forget to disable polling when closing the window (see above)
  UIHelper.getCurrent(JmxConfigGeneratorUI.class).setPollInterval(250);
}

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

@Override
public void attach() {
  super.attach();
  // We need to poll, otherwise hiding the progress window will not be
  // visible to the client, because it is triggered by the server.
  // Polling fixes this. But do not forget to disable polling when closing the window (see above)
  UIHelper.getCurrent(JmxConfigGeneratorUI.class).setPollInterval(250);
}

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

@Override
public void attach() {
  try {
    populateUserTable();
    populateSelect();
  }
  finally {
    super.attach();
  }
}

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

@Override
public void attach() {
 super.attach();
 setCaption(i18nManager.getMessage(Messages.APP_TITLE));
}

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

@Override
public void attach() {
  try {
    // Take the logged in user from the main application...
    initializeUserDTO((User) getApplication().getUser());
  }
  finally {
    super.attach();
  }
}

代码示例来源:origin: org.opennms.features.topology/ssh

@Override
public void attach() {
  super.attach();
     int posX = (int)(getUI().getPage().getBrowserWindowWidth() - getWidth())/2;
  int posY = (int)(getUI().getPage().getBrowserWindowHeight() - getHeight())/2;
  
  setPositionX(posX);
  setPositionY(posY);
}

代码示例来源:origin: org.opennms.features.topology/ssh

@Override
public void attach() {
  super.attach();
  int posX = (int)(getUI().getPage().getBrowserWindowWidth() - this.getWidth())/2;
  int posY = (int)(getUI().getPage().getBrowserWindowHeight() - this.getHeight())/2;
  setPositionX(posX);
  setPositionY(posY);
  if (showOptions) hostField.focus();
  else usernameField.focus();
}

代码示例来源:origin: org.opennms.features.topology/api

@Override
  public void attach() {
    super.attach();
    
    int width = getUI().getPage().getBrowserWindowWidth();
    int height = getUI().getPage().getBrowserWindowHeight();
    
    /*Sets the browser and window sizes based on the main window*/
    int browserWidth = (int)(sizePercentage * width), browserHeight = (int)(sizePercentage * height);
    int windowWidth = browserWidth + widthCushion, windowHeight = browserHeight + heightCushion;
    setWidth(windowWidth, Unit.PIXELS);
    setHeight(windowHeight, Unit.PIXELS);
    setPositionX((width - windowWidth)/2);
    setPositionY((height - windowHeight)/2);
    
    /*Sets the size of the browser to fit within the sub-window*/
    infoBrowser.setType(Embedded.TYPE_BROWSER);
    infoBrowser.setWidth(browserWidth, Unit.PIXELS);
    infoBrowser.setHeight(browserHeight, Unit.PIXELS);
  }
}

代码示例来源:origin: org.opennms.features.topology/org.opennms.features.topology.netutils

@Override
  public void attach() {
    super.attach();
    
    int width = getUI().getPage().getBrowserWindowWidth();
    int height = getUI().getPage().getBrowserWindowHeight();
    
    /*Sets the browser and window size based on the main window*/
    int browserWidth = (int)(sizePercentage * width), browserHeight = (int)(sizePercentage * height);
    int windowWidth = browserWidth + widthCushion, windowHeight = browserHeight + heightCushion;
    setWidth("" + windowWidth + "px");
    setHeight("" + windowHeight + "px");
    setPositionX((width - windowWidth)/2);
    setPositionY((height - windowHeight)/2);
    
    /*Changes the size of the browser to fit within the sub-window*/
    rgBrowser.setType(Embedded.TYPE_BROWSER);
    rgBrowser.setWidth("" + browserWidth + "px");
    rgBrowser.setHeight("" + browserHeight + "px");
  }
}

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

@Override
  public void attach() {
    super.attach();
    
    int width = getUI().getPage().getBrowserWindowWidth();
    int height = getUI().getPage().getBrowserWindowHeight();
    
    /*Sets the browser and window sizes based on the main window*/
    int browserWidth = (int)(sizePercentage * width), browserHeight = (int)(sizePercentage * height);
    int windowWidth = browserWidth + widthCushion, windowHeight = browserHeight + heightCushion;
    setWidth(windowWidth, Unit.PIXELS);
    setHeight(windowHeight, Unit.PIXELS);
    setPositionX((width - windowWidth)/2);
    setPositionY((height - windowHeight)/2);
    
    /*Sets the size of the browser to fit within the sub-window*/
    infoBrowser.setType(Embedded.TYPE_BROWSER);
    infoBrowser.setWidth(browserWidth, Unit.PIXELS);
    infoBrowser.setHeight(browserHeight, Unit.PIXELS);
  }
}

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

@Override
  public void attach() {
    super.attach();
    
    int width = getUI().getPage().getBrowserWindowWidth();
    int height = getUI().getPage().getBrowserWindowHeight();
    
    /*Sets the browser and window size based on the main window*/
    int browserWidth = (int)(sizePercentage * width), browserHeight = (int)(sizePercentage * height);
    int windowWidth = browserWidth + widthCushion, windowHeight = browserHeight + heightCushion;
    setWidth("" + windowWidth + "px");
    setHeight("" + windowHeight + "px");
    setPositionX((width - windowWidth)/2);
    setPositionY((height - windowHeight)/2);
    
    /*Changes the size of the browser to fit within the sub-window*/
    rgBrowser.setType(Embedded.TYPE_BROWSER);
    rgBrowser.setWidth("" + browserWidth + "px");
    rgBrowser.setHeight("" + browserHeight + "px");
  }
}

代码示例来源:origin: org.opennms.features.topology/org.opennms.features.topology.api

@Override
  public void attach() {
    super.attach();
    
    int width = getUI().getPage().getBrowserWindowWidth();
    int height = getUI().getPage().getBrowserWindowHeight();
    
    /*Sets the browser and window sizes based on the main window*/
    int browserWidth = (int)(sizePercentage * width), browserHeight = (int)(sizePercentage * height);
    int windowWidth = browserWidth + widthCushion, windowHeight = browserHeight + heightCushion;
    setWidth(windowWidth, Unit.PIXELS);
    setHeight(windowHeight, Unit.PIXELS);
    setPositionX((width - windowWidth)/2);
    setPositionY((height - windowHeight)/2);
    
    /*Sets the size of the browser to fit within the sub-window*/
    infoBrowser.setType(Embedded.TYPE_BROWSER);
    infoBrowser.setWidth(browserWidth, Unit.PIXELS);
    infoBrowser.setHeight(browserHeight, Unit.PIXELS);
  }
}

代码示例来源:origin: org.opennms.features.topology/netutils

@Override
  public void attach() {
    super.attach();
    
    int width = getUI().getPage().getBrowserWindowWidth();
    int height = getUI().getPage().getBrowserWindowHeight();
    
    /*Sets the browser and window size based on the main window*/
    int browserWidth = (int)(sizePercentage * width), browserHeight = (int)(sizePercentage * height);
    int windowWidth = browserWidth + widthCushion, windowHeight = browserHeight + heightCushion;
    setWidth("" + windowWidth + "px");
    setHeight("" + windowHeight + "px");
    setPositionX((width - windowWidth)/2);
    setPositionY((height - windowHeight)/2);
    
    /*Changes the size of the browser to fit within the sub-window*/
    rgBrowser.setType(Embedded.TYPE_BROWSER);
    rgBrowser.setWidth("" + browserWidth + "px");
    rgBrowser.setHeight("" + browserHeight + "px");
  }
}

代码示例来源:origin: org.opennms.features.topology/org.opennms.features.topology.netutils

@Override
public void attach() {
  super.attach();
  
  int width = (int)getUI().getPage().getBrowserWindowWidth();
  int height = (int)getUI().getPage().getBrowserWindowHeight();
  /*Sets the browser and window sizes based on the main window*/
  int browserWidth = (int)(sizePercentage * width);
  int browserHeight = (int)(sizePercentage * height);
  setWidth("" + browserWidth + "px");
  setHeight("" + browserHeight + "px");
  setPositionX((width - browserWidth)/2);
  setPositionY((height - browserHeight)/2);
  int viewHeight = browserHeight - 76;
  /*Changes the size of the browsers to fit within the sub-window*/
  alarmsBrowser.setType(Embedded.TYPE_BROWSER);
  alarmsBrowser.setHeight(viewHeight + "px");
  eventsBrowser.setType(Embedded.TYPE_BROWSER);
  eventsBrowser.setHeight(viewHeight + "px"); //424 When I set it to this size it works but otherwise its doesn't
}

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

@Override
public void attach() {
  super.attach();
  
  int width = (int)getUI().getPage().getBrowserWindowWidth();
  int height = (int)getUI().getPage().getBrowserWindowHeight();
  /*Sets the browser and window sizes based on the main window*/
  int browserWidth = (int)(sizePercentage * width);
  int browserHeight = (int)(sizePercentage * height);
  setWidth("" + browserWidth + "px");
  setHeight("" + browserHeight + "px");
  setPositionX((width - browserWidth)/2);
  setPositionY((height - browserHeight)/2);
  int viewHeight = browserHeight - 76;
  /*Changes the size of the browsers to fit within the sub-window*/
  alarmsBrowser.setType(Embedded.TYPE_BROWSER);
  alarmsBrowser.setHeight(viewHeight + "px");
  eventsBrowser.setType(Embedded.TYPE_BROWSER);
  eventsBrowser.setHeight(viewHeight + "px"); //424 When I set it to this size it works but otherwise its doesn't
}

代码示例来源:origin: org.opennms.features.topology/netutils

@Override
public void attach() {
  super.attach();
  
  int width = (int)getUI().getPage().getBrowserWindowWidth();
  int height = (int)getUI().getPage().getBrowserWindowHeight();
  /*Sets the browser and window sizes based on the main window*/
  int browserWidth = (int)(sizePercentage * width);
  int browserHeight = (int)(sizePercentage * height);
  setWidth("" + browserWidth + "px");
  setHeight("" + browserHeight + "px");
  setPositionX((width - browserWidth)/2);
  setPositionY((height - browserHeight)/2);
  int viewHeight = browserHeight - 76;
  /*Changes the size of the browsers to fit within the sub-window*/
  alarmsBrowser.setType(Embedded.TYPE_BROWSER);
  alarmsBrowser.setHeight(viewHeight + "px");
  eventsBrowser.setType(Embedded.TYPE_BROWSER);
  eventsBrowser.setHeight(viewHeight + "px"); //424 When I set it to this size it works but otherwise its doesn't
}

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

@Override
public void attach() {
  super.attach();

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

@Override
public void attach() {
  super.attach();

相关文章