Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
Difference between revisions of "Efxclipse/Tutorials/Tutorial2"
(New page: = Create an Eclipse ViewPart = JavaFX allows you to embed JavaFX scenes into SWT UIs using the FXCanvas class. The following tutorial will guide you through the creation of a JavaFX-enabl...) |
(→Create an Eclipse ViewPart) |
||
Line 1: | Line 1: | ||
− | = Create an Eclipse ViewPart = | + | == Create an Eclipse ViewPart == |
JavaFX allows you to embed JavaFX scenes into SWT UIs using the FXCanvas class. The following tutorial will guide you through the creation of a JavaFX-enabled ViewPart. | JavaFX allows you to embed JavaFX scenes into SWT UIs using the FXCanvas class. The following tutorial will guide you through the creation of a JavaFX-enabled ViewPart. | ||
+ | |||
+ | <ol> | ||
+ | <li>File > New > Project ... </li> | ||
+ | <li>Select "Plug-in Project" and click the "Next" button. </li> | ||
+ | <li>Enter a project name and click the "Next" button. </li> | ||
+ | <li>Make sure that "This plug-in will make contributions to the UI" is checked and deselect the RCP creation. Click "Next".</li> | ||
+ | <li>Select the "JavaFX Eclipse 3.x ViewPart" template and click "Next".</li> | ||
+ | <li>Keep the default settings and click "Finish". </li> | ||
+ | <li>The result of the wizard is a new OSGi bundle with your ViewPart class. </li> | ||
+ | <li>Implement your view by adding some JavaFX code to your ViewPart class. </li> | ||
+ | <li>Launch an "inner Eclipse" by bringing up the context menu on your project and select Run As > Eclipse Application </li> | ||
+ | <li>In the running application, bring up Quick Access (Ctrl+3) and enter "My Fx View". Select the presented choice to open your view. </li> | ||
+ | <li>A view with your JavaFX content will be shown at the bottom. </li> | ||
+ | </ol> |
Revision as of 08:05, 26 July 2013
Create an Eclipse ViewPart
JavaFX allows you to embed JavaFX scenes into SWT UIs using the FXCanvas class. The following tutorial will guide you through the creation of a JavaFX-enabled ViewPart.
- File > New > Project ...
- Select "Plug-in Project" and click the "Next" button.
- Enter a project name and click the "Next" button.
- Make sure that "This plug-in will make contributions to the UI" is checked and deselect the RCP creation. Click "Next".
- Select the "JavaFX Eclipse 3.x ViewPart" template and click "Next".
- Keep the default settings and click "Finish".
- The result of the wizard is a new OSGi bundle with your ViewPart class.
- Implement your view by adding some JavaFX code to your ViewPart class.
- Launch an "inner Eclipse" by bringing up the context menu on your project and select Run As > Eclipse Application
- In the running application, bring up Quick Access (Ctrl+3) and enter "My Fx View". Select the presented choice to open your view.
- A view with your JavaFX content will be shown at the bottom.