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();
}
}
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;
}
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;
}
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);
}
Aggregations