@Test public void testAttach() { app.setMainWindow(mainWindow); app.getMainWindow().addWindow(window); assertTrue(app.getMainWindow().getChildWindows().contains(window)); app.getMainWindow().removeWindow(window); assertFalse(app.getMainWindow().getChildWindows().contains(window)); }
@Override public void attach() { super.attach(); int width = (int)getApplication().getMainWindow().getWidth(); int height = (int)getApplication().getMainWindow().getHeight(); 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); alarmsBrowser.setType(Embedded.TYPE_BROWSER); alarmsBrowser.setWidth("" + browserWidth + "px"); alarmsBrowser.setHeight("" + browserHeight + "px"); eventsBrowser.setType(Embedded.TYPE_BROWSER); eventsBrowser.setWidth("" + browserWidth + "px"); eventsBrowser.setHeight("" + browserHeight + "px"); }
EventsAlarmsWindow extends Window { @Override public void attach() { super.attach(); int width = (int)getApplication().getMainWindow().getWidth(); int height = (int)getApplication().getMainWindow().getHeight(); 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); alarmsBrowser.setType(Embedded.TYPE_BROWSER); alarmsBrowser.setWidth("" + browserWidth + "px"); alarmsBrowser.setHeight("" + browserHeight + "px"); eventsBrowser.setType(Embedded.TYPE_BROWSER); eventsBrowser.setWidth("" + browserWidth + "px"); eventsBrowser.setHeight("" + browserHeight + "px"); } }
EventsAlarmsWindow extends Window { @Override public void attach() { super.attach(); int width = (int)getApplication().getMainWindow().getWidth(); int height = (int)getApplication().getMainWindow().getHeight(); 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); alarmsBrowser.setType(Embedded.TYPE_BROWSER); alarmsBrowser.setWidth("" + browserWidth + "px"); alarmsBrowser.setHeight("" + browserHeight + "px"); eventsBrowser.setType(Embedded.TYPE_BROWSER); eventsBrowser.setWidth("" + browserWidth + "px"); eventsBrowser.setHeight("" + browserHeight + "px"); } EventsAlarmsWindow(final Node node, final URL eventsURL, final URL alarmsURL); }
EventsAlarmsWindow extends Window { @Override public void attach() { super.attach(); int width = (int)getApplication().getMainWindow().getWidth(); int height = (int)getApplication().getMainWindow().getHeight(); 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); alarmsBrowser.setType(Embedded.TYPE_BROWSER); alarmsBrowser.setWidth("" + browserWidth + "px"); alarmsBrowser.setHeight("" + browserHeight + "px"); eventsBrowser.setType(Embedded.TYPE_BROWSER); eventsBrowser.setWidth("" + browserWidth + "px"); eventsBrowser.setHeight("" + browserHeight + "px"); } EventsAlarmsWindow(final Node node, final URL eventsURL, final URL alarmsURL); @Override void attach(); }
EventsAlarmsWindow extends Window { @Override public void attach() { super.attach(); int width = (int)getApplication().getMainWindow().getWidth(); int height = (int)getApplication().getMainWindow().getHeight(); 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); alarmsBrowser.setType(Embedded.TYPE_BROWSER); alarmsBrowser.setWidth("" + browserWidth + "px"); alarmsBrowser.setHeight("" + browserHeight + "px"); eventsBrowser.setType(Embedded.TYPE_BROWSER); eventsBrowser.setWidth("" + browserWidth + "px"); eventsBrowser.setHeight("" + browserHeight + "px"); } EventsAlarmsWindow(final Node node, final URL eventsURL, final URL alarmsURL); @Override void attach();  }