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


package de.espirit.firstspirit.client.gui.applications
Provides interfaces and types to control the java client application area.

This package provides types, interfaces and classes, that are to be used for controlling the application area in java client.
Since:
4.2.416
Example:
Example how to create a simple browser based 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;
	}
}