Package de.espirit.firstspirit.client.gui.applications.browser


package de.espirit.firstspirit.client.gui.applications.browser
Provides interfaces and types for browser based applications in java client.

This package provides types, interfaces and classes, that are to be used for controlling a browser based application in java client.
Since:
4.2.416
Example:
Example how to create a browser application
import de.espirit.firstspirit.client.gui.applications.browser.*;

import de.espirit.firstspirit.access.ServicesBroker;
import de.espirit.firstspirit.client.gui.applications.ApplicationService;
import de.espirit.firstspirit.client.gui.applications.ApplicationTab;


/**
 * Examples how to create a browser application.
 *
 * @since 4.2.416
 */
public class BrowserApplicationExample {

	/**
	 * Opens a browser application tab with the given title and opens the given url.
	 *
	 * @since 4.2.416
	 */
	public BrowserApplication createBrowserApplication(final ServicesBroker serviceBroker, final String title) {
		final ApplicationService appService = serviceBroker.getService(ApplicationService.class);

		// new browser configuration
		final BrowserApplicationConfiguration config = BrowserApplicationConfiguration.GENERATOR.invoke()
				// the title for the application tab
				.title(title)

				// use chrome as engine type for the browser application
				.engineType(EngineType.CHROME);


		// open an application tab of type browser
		final ApplicationTab<BrowserApplication> browserTab = appService.openApplication(BrowserApplication.TYPE, config);

		// get the browser application
		final BrowserApplication browserApplication = browserTab.getApplication();

		// open www.e-spirit.de in the created browser application
		browserApplication.openUrl("www.e-spirit.de");

		return browserApplication;
	}
}