I want to switch my Eclipse RCP 3.x based on SWT application to Eclipse RCP 4.x and JavaFX but I struggle throught magical @statements and... JavaFx in Eclipse RCP.
The problem I have is to switch from one FX scene to another. I cant figure it out how to get JavaFX primary stage, the code:
private void load()
{
try {
Stage primaryStage = Facade.PrimaryStage;
StackPane page = (StackPane) FXMLLoader.load(getClass().getResource(_fxmlPath));
Scene scene = new Scene(page);
primaryStage.setScene(scene);
primaryStage.setTitle("FXML is Simple");
primaryStage.show();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
I would appreciate any working example how to initialize variable:
Stage primaryStage
Or maybe there is any other way to switch FX scenes?
As there are not so many examples how to use JavaFX in Eclipse RCP 4.x (I feel that non of these even works with newest Eclipse SDK + JavaFX), is this environment good to switch from Eclipse RCP 3.x or is it just "proff of concept"?
e4 on JavaFX is in production ready but i'm not sure what you want to achieve! Did you look at the samples at - see https://wiki.eclipse.org/Efxclipse/Tutorials