1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
|
Display display = new Display();
Shell shell = new Shell(display);
shell.setLayout(new GridLayout());
shell.setText("Test");
//ajout d'une icone arpege dans le shell
Image icon = new Image(display,Constantes.IMAGE_FAVICON);
shell.setImage(icon);
final Browser browser;
browser = new Browser(shell, SWT.NONE);
GridData data = new GridData(GridData.FILL_BOTH);
data.verticalSpan = 4;
browser.setLayoutData(data);
System.out.println("url : "+url);
System.out.println("datas : "+datas);
browser.setUrl(url, datas, null);
shell.open();
//activer le focus sur le shell
shell.forceActive(); |