javafx.scene.layout.BorderPane.getChildren()方法的使用及代码示例

x33g5p2x  于2022-01-16 转载在 其他  
字(4.0k)|赞(0)|评价(0)|浏览(122)

本文整理了Java中javafx.scene.layout.BorderPane.getChildren()方法的一些代码示例,展示了BorderPane.getChildren()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。BorderPane.getChildren()方法的具体详情如下:
包路径:javafx.scene.layout.BorderPane
类名称:BorderPane
方法名:getChildren

BorderPane.getChildren介绍

暂无

代码示例

代码示例来源:origin: PhoenicisOrg/phoenicis

public void addNode(Node widgetToAdd) {
  this.root.getChildren().add(widgetToAdd);
}

代码示例来源:origin: PhoenicisOrg/phoenicis

public void clearAll() {
  root.getChildren().clear();
}

代码示例来源:origin: stackoverflow.com

BorderPane rootLayout = new BorderPane();
rootLayout.getChildren().add(canvas);
Scene scene = new Scene(rootLayout, 500,500);

代码示例来源:origin: stackoverflow.com

private BorderPane root;
 private MapPane mapPane;
 private GUIPane guiPane;
 @Override
 public void start(Stage stage) {
   root = new BorderPane();
   mapPane = new MapPane();            
   guiPane = new GUIPane();
   guiPane.setManaged(false);
   root.setCenter(mapPane);
   root.getChildren().add(guiPane);
   Scene scene = new Scene(root, 800, 600);
   stage.setScene(scene);
   stage.show();
   guiPane.autosize();
   guiPane.layoutXProperty().bind(root.widthProperty().subtract(guiPane.widthProperty()).divide(2));
   guiPane.setLayoutY(20);
 }

代码示例来源:origin: stackoverflow.com

BorderPane root = new BorderPane();
root.getChildren().add(btn);
root.setId("ROOTNODE");
Circle circ = new Circle(100,100,100);
circ.setRadius(60);
root.setClip(circ);

代码示例来源:origin: stackoverflow.com

public class SelectionDemo extends Application {
  @Override
  public void start(Stage primaryStage) {
    Scene scene = new Scene(createPane(), 400, 400);
    primaryStage.setScene(scene);
    primaryStage.show();
  }

  private Parent createPane() {
    BorderPane root = new BorderPane();
    SelectionHandler selectionHandler = new SelectionHandler(root);
    root.addEventHandler(MouseEvent.MOUSE_PRESSED, selectionHandler.getMousePressedEventHandler());

    MyCircle c1 = new MyCircle(40, 40, 20);
    MyCircle c2 = new MyCircle(40, 100, 20);
    MyCircle c3 = new MyCircle(40, 160, 20);
    root.getChildren().addAll(c1, c2, c3);

    return root;
  }

  public static void main(String[] args) {
    launch(args);
  }
}

代码示例来源:origin: stackoverflow.com

MyCircle temp = createCircle(radius_of_circles, (50 * i) + 1, 100);
temp.setFrame(width, height);
root.getChildren().add(temp.getCircle());
temp.getCircle().addEventFilter(MouseEvent.ANY, temp);

代码示例来源:origin: stackoverflow.com

leftPane.getChildren().add(button1);
rightPane.getChildren().add(button2);

代码示例来源:origin: org.controlsfx/controlsfx

private void updateLayout(Orientation orientation) {
  borderPane.getChildren().clear();
  switch (orientation) {
  case HORIZONTAL:
    borderPane.setLeft(minusRegion);
    borderPane.setCenter(slider);
    borderPane.setRight(plusRegion);
    break;
  case VERTICAL:
    borderPane.setTop(plusRegion);
    borderPane.setCenter(slider);
    borderPane.setBottom(minusRegion);
    break;
  }
}

代码示例来源:origin: stackoverflow.com

pane.getChildren().add(rect);

代码示例来源:origin: stackoverflow.com

root.getChildren().add(circle);

代码示例来源:origin: stackoverflow.com

root.getChildren().addAll(pathCircle,objectCircle);

代码示例来源:origin: stackoverflow.com

root.setStyle("-fx-background-color: #efefef");
Group graph = new Group();
root.getChildren().add(graph);
graph.setLayoutX(250);
graph.setLayoutY(250);

代码示例来源:origin: stackoverflow.com

rect.widthProperty().bind(rectX.subtract(rectinitX));
rect.heightProperty().bind(rectY.subtract(rectinitY));
pane.getChildren().add(rect);
stage.show();
    r.setWidth(rect.getWidth());
    r.setHeight(rect.getHeight());
    pane.getChildren().add(r);

代码示例来源:origin: stackoverflow.com

line2.setStroke(Color.BLACK);
root.getChildren().addAll(line, line2);

代码示例来源:origin: stackoverflow.com

r.setOnMouseDragged(mh);
r.setOnMousePressed(mh);
bp.getChildren().add(path);
stage.setScene(scene);

代码示例来源:origin: stackoverflow.com

setPlayerNames().show();
whoseTurn = 'X';
borderPane.getChildren().removeAll(pane, lblStatus);
pane.getChildren().clear();
for (int i = 0; i < 3; i++)

代码示例来源:origin: com.aquafx-project/aquafx

menuView.getItems().addAll(new MenuItem("Zoom In"), new MenuItem("Zoom Out"));
menuBar.getMenus().addAll(menuFile, menuEdit, menuView);
pane.getChildren().add(menuBar);

代码示例来源:origin: com.aquafx-project/aquafx

pane.getChildren().add(menuBar);

相关文章