Package javafx.scene.layout

Examples of javafx.scene.layout.Pane


        return categoryBox.get(category);
    }

    @Override
    protected void addCategory(String category) {
        Pane box = createCategoryBox(category);
        categoryBox.put(category, box);
        contentBox.getChildren().add(box);
    }
View Full Code Here


        return evalUnchecked(() -> {
            checkGuiThread();
            // Load the UI from disk.
            URL location = getClass().getResource(name);
            FXMLLoader loader = new FXMLLoader(location);
            Pane ui = loader.load();
            T controller = loader.getController();
            OverlayUI<T> pair = new OverlayUI<>(ui, controller);
            // Auto-magically set the overlayUi member, if it's there.
            controller.getClass().getDeclaredField("overlayUi").set(controller, pair);
            pair.show();
View Full Code Here

        // files for an alert window for you, and then you customise it as you see fit. I guess it makes sense in
        // an odd sort of way.
        Stage dialogStage = new Stage();
        dialogStage.initModality(Modality.APPLICATION_MODAL);
        FXMLLoader loader = new FXMLLoader(GuiUtils.class.getResource("alert.fxml"));
        Pane pane = evalUnchecked(() -> (Pane) loader.load());
        AlertWindowController controller = loader.getController();
        setup.accept(dialogStage, controller);
        dialogStage.setScene(new Scene(pane));
        dialogStage.showAndWait();
    }
View Full Code Here

          printHierarchy(stringBuilder, (Node)lChild, offset + 1);
        }
      }
    }
    else if (n instanceof Pane) {
      Pane lPane = (Pane)n;
      for (Node lChild : lPane.getChildren()) {
        printHierarchy(stringBuilder, lChild, offset + 1);
      }
    }
  }
View Full Code Here

    /**
     * Constructor.
     */
    public ScalableContentPane() {
        setContentPane(new Pane());

        setPrefWidth(USE_PREF_SIZE);
        setPrefHeight(USE_PREF_SIZE);

        needsLayoutProperty().addListener(new ChangeListener<Boolean>() {
View Full Code Here

       
        mainForeground = new Region();
        mainForeground.getStyleClass().setAll("frontFrame");
        mainForeground.setOpacity(1);
       
        pane = new Pane();
        pane.getChildren().setAll(main,mainFrameOut,mainFrame,mainFrameIn,dots,mainForeground);
        pane.setCache(true);

        pane.getChildren().stream().filter((n) -> n instanceof Pane).
                forEach((n) -> iDots=pane.getChildren().indexOf(n) );
View Full Code Here

                break;
        }
    }
   
    private void setDots(){
        dots = new Pane();
        dotMap = new HashMap<>(getSkinnable().ledWidthProperty().intValue() * getSkinnable().ledHeightProperty().intValue());
        for (int i = 0; i < getSkinnable().ledHeightProperty().intValue(); i++) {
            for (int j = 0; j < getSkinnable().ledWidthProperty().intValue(); j++) {
                Circle circ = new Circle(radio,COLOR_OFF);
                dotMap.put(new Integer(j + i * getSkinnable().ledWidthProperty().intValue()), circ);
View Full Code Here

        return categoryBox.get(category);
    }

    @Override
    protected void addCategory(String category) {
        Pane box = createCategoryBox(category);
        categoryBox.put(category, box);
        contentBox.getChildren().add(box);
    }
View Full Code Here

public class TinyTabPaneDemo extends Application {

    @Override public void start(Stage stage) {
        stage.setTitle("Tiny icon-TP");
        AquaFx.styleStage(stage, StageStyle.UTILITY);
        Pane root = new Pane();
        Scene scene = new Scene(root, 215, 300);

        /*
         * Tabpane section
         */
        TabPane tabPane = new TabPane();
        tabPane.setPrefWidth(218);
        AquaFx.createTabPaneStyler().setType(TabPaneType.SMALL_ICON_BUTTONS).style(tabPane);

        Tab tab1 = new Tab();
        Image image = new Image(AquaFx.class.getResource("demo/images/pages/pages.png").toExternalForm());
        ImageView pages = new ImageView(image);
        pages.setPreserveRatio(true);
        pages.setFitHeight(16);
        tab1.setGraphic(pages);
        Label label = new Label("Dokument...");
        label.setPadding(new Insets(15));
        tab1.setContent(label);
        tabPane.getTabs().add(tab1);

        Tab tab2 = new Tab();
        Image image2 = new Image(AquaFx.class.getResource("demo/images/pages/layout.png").toExternalForm());
        ImageView layout = new ImageView(image2);
        layout.setPreserveRatio(true);
        layout.setFitHeight(16);
        tab2.setGraphic(layout);
        Label label2 = new Label("layout");
        label2.setPadding(new Insets(15));
        tab2.setContent(label2);
        tabPane.getTabs().add(tab2);

        Tab tab3 = new Tab();
        Image image3 = new Image(AquaFx.class.getResource("demo/images/pages/umbruch.png").toExternalForm());
        ImageView umbruch = new ImageView(image3);
        umbruch.setPreserveRatio(true);
        umbruch.setFitHeight(16);
        tab3.setGraphic(umbruch);
        Label label3 = new Label("Zeilenumbruch...");
        label3.setPadding(new Insets(15));
        tab3.setContent(label3);
        tabPane.getTabs().add(tab3);

        Tab tab4 = new Tab();
        Image image4 = new Image(AquaFx.class.getResource("demo/images/pages/text.png").toExternalForm());
        ImageView text = new ImageView(image4);
        text.setPreserveRatio(true);
        text.setFitHeight(16);
        tab4.setGraphic(text);
        Label label4 = new Label("Zeilenumbruch...");
        label4.setPadding(new Insets(15));
        tab4.setContent(label4);
        tabPane.getTabs().add(tab4);

        Tab tab5 = new Tab();
        Image image5 = new Image(AquaFx.class.getResource("demo/images/pages/grafik.png").toExternalForm());
        ImageView grafik = new ImageView(image5);
        grafik.setPreserveRatio(true);
        grafik.setFitHeight(16);
        tab5.setGraphic(grafik);
        Label label5 = new Label("Zeilenumbruch...");
        label5.setPadding(new Insets(15));
        tab5.setContent(label5);
        tabPane.getTabs().add(tab5);

        Tab tab6 = new Tab();
        Image image6 = new Image(AquaFx.class.getResource("demo/images/pages/lineal.png").toExternalForm());
        ImageView lineal = new ImageView(image6);
        lineal.setPreserveRatio(true);
        lineal.setFitHeight(16);
        tab6.setGraphic(lineal);
        Label label6 = new Label("Lienal lineal lineal lineal lineal...");
        label6.setPadding(new Insets(15));
        tab6.setContent(label6);
        tabPane.getTabs().add(tab6);

        Tab tab7 = new Tab();
        Image image7 = new Image(AquaFx.class.getResource("demo/images/pages/diagramm.png").toExternalForm());
        ImageView diagramm = new ImageView(image7);
        diagramm.setPreserveRatio(true);
        diagramm.setFitHeight(16);
        tab7.setGraphic(diagramm);
        Label label7 = new Label("diagramm...");
        label7.setPadding(new Insets(15));
        tab7.setContent(label7);
        tabPane.getTabs().add(tab7);

        Tab tab8 = new Tab();
        Image image8 = new Image(AquaFx.class.getResource("demo/images/pages/verknuepfung.png").toExternalForm());
        ImageView verknuepfung = new ImageView(image8);
        verknuepfung.setPreserveRatio(true);
        verknuepfung.setFitHeight(16);
        tab8.setGraphic(verknuepfung);
        Label label8 = new Label("verknuepfung...");
        label8.setPadding(new Insets(15));
        tab8.setContent(label8);
        tabPane.getTabs().add(tab8);

        Tab tab9 = new Tab();
        Image image9 = new Image(AquaFx.class.getResource("demo/images/pages/quicktime.png").toExternalForm());
        ImageView quicktime = new ImageView(image9);
        quicktime.setPreserveRatio(true);
        quicktime.setFitHeight(16);
        tab9.setGraphic(quicktime);
        Label label9 = new Label("quicktime...");
        label9.setPadding(new Insets(15));
        tab9.setContent(label9);
        tabPane.getTabs().add(tab9);

        root.getChildren().add(tabPane);

        AquaFx.style();
        stage.setScene(scene);
        stage.show();
    }
View Full Code Here

public class IconTabPaneDemo extends Application {

    @Override public void start(Stage stage) {
        stage.setTitle("icon-TP");
        AquaFx.styleStage(stage, StageStyle.UNIFIED);
        Pane root = new Pane();
        Scene scene = new Scene(root);

        /*
         * Tabpane section
         */
        TabPane tabPane = new TabPane();
        AquaFx.createTabPaneStyler().setType(TabPaneType.ICON_BUTTONS).style(tabPane);

        Tab tab1 = new Tab("Allgemein");
        Image image = new Image(AquaFx.class.getResource("demo/images/preferences/allgemein.png").toExternalForm());
        ImageView pages = new ImageView(image);
        pages.setPreserveRatio(true);
        pages.setFitHeight(36);
        tab1.setGraphic(pages);
        Label label =new Label("Allgemein...");
        label.setPadding(new Insets(15));
        tab1.setContent(label);
        tabPane.getTabs().add(tab1);

        Tab tab2 = new Tab("Etiketten");
        Image image2 = new Image(AquaFx.class.getResource("demo/images/preferences/labels.png").toExternalForm());
        ImageView layout =  new ImageView(image2);
        layout.setPreserveRatio(true);
        layout.setFitHeight(36);
        tab2.setGraphic(layout);
        Label label2 = new Label("Etiketten");
        label2.setPadding(new Insets(15));
        tab2.setContent(label2);
        tabPane.getTabs().add(tab2);

        Tab tab3 = new Tab("Seitenleiste");
        Image image3 = new Image(AquaFx.class.getResource("demo/images/preferences/seitenleiste.png").toExternalForm());
        ImageView umbruch = new ImageView(image3);
        umbruch.setPreserveRatio(true);
        umbruch.setFitHeight(36);
        tab3.setGraphic(umbruch);
        Label label3 = new Label("seitenleiste...");
        label3.setPadding(new Insets(15));
        tab3.setContent(label3);
        tabPane.getTabs().add(tab3);

        Tab tab4 = new Tab("Erweitert");
        Image image4 = new Image(AquaFx.class.getResource("demo/images/preferences/einstellungen.png").toExternalForm());
        ImageView text = new ImageView(image4);
        text.setPreserveRatio(true);
        text.setFitHeight(36);
        tab4.setGraphic(text);

        VBox vbox = new VBox();
        vbox.setPadding(new Insets(20, 20, 18, 20));
        vbox.setSpacing(8);

        CheckBox box1 = new CheckBox("Alle Dateinamensuffixe einblenden");
        CheckBox box2 = new CheckBox("Vor dem \u00C4ndern eines Suffixes nachfragen");
        box2.setSelected(true);
        CheckBox box3 = new CheckBox("Vor dem Entleeren des Papierkorbs nachfragen");
        box3.setSelected(true);
        CheckBox box4 = new CheckBox("Papierkorb sicher entleeren");

        Label info = new Label("Bei Suchvorg\u00E4ngen:");
        info.setPadding(new Insets(9, 0, 0, 0));

        ObservableList<String> items = FXCollections.observableArrayList("Diesen Mac durchsuchen", "Aktuellen Ordner durchsuchen",
                "Letzten Suchbereich verwenden");
        ChoiceBox<String> choice = new ChoiceBox<String>(items);
       
        choice.getSelectionModel().selectFirst();
        vbox.getChildren().addAll(box1, box2, box3, box4, info, choice);

        tab4.setContent(vbox);
        tabPane.getTabs().add(tab4);
        tabPane.getSelectionModel().selectLast();
        root.getChildren().add(tabPane);

        AquaFx.style();
        stage.setScene(scene);
        stage.show();
    }
View Full Code Here

TOP

Related Classes of javafx.scene.layout.Pane

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.