本文整理汇总了Java中javafx.scene.layout.FlowPane.setPrefSize方法的典型用法代码示例。如果您正苦于以下问题:Java FlowPane.setPrefSize方法的具体用法?Java FlowPane.setPrefSize怎么用?Java FlowPane.setPrefSize使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类javafx.scene.layout.FlowPane
的用法示例。
在下文中一共展示了FlowPane.setPrefSize方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createIconContent
import javafx.scene.layout.FlowPane; //导入方法依赖的package包/类
public static Node createIconContent() {
StackPane sp = new StackPane();
FlowPane fp = new FlowPane();
fp.setAlignment(Pos.CENTER);
Rectangle rectangle = new Rectangle(62, 62, Color.LIGHTGREY);
rectangle.setStroke(Color.BLACK);
fp.setPrefSize(rectangle.getWidth(), rectangle.getHeight());
Rectangle[] littleRecs = new Rectangle[4];
Rectangle[] bigRecs = new Rectangle[4];
for (int i = 0; i < 4; i++) {
littleRecs[i] = new Rectangle(14, 14, Color.web("#1c89f4"));
bigRecs[i] = new Rectangle(16, 12, Color.web("#349b00"));
fp.getChildren().addAll(littleRecs[i], bigRecs[i]);
FlowPane.setMargin(littleRecs[i], new Insets(2, 2, 2, 2));
}
sp.getChildren().addAll(rectangle, fp);
return new Group(sp);
}
示例2: start
import javafx.scene.layout.FlowPane; //导入方法依赖的package包/类
@Override
public void start(Stage primaryStage) throws Exception {
Platform.setImplicitExit(true);
SearchTreePaneController paneBuilder = new SearchTreePaneController(conceptService, uiBundle);
BorderPane node = paneBuilder.getRoot();
FlowPane pane = new FlowPane();
pane.setPrefSize(800, 250);
DragPaneDecorator dragPaneDecorator = new DragPaneDecorator(conceptService, eventBus, uiBundle);
dragPaneDecorator.decorate(pane);
node.setBottom(pane);
Scene scene = new Scene(node, 800, 800);
scene.getStylesheets().add("/css/common.css");
primaryStage.setScene(scene);
primaryStage.show();
primaryStage.setOnCloseRequest(e -> {
Platform.exit();
System.exit(0);
});
}
示例3: baseFill
import javafx.scene.layout.FlowPane; //导入方法依赖的package包/类
protected FlowPane baseFill(FlowPane flowPane) {
controls.clear();
for ( int k=0; k<2; ++k) {
controls.add(page.createNode());
}
flowPane.getChildren().addAll(controls);
flowPane.setPrefSize(310, 310);
flowPane.setMinSize(310, 310);
if (withStyle) {
flowPane.setStyle("-fx-border-color: darkgray;");
}
return flowPane;
}
示例4: baseFill
import javafx.scene.layout.FlowPane; //导入方法依赖的package包/类
protected FlowPane baseFill(FlowPane flowPane) {
controlNodes.clear();
for (ControlsFactory controlToBeCreated : controlsToUse) {
controlNodes.add(controlToBeCreated.createNode());
}
flowPane.getChildren().addAll(controlNodes);
flowPane.setPrefSize(310, 310);
flowPane.setMinSize(310, 310);
if (withStyle) {
flowPane.setStyle("-fx-border-color: darkgray;");
}
return flowPane;
}
示例5: baseFill
import javafx.scene.layout.FlowPane; //导入方法依赖的package包/类
protected FlowPane baseFill(FlowPane pane) {
controls.clear();
for ( int k=0; k<2; ++k) {
controls.add(page.createNode());
}
pane.getChildren().addAll(controls);
pane.setPrefSize(240, 240);
pane.setMinSize(140, 140);
//(new FillerWithAllNodes()).fill(pane);
if (withStyle) {
pane.setStyle("-fx-border-color: darkgray;");
}
return pane;
}
示例6: baseFill
import javafx.scene.layout.FlowPane; //导入方法依赖的package包/类
protected FlowPane baseFill(FlowPane pane) {
pane.setPrefSize(140, 140);
pane.setMinSize(140, 140);
(new FillerWithAllNodes()).fill(pane);
if (withStyle) {
pane.setStyle("-fx-border-color: darkgray;");
}
return pane;
}
示例7: baseFill
import javafx.scene.layout.FlowPane; //导入方法依赖的package包/类
protected FlowPane baseFill(FlowPane pane) {
pane.setPrefSize(130, 130);
(new FillerWithAllNodes()).fill(pane);
if (withStyle) {
pane.setStyle("-fx-border-color: darkgray;");
}
return pane;
}