All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.openxma.rwt.launch.EmbeddComponent Maven / Gradle / Ivy

The newest version!
package org.openxma.rwt.launch;

import org.eclipse.rwt.lifecycle.IEntryPoint;
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.FormLayout;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;

/**
 * This class controls all aspects of the application's execution
 * and is contributed through the plugin.xml.
 */
public class EmbeddComponent extends OpenxmaLauncher implements IEntryPoint {
			
	/**
	 * 
	 */
	public int createUI() {

		/* create display and shell */
		Display display = new Display();
		final Shell shell = new Shell(display, SWT.NO_TRIM);				
    	shell.setVisible(false);
		shell.setLayout(new FormLayout());
		
		/* embedd openXMA component */
		embeddComponent(determineComponentUrl(),shell);
		
		/* event loop */
		shell.open();
		while (!shell.isDisposed()) {
			if (!display.readAndDispatch()) {
				display.sleep();
			}
		}
		display.dispose();
		return 0;
	}    
    
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy