After searching the internet looking for an example on how to embed IE on SWT, I found some interesting things and finally got what I was looking for. Embedding IE on SWT is done through OLE automation. The code below shows how you can achieve that:
// Every control must have an associated OleFrame:
OleFrame webFrame =new OleFrame(sash_form, SWT.CENTER);try{// Create an Automation object for access to extended capabilities
OleControlSite webControlSite =new OleControlSite(webFrame, SWT.CENTER,"Shell.Explorer");
oleAutomation =new OleAutomation(webControlSite);
webControlSite.doVerb(OLE.OLEIVERB_INPLACEACTIVATE);int[] rgdispid = oleAutomation.getIDsOfNames(newString[]{"Navigate","URL"});int dispIdMember = rgdispid[0];
Variant[] rgvarg =new Variant[1];
rgvarg[0]=new Variant("http://www.freeroller.net/page/umlauf");int[] rgdispidNamedArgs =newint[1];
rgdispidNamedArgs[0]= rgdispid[1];// identifier of argument
Variant pVarResult = oleAutomation.invoke(dispIdMember, rgvarg, rgdispidNamedArgs);}catch(SWTException ex){
ex.printStackTrace();return;}
Kwel. After that, I started playing with layouts. I had a lot of fun doing that, specially when I discovered SashForm, a special form that automatically adds a splitter (or sash) between his childs. Easy even for a beginner like me :)
The layout is pretty much defined and my todo list now is:
Find a way to resize the Composite that accomodates two or more coolbars when one of then is moved below another;
Learn how to change the cursor to hourglass when a page is loading in the browser and how to add a listener to the OLE control to capture the IE messages;