| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> |
| |
| <html> |
| <link href="../../book.css" rel="stylesheet" type="text/css" /> |
| <head> |
| <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> |
| <title>Application integration</title> |
| </head> |
| |
| <body> |
| <h1>Application Integration</h1> |
| <p>Although XWT is bundled in e4, it is in fact designed, developed |
| and tested in classic eclipse environment. It can be used in |
| applications on top of SWT/Jface with or without eclipse platform. So |
| the integration with standard SWT application is really straight |
| forward.</p> |
| |
| <h2>Stand-alone Java application</h2> |
| The module "org.eclipse.xwt" is the core engine of XWT. It depends |
| only on SWT/JFace and JFace data binding. It can be used directly in any |
| stand-alone Java application. |
| |
| <h2>Eclipse integration</h2> |
| The plugin "org.eclipse.xwt.pde" takes over this bridge role between |
| XWT and eclipse environment. It implements mainly all extensions points |
| to extend XWT at the current stage, more integration facilities will be |
| provided in next releases. |
| |
| <h2>Resource loading and UI creation</h2> |
| |
| <p>This paragraph explains the integration concept of XWT in an |
| existing SWT application: how an existing classic SWT applications using |
| XWT. XWT provides some APIs to load a UI component as a child of an |
| existing Composite via the class XWT.</p> |
| <p>The customized UI "UserControl" contains a Button with |
| a selection event, that clicking the button changes the button content from |
| 'Hello, world' to 'OK'.</p> |
| |
| <p><img src="images/mac-feature_20.png" /></p> |
| |
| <p>XWT supports directly integrating user-defined SWT widgets in |
| your declarative UI. <!-- |
| Now integrate the above example into a new XWT |
| component directly. See the screenshot below. |
| -->It's quite easy to implement in XWT XML. You need only to declare the |
| application class path and name in the place where you want. See the |
| example below, it using <tt><y:UserControl /></tt>, <tt>y</tt> is |
| the class path specified in the root as <tt>xmlns:y = |
| "clr-namespace:org.eclipse.xwt.test.usercontrol"</tt>.</p> |
| <p><img src="images/mac-feature_10.png" /></p> |
| |
| <p>Run the Container application and click the button. Implicitly, |
| UserControl application is invoked.</p> |
| <p><img src="images/mac-feature_07.png" /></p> |
| |
| </body> |
| <p><img src="../../cpy.png" /></p> |
| </html> |