int SetDimensions (int flags, int x, int y, int cx, int cy) { boolean isChrome = (chromeFlags & nsIWebBrowserChrome.CHROME_OPENAS_CHROME) != 0; if ((flags & nsIEmbeddingSiteWindow.DIM_FLAGS_POSITION) != 0) { location = new Point (x, y); if (isChrome) { browser.getShell ().setLocation (x, y); } } if ((flags & nsIEmbeddingSiteWindow.DIM_FLAGS_SIZE_INNER) != 0) { size = new Point (cx, cy); if (isChrome) { browser.setSize (cx, cy); } } if ((flags & nsIEmbeddingSiteWindow.DIM_FLAGS_SIZE_OUTER) != 0) { if (isChrome) { browser.getShell ().setSize (cx, cy); } } return XPCOM.NS_OK; }
int SetDimensions (int flags, int x, int y, int cx, int cy) { boolean isChrome = (chromeFlags & nsIWebBrowserChrome.CHROME_OPENAS_CHROME) != 0; if ((flags & nsIEmbeddingSiteWindow.DIM_FLAGS_POSITION) != 0) { location = new Point (x, y); if (isChrome) { browser.getShell ().setLocation (x, y); } } if ((flags & nsIEmbeddingSiteWindow.DIM_FLAGS_SIZE_INNER) != 0) { size = new Point (cx, cy); if (isChrome) { browser.setSize (cx, cy); } } if ((flags & nsIEmbeddingSiteWindow.DIM_FLAGS_SIZE_OUTER) != 0) { if (isChrome) { browser.getShell ().setSize (cx, cy); } } return XPCOM.NS_OK; }
int SetDimensions (int flags, int x, int y, int cx, int cy) { boolean isChrome = (chromeFlags & nsIWebBrowserChrome.CHROME_OPENAS_CHROME) != 0; if ((flags & nsIEmbeddingSiteWindow.DIM_FLAGS_POSITION) != 0) { location = new Point (x, y); if (isChrome) { browser.getShell ().setLocation (x, y); } } if ((flags & nsIEmbeddingSiteWindow.DIM_FLAGS_SIZE_INNER) != 0) { size = new Point (cx, cy); if (isChrome) { browser.setSize (cx, cy); } } if ((flags & nsIEmbeddingSiteWindow.DIM_FLAGS_SIZE_OUTER) != 0) { if (isChrome) { browser.getShell ().setSize (cx, cy); } } return XPCOM.NS_OK; }
int SetDimensions (int flags, int x, int y, int cx, int cy) { boolean isChrome = (chromeFlags & nsIWebBrowserChrome.CHROME_OPENAS_CHROME) != 0; if ((flags & nsIEmbeddingSiteWindow.DIM_FLAGS_POSITION) != 0) { location = new Point (x, y); if (isChrome) { browser.getShell ().setLocation (x, y); } } if ((flags & nsIEmbeddingSiteWindow.DIM_FLAGS_SIZE_INNER) != 0) { size = new Point (cx, cy); if (isChrome) { browser.setSize (cx, cy); } } if ((flags & nsIEmbeddingSiteWindow.DIM_FLAGS_SIZE_OUTER) != 0) { if (isChrome) { browser.getShell ().setSize (cx, cy); } } return XPCOM.NS_OK; }
int SetDimensions (int flags, int x, int y, int cx, int cy) { boolean isChrome = (chromeFlags & nsIWebBrowserChrome.CHROME_OPENAS_CHROME) != 0; if ((flags & nsIEmbeddingSiteWindow.DIM_FLAGS_POSITION) != 0) { location = new Point (x, y); if (isChrome) { browser.getShell ().setLocation (x, y); } } if ((flags & nsIEmbeddingSiteWindow.DIM_FLAGS_SIZE_INNER) != 0) { size = new Point (cx, cy); if (isChrome) { browser.setSize (cx, cy); } } if ((flags & nsIEmbeddingSiteWindow.DIM_FLAGS_SIZE_OUTER) != 0) { if (isChrome) { browser.getShell ().setSize (cx, cy); } } return XPCOM.NS_OK; }
shell.setSize(500, 400); Browser browser = new Browser(shell, SWT.NONE); browser.setSize(500, 400); browser.setUrl("http://www.google.com"); shell.open();
Point size = getProvisioningUI().getPolicy().getUpdateDetailsPreferredSize(); if (size != null) { browser.setSize(size);