Package javafx.scene.layout

Examples of javafx.scene.layout.AnchorPane


        updateBox.setAlignment(Pos.CENTER_RIGHT);
        updateBox.setSpacing(5.0);
        AnchorPane.setTopAnchor(updateBox, 5.0);
        AnchorPane.setRightAnchor(updateBox, 5.0);

        anchorPane = new AnchorPane();
        anchorPane.getStyleClass().add("app-list-cell");
        anchorPane.setPrefWidth(400.0);
        anchorPane.setPrefHeight(60.0);

        anchorPane.getChildren().addAll(appNameLabel, versionLabel, statusLabel, applicationActionMenuButton,
View Full Code Here


            }
        });
    }

    public static void setupStagesClass() {
        Pane primarySceneRoot = new AnchorPane();
        primaryScene = new Scene(primarySceneRoot, 600, 400);

        primaryWindow = new Stage();
        primaryWindow.setX(100);
        primaryWindow.setY(100);
        primaryWindow.setScene(primaryScene);

        nodeInsideOfScene = new Rectangle(50, 50, 100, 100);
        nodePartyOutsideOfScene = new Rectangle(550, 350, 100, 100);
        nodeOutsideOfScene = new Rectangle(1000, 1000, 100, 100);

        boundsInsideOfScene = nodeInsideOfScene.getLayoutBounds();
        boundsPartyOutsideOfScene = nodePartyOutsideOfScene.getLayoutBounds();
        boundsOutsideOfScene = nodeOutsideOfScene.getLayoutBounds();

        primarySceneRoot.getChildren().setAll(
            nodeInsideOfScene, nodePartyOutsideOfScene, nodeOutsideOfScene
        );

        primaryWindow.show();
    }
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);
View Full Code Here

    private AnchorPane pane;
    private Stage stage;
    private FxDecorateController controller;

    public FxDecorateScene(Node content, Stage stage) {
        super(new AnchorPane());
        controller = new FxDecorateController(this);
        pane = (AnchorPane) getRoot();
        this.stage = stage;

        Color edges = Color.TRANSPARENT;
View Full Code Here

            public void handle(ActionEvent event) {
                Button btn2 = new Button("Show content 2");
                btn2.setOnAction(new EventHandler<ActionEvent>() {
                    @Override
                    public void handle(ActionEvent event) {
                        AnchorPane content2 = new AnchorPane();
                        content2.setStyle("-fx-background-color: green");
                        content2.setPrefSize(300, 300);

                        SVGPath icon = new SVGPath();
                        icon.setContent("M0,0 L10,0 L10,10 L0,10 Z");
                        icon.setStyle("-fx-fill: green;");
                        bar.addItem("Item 2", icon, content2);
                        bp.setCenter(content2);
                    }
                });

                AnchorPane content1 = new AnchorPane();
                content1.setStyle("-fx-background-color: blue");
                content1.setPrefSize(300, 300);
                content1.getChildren().add(btn2);

                SVGPath icon = new SVGPath();
                icon.setContent("M0,0 L10,0 L10,10 L0,10 Z");
                icon.setStyle("-fx-fill: blue;");
                bar.addItem("Item 1", icon, content1);               
                bp.setCenter(content1);
            }
        });

        AnchorPane homeContent = new AnchorPane();
        homeContent.setStyle("-fx-background-color: red");
        homeContent.setPrefSize(300, 300);
        homeContent.getChildren().add(btn);

        bar.addHome(homeContent);
        bp.setTop(bar);
        bp.setCenter(homeContent);
View Full Code Here

        Label info = new Label("Zum Sch\u00FCtzen auf das Schloss klicken.");
        info.setStyle("-fx-font-size: 12");
        info.setPadding(new Insets(0, 0, 3, 0));
        footerBox.getChildren().add(info);

        AnchorPane anchorpane = new AnchorPane();
        Button helpBtn = new Button("?");
        AquaFx.createButtonStyler().setType(ButtonType.HELP).style(helpBtn);
        anchorpane.getChildren().addAll(footerBox, helpBtn);
        AnchorPane.setBottomAnchor(footerBox, 15.0);
        AnchorPane.setLeftAnchor(footerBox, 17.0);
        AnchorPane.setBottomAnchor(helpBtn, 15.0);
        AnchorPane.setRightAnchor(helpBtn, 15.0);
        pane.setBottom(anchorpane);
View Full Code Here

                    return createPage(pageIndex);
                }
            }
        });
        AnchorPane anchor = new AnchorPane();
        AnchorPane.setTopAnchor(pagination, 10.0);
        AnchorPane.setRightAnchor(pagination, 10.0);
        AnchorPane.setBottomAnchor(pagination, 10.0);
        AnchorPane.setLeftAnchor(pagination, 10.0);
        anchor.getChildren().addAll(pagination);
        Scene scene = new Scene(anchor, 500, 300);
        stage.setScene(scene);
        stage.setTitle("PaginationSample");
        AquaFx.style();
        stage.show();
View Full Code Here


                view.getStylesheets().add(BundleUtils.getFXMLUrl("css_webview").toExternalForm());
                view.setContextMenuEnabled(false);

                final AnchorPane pane = new AnchorPane();
                AnchorPane.setBottomAnchor(view, 0.0);
                AnchorPane.setTopAnchor(view, 0.0);
                pane.getChildren().add(view);

                aboutInfoAccordion.getPanes().add(new TitledPane(fname, pane));
            } catch (MalformedURLException e) {
                logger.warn("Could not load info file -- {}", url);
            } catch (IOException e) {
View Full Code Here

    @FXML
    public void newDoc(ActionEvent event) {

        WebView webView = createWebView();
        AnchorPane anchorPane = new AnchorPane();
        anchorPane.getChildren().add(webView);
        fitToParent(webView);
        Tab tab = createTab();
        tab.setContent(anchorPane);
        tab.selectedProperty().addListener((observableValue, before, after) -> {
            if (after) {
View Full Code Here

    }

    public void addTab(Path path) {

        AnchorPane anchorPane = new AnchorPane();
        WebView webView = createWebView();
        WebEngine webEngine = webView.getEngine();
        webEngine.getLoadWorker().stateProperty().addListener((observableValue1, state, state2) -> {
            if (state2 == Worker.State.SUCCEEDED) {
                webEngine.executeScript(String.format("waitForSetValue('%s')", IOHelper.normalize(IOHelper.readFile(path))));
            }
        });

        anchorPane.getChildren().add(webView);

        fitToParent(webView);

        Tab tab = createTab();
        ((Label) tab.getGraphic()).setText(path.getFileName().toString());
View Full Code Here

TOP

Related Classes of javafx.scene.layout.AnchorPane

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.