Package javafx.scene

Examples of javafx.scene.Parent


public class MainApp extends Application {

    @Override
    public void start(Stage stage) throws Exception {
        Parent root = FXMLLoader.load(getClass().getResource("/fxml/Scene.fxml"));
       
        Scene scene = new Scene(root);
        scene.getStylesheets().add("/styles/Styles.css");
       
        stage.setTitle("JavaFX and Maven");
View Full Code Here


*/
public class KirjastoX extends Application {
   
    @Override
    public void start(Stage stage) throws Exception {
        Parent root = FXMLLoader.load(getClass().getResource("view/FXMLDocument.fxml"));
       
        Scene scene = new Scene(root);
       
        stage.setScene(scene);
        stage.show();
View Full Code Here

        }
        return loader;
    }

    public Parent getView() {
        Parent parent = getLoader().getRoot();
        addCSSIfAvailable(parent);
        return parent;
    }
View Full Code Here

            throw new IllegalStateException("Cannot load " + conventionalName, ex);
        }
    }

    public Parent getView() {
        Parent parent = this.loader.getRoot();
        addCSSIfAvailable(parent);
        return parent;
    }
View Full Code Here

        this.loader = loader;
        this.stage = stage;
    }

    public Parent display(Window window) {
        Parent parent = loader.load(window.getFxmlFile());
        stage.setScene(new Scene(parent));
        stage.setMinWidth(650);
        stage.setMinHeight(400);
        return parent;
    }
View Full Code Here

    }

    void createStart(Stage stage) {
        pico = registerComponents(stage);
        WindowViewModel stageModel = pico.getComponent(WindowViewModel.class);
        Parent parent = stageModel.displayStart();
        pico.start();
    }
View Full Code Here

        context = SpringApplication.run(SpringAppConfig.class);
        tablePopupLoader.setControllerFactory(context::getBean);
        parentLoader.setControllerFactory(context::getBean);

        AnchorPane tableAnchor = tablePopupLoader.load(getClass().getResourceAsStream("/fxml/TablePopup.fxml"));
        Parent root = parentLoader.load(getClass().getResourceAsStream("/fxml/Scene.fxml"));
        controller = parentLoader.getController();
        HostServicesDelegate hostServices = HostServicesFactory.getInstance(this);
        controller.setHostServices(hostServices);

        Scene scene = new FxDecorateScene(root, stage);
View Full Code Here

   *
   * @param node
   *            Node to which the tooltip need to be shown.
   */
  private void showToolTip(StackPane node) {
    final Parent parent = node.getParent();
    final Bounds childBounds = node.getBoundsInParent();
    final Bounds parentBounds = parent.localToScene(parent.getBoundsInLocal());
    double layoutX = childBounds.getMinX() + parentBounds.getMinX() + parent.getScene().getX() + parent.getScene().getWindow().getX();
    double layoutY = childBounds.getMaxY() + parentBounds.getMinY() + parent.getScene().getY() + parent.getScene().getWindow().getY();
    getPopup().show(node, layoutX, layoutY + 5);
  }
View Full Code Here

   
    @Override
    public void start(Stage primaryStage) throws IOException {

        final ResourceBundle resources = ResourceBundle.getBundle(GravatarViewer.class.getName());
        final Parent root = FXMLLoader.load(getClass().getResource("GravatarViewer.fxml"), resources);

        StageBuilder.create()
                .title(resources.getString("APP_TITLE"))
                .resizable(false)
                .scene(SceneBuilder.create()
View Full Code Here

    private void showMainStage(final LauncherConfiguration launcherConfiguration) throws IOException {
        mainStage = new Stage(StageStyle.DECORATED);

        // launcher frame
        FXMLLoader fxmlLoader;
        Parent root;
        /* Fall back to default language if loading the FXML file files with the current locale */
        try {
            fxmlLoader = BundleUtils.getFXMLLoader("application");
            root = (Parent) fxmlLoader.load();
        } catch (IOException e) {
View Full Code Here

TOP

Related Classes of javafx.scene.Parent

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.