Search in sources :

Example 51 with HBox

use of javafx.scene.layout.HBox in project Gargoyle by callakrsos.

the class ComponentClassifier method start.

@Override
public void start(Stage primaryStage) throws Exception {
    FXMLLoader loader = new FXMLLoader();
    loader.setLocation(SystemLayoutViewController.class.getResource("VoEditorView.fxml"));
    try {
        Node node = loader.load();
        // {
        //
        // ObservableList<Node> recursive = recursive(node);
        // print(recursive);
        //
        // }
        // {
        // Group group = new Group();
        //
        // // Text는 Shape클래스의 하위클래스
        // group.getChildren().add(new Text());
        // group.getChildren().add(new Button());
        // group.getChildren().add(new Button());
        // group.getChildren().add(new Label());
        // ObservableList<Node> recursive = recursive(group);
        // print(recursive);
        //
        // }
        // {
        // ScrollPane scrollPane = new ScrollPane();
        // ScrollPane scrollPane2 = new ScrollPane();
        // scrollPane2.setContent(new TextArea());
        // scrollPane.setContent(new BorderPane(scrollPane2));
        // ObservableList<Node> recursive = recursive(scrollPane);
        // print(recursive);
        // }
        {
            BorderPane borderPane = new BorderPane();
            ScrollPane scrollPane2 = new ScrollPane();
            scrollPane2.setContent(new TextArea());
            borderPane.setTop(new HBox(new Button(), new Button(), new HTMLEditor()));
            borderPane.setCenter(new BorderPane(scrollPane2));
            FxControlTreeView tv = new FxControlTreeView(borderPane);
            tv.setOnMouseClicked(event -> {
                System.out.println(tv.getSelectionModel().getSelectedItem());
            });
            Scene scene = new Scene(tv);
            primaryStage.setScene(scene);
            primaryStage.show();
        // List<Node> recursive = recursive(borderPane);
        // print(recursive);
        }
    //
    // Scene scene = new Scene((Parent) node);
    // primaryStage.setScene(scene);
    // primaryStage.show();
    } catch (IOException e) {
        e.printStackTrace();
    }
}
Also used : Button(javafx.scene.control.Button) SystemLayoutViewController(com.kyj.fx.voeditor.visual.main.layout.SystemLayoutViewController) Scene(javafx.scene.Scene) TextArea(javafx.scene.control.TextArea) Control(javafx.scene.control.Control) FXCollections(javafx.collections.FXCollections) Skin(javafx.scene.control.Skin) Function(java.util.function.Function) ArrayList(java.util.ArrayList) Application(javafx.application.Application) Parent(javafx.scene.Parent) ScrollPane(javafx.scene.control.ScrollPane) FXMLLoader(javafx.fxml.FXMLLoader) ReadOnlyProperty(javafx.beans.property.ReadOnlyProperty) Method(java.lang.reflect.Method) HBox(javafx.scene.layout.HBox) Node(javafx.scene.Node) IOException(java.io.IOException) List(java.util.List) Stream(java.util.stream.Stream) Stage(javafx.stage.Stage) FxControlTreeView(com.kyj.fx.voeditor.visual.component.FxControlTreeView) DefaultProperty(javafx.beans.DefaultProperty) HTMLEditor(javafx.scene.web.HTMLEditor) ObservableList(javafx.collections.ObservableList) BorderPane(javafx.scene.layout.BorderPane) SystemLayoutViewController(com.kyj.fx.voeditor.visual.main.layout.SystemLayoutViewController) BorderPane(javafx.scene.layout.BorderPane) HBox(javafx.scene.layout.HBox) TextArea(javafx.scene.control.TextArea) Node(javafx.scene.Node) IOException(java.io.IOException) Scene(javafx.scene.Scene) FXMLLoader(javafx.fxml.FXMLLoader) FxControlTreeView(com.kyj.fx.voeditor.visual.component.FxControlTreeView) Button(javafx.scene.control.Button) ScrollPane(javafx.scene.control.ScrollPane) HTMLEditor(javafx.scene.web.HTMLEditor)

Example 52 with HBox

use of javafx.scene.layout.HBox in project Gargoyle by callakrsos.

the class FxControlsTreeViewExam method getTestNod.

Node getTestNod() {
    /* [시작] 분석하고자하는 UI구조 */
    BorderPane borderPane = new BorderPane();
    ScrollPane scrollPane2 = new ScrollPane();
    scrollPane2.setContent(new TextArea());
    borderPane.setTop(new HBox(new Button(), new Button(), new HTMLEditor()));
    borderPane.setCenter(new BorderPane(scrollPane2));
    /* [끝] 분석하고자하는 UI구조 */
    return borderPane;
}
Also used : BorderPane(javafx.scene.layout.BorderPane) HBox(javafx.scene.layout.HBox) TextArea(javafx.scene.control.TextArea) Button(javafx.scene.control.Button) ScrollPane(javafx.scene.control.ScrollPane) HTMLEditor(javafx.scene.web.HTMLEditor)

Example 53 with HBox

use of javafx.scene.layout.HBox in project fx2048 by brunoborges.

the class GamePane method createToolBar.

private HBox createToolBar() {
    HBox toolbar = new HBox();
    toolbar.setAlignment(Pos.CENTER);
    toolbar.setPadding(new Insets(10.0));
    Button btItem1 = createButtonItem("mSave", "Save Session", t -> gameManager.saveSession());
    Button btItem2 = createButtonItem("mRestore", "Restore Session", t -> gameManager.restoreSession());
    Button btItem3 = createButtonItem("mPause", "Pause Game", t -> gameManager.pauseGame());
    Button btItem4 = createButtonItem("mReplay", "Try Again", t -> gameManager.tryAgain());
    Button btItem5 = createButtonItem("mInfo", "About the Game", t -> gameManager.aboutGame());
    toolbar.getChildren().setAll(btItem1, btItem2, btItem3, btItem4, btItem5);
    Button btItem6 = createButtonItem("mQuit", "Quit Game", t -> gameManager.quitGame());
    toolbar.getChildren().add(btItem6);
    return toolbar;
}
Also used : HBox(javafx.scene.layout.HBox) Insets(javafx.geometry.Insets) Button(javafx.scene.control.Button)

Example 54 with HBox

use of javafx.scene.layout.HBox in project fx2048 by brunoborges.

the class Board method createGrid.

private void createGrid() {
    gridOperator.traverseGrid((i, j) -> {
        gridGroup.getChildren().add(createCell(i, j));
        return 0;
    });
    gridGroup.getStyleClass().add("game-grid");
    gridGroup.setManaged(false);
    gridGroup.setLayoutX(BORDER_WIDTH);
    gridGroup.setLayoutY(BORDER_WIDTH);
    HBox hBottom = new HBox();
    hBottom.getStyleClass().add("game-backGrid");
    hBottom.setMinSize(gridWidth, gridWidth);
    hBottom.setPrefSize(gridWidth, gridWidth);
    hBottom.setMaxSize(gridWidth, gridWidth);
    // Clip hBottom to keep the dropshadow effects within the hBottom
    Rectangle rect = new Rectangle(gridWidth, gridWidth);
    hBottom.setClip(rect);
    hBottom.getChildren().add(gridGroup);
    vGame.getChildren().add(hBottom);
    // toolbar
    HBox hPadding = new HBox();
    hPadding.setMinSize(gridWidth, TOOLBAR_HEIGHT);
    hPadding.setPrefSize(gridWidth, TOOLBAR_HEIGHT);
    hPadding.setMaxSize(gridWidth, TOOLBAR_HEIGHT);
    hToolbar.setAlignment(Pos.CENTER);
    hToolbar.getStyleClass().add("game-backGrid");
    hToolbar.setMinSize(gridWidth, TOOLBAR_HEIGHT);
    hToolbar.setPrefSize(gridWidth, TOOLBAR_HEIGHT);
    hToolbar.setMaxSize(gridWidth, TOOLBAR_HEIGHT);
    vGame.getChildren().add(hPadding);
    vGame.getChildren().add(hToolbar);
}
Also used : HBox(javafx.scene.layout.HBox) Rectangle(javafx.scene.shape.Rectangle)

Aggregations

HBox (javafx.scene.layout.HBox)54 Button (javafx.scene.control.Button)25 Insets (javafx.geometry.Insets)22 Label (javafx.scene.control.Label)22 Scene (javafx.scene.Scene)12 VBox (javafx.scene.layout.VBox)11 BorderPane (javafx.scene.layout.BorderPane)8 Node (javafx.scene.Node)7 InputTextField (io.bitsquare.gui.components.InputTextField)6 TextArea (javafx.scene.control.TextArea)6 Stage (javafx.stage.Stage)6 Popup (io.bitsquare.gui.main.overlays.popups.Popup)5 IOException (java.io.IOException)5 ObservableList (javafx.collections.ObservableList)5 FXML (javafx.fxml.FXML)5 ImageView (javafx.scene.image.ImageView)5 KeyFrame (javafx.animation.KeyFrame)4 Timeline (javafx.animation.Timeline)4 File (java.io.File)3 Group (javafx.scene.Group)3