Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » scout » Default OS Browser and AbstractBrowserField
Default OS Browser and AbstractBrowserField [message #859527] Fri, 27 April 2012 17:28 Go to next message
Adrian MoserFriend
Messages: 67
Registered: March 2011
Member
When using the AbstractBrowserField in Eclipse Scout running on Windows 7, it is using Internet Explorer to display HTML contents inside a Scout Form.

I have Firefox set as default operating system browser, is there any chance Scout will use Firefox instead of Internet Explorer?

[Updated on: Sun, 29 April 2012 07:49]

Report message to a moderator

Re: Default OS Browser and AbstractBrowserField [message #867538 is a reply to message #859527] Tue, 01 May 2012 10:53 Go to previous message
Andreas Hoegger is currently offline Andreas HoeggerFriend
Messages: 178
Registered: February 2010
Senior Member
To do so you have to install the XULRunner properly (see http://www.eclipse.org/swt/faq.php#howusemozilla). To add the MOZILLA style bit to the browser widget override the createScoutFormToolkit method in your implementation of AbstractSwtEnvironment (default class name is SwtEnvironment).

  @Override
  protected ScoutFormToolkit createScoutFormToolkit(Display display) {
    return new ScoutFormToolkit(new FormToolkit(display) {
      @Override
      public Form createForm(Composite parent) {
        Form f = super.createForm(parent);
        decorateFormHeading(f);
        return f;
      }
    }) {

      @Override
      public Browser createBrowser(Composite container, int style) {
        Browser browser = new Browser(container, SWT.MOZILLA);
        adapt(browser, false, false);
        return browser;
      }
    };
  }


There would be also the way to implement you own SwtScoutBrowserField according your needs (therefore see http://wiki.eclipse.org/Scout/HowTo/Add_a_custom_GUI_component).

- Andreas
Previous Topic:Juno: %trimmedwindow.label.eclipseSDK in the main window.
Next Topic:Saving Form State to XML and Templates
Goto Forum:
  


Current Time: Mon Dec 22 22:20:05 GMT 2014

Powered by FUDForum. Page generated in 1.68653 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software