@Test public void testAttach() { assertTrue(app.getMainWindow().getChildWindows().contains(pingWindow)); app.getMainWindow().removeWindow(pingWindow); assertFalse(app.getMainWindow().getChildWindows().contains(pingWindow)); }
@Override public void attach() { super.attach(); int width = (int)getApplication().getMainWindow().getWidth(); int height = (int)getApplication().getMainWindow().getHeight(); int windowWidth = (int)(sizePercentage * width), windowHeight = (int)(sizePercentage * height); setWidth("" + windowWidth + "px"); setHeight("" + windowHeight + "px"); setPositionX((width - windowWidth)/2); setPositionY((height - windowHeight)/2); resultsBrowser.setWidth("" + (int)(this.getWidth()-margin) + "px"); resultsBrowser.setHeight("" + (int)(this.getHeight() - topHeight - margin) + "px"); }
PingWindow extends Window { @Override public void attach() { super.attach(); int width = (int)getApplication().getMainWindow().getWidth(); int height = (int)getApplication().getMainWindow().getHeight(); int windowWidth = (int)(sizePercentage * width), windowHeight = (int)(sizePercentage * height); setWidth("" + windowWidth + "px"); setHeight("" + windowHeight + "px"); setPositionX((width - windowWidth)/2); setPositionY((height - windowHeight)/2); resultsBrowser.setWidth("" + (int)(this.getWidth()-margin) + "px"); resultsBrowser.setHeight("" + (int)(this.getHeight() - topHeight - margin) + "px"); } }
PingWindow extends Window { @Override public void attach() { super.attach(); int width = (int)getApplication().getMainWindow().getWidth(); int height = (int)getApplication().getMainWindow().getHeight(); int windowWidth = (int)(sizePercentage * width), windowHeight = (int)(sizePercentage * height); setWidth("" + windowWidth + "px"); setHeight("" + windowHeight + "px"); setPositionX((width - windowWidth)/2); setPositionY((height - windowHeight)/2); resultsBrowser.setWidth("" + (int)(this.getWidth()-margin) + "px"); resultsBrowser.setHeight("" + (int)(this.getHeight() - topHeight - margin) + "px"); } PingWindow(final Node node, final String baseAddress); }
PingWindow extends Window { @Override public void attach() { super.attach(); int width = (int)getApplication().getMainWindow().getWidth(); int height = (int)getApplication().getMainWindow().getHeight(); int windowWidth = (int)(sizePercentage * width), windowHeight = (int)(sizePercentage * height); setWidth("" + windowWidth + "px"); setHeight("" + windowHeight + "px"); setPositionX((width - windowWidth)/2); setPositionY((height - windowHeight)/2); resultsBrowser.setWidth("" + (int)(this.getWidth()-margin) + "px"); resultsBrowser.setHeight("" + (int)(this.getHeight() - topHeight - margin) + "px"); } PingWindow(final Node node, final String baseAddress); @Override void attach(); }
PingWindow extends Window { @Override public void attach() { super.attach(); int width = (int)getApplication().getMainWindow().getWidth(); int height = (int)getApplication().getMainWindow().getHeight(); int windowWidth = (int)(sizePercentage * width), windowHeight = (int)(sizePercentage * height); setWidth("" + windowWidth + "px"); setHeight("" + windowHeight + "px"); setPositionX((width - windowWidth)/2); setPositionY((height - windowHeight)/2); resultsBrowser.setWidth("" + (int)(this.getWidth()-margin) + "px"); resultsBrowser.setHeight("" + (int)(this.getHeight() - topHeight - margin) + "px"); } PingWindow(final Node node, final String baseAddress); @Override void attach();  }