本文整理了Java中javafx.scene.layout.BorderPane.<init>()
方法的一些代码示例,展示了BorderPane.<init>()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。BorderPane.<init>()
方法的具体详情如下:
包路径:javafx.scene.layout.BorderPane
类名称:BorderPane
方法名:<init>
暂无
代码示例来源:origin: stackoverflow.com
final BorderPane root = new BorderPane();
// construct your VBox
root.setCenter(vbox);
代码示例来源:origin: stackoverflow.com
@Override
public void start(Stage stage) throws Exception {
BorderPane pane = new BorderPane();
ImageView img = new ImageView("http://...");
img.fitWidthProperty().bind(stage.widthProperty());
pane.setCenter(img);
Scene scene = new Scene(pane);
stage.setScene(scene);
stage.show();
}
代码示例来源:origin: stackoverflow.com
public void start(final Stage primaryStage) {
primaryStage.initStyle(StageStyle.UNDECORATED);
BorderPane root = new BorderPane();
primaryStage.setScene(scene);
primaryStage.show();
代码示例来源:origin: stackoverflow.com
public class Bar {
public void createUI(Pane parent) {
BorderPane pane = new BorderPane();
Button btn = new Button("hey");
pane.setCenter(btn);
parent.getChildren().add(pane);
}
}
代码示例来源:origin: stackoverflow.com
Button button1 = new Button("Button 1");
Button button2 = new Button("Button 2");
BorderPane leftPane = new BorderPane();
leftPane.getChildren().add(button1);
BorderPane rightPane = new BorderPane();
rightPane.getChildren().add(button2);
primaryStage.setScene(scene);
primaryStage.setVisible(true);
代码示例来源:origin: stackoverflow.com
vb.setPadding( new Inset(10,10,10,10) );
vb.setSpacing( 10 );
Button yesButton = new Button( "Yes" );
yesButton.setOnAction( new EventHandler<ActionEvent>() {
@Override public void handle( ActionEvent e ) {
Button noButton = new Button( "No" );
noButton.setOnAction( new EventHandler<ActionEvent>() {
@Override public void handle( ActionEvent e ) {
BorderPane bp = new BorderPane();
HBox buttons = new HBox();
buttons.setAlignment( Pos.CENTER );
vb.setPadding( new Inset(10,10,10,10) );
vb.setSpacing( 10 );
Button okButton = new Button( "OK" );
okButton.setAlignment( Pos.CENTER );
okButton.setOnAction( new EventHandler<ActionEvent>() {
BorderPane bp = new BorderPane();
bp.setCenter( okButton );
HBox msg = new HBox();
代码示例来源:origin: stackoverflow.com
BorderPane layout = new BorderPane();
layout.setLeft(optionPane);
layout.setCenter(editorBox);
stage.setScene(new Scene(layout));
stage.show();
代码示例来源:origin: stackoverflow.com
.getHeight());
Scene scene = new Scene(root);
primaryStage.setScene(scene);
primaryStage.show();
BorderPane borderPane = new BorderPane();
ImageView imageView = new ImageView();
Image image = new Image(new FileInputStream(imageFile));
代码示例来源:origin: jfoenixadmin/JFoenix
protected BorderPane createCalendarMonthLabelPane() {
monthYearLabel = new Label();
monthYearLabel.getStyleClass().add(SPINNER_LABEL);
monthYearLabel.setFont(Font.font(ROBOTO, FontWeight.BOLD, 13));
monthYearLabel.setTextFill(DEFAULT_COLOR);
BorderPane monthContainer = new BorderPane();
monthContainer.setMinHeight(50);
monthContainer.setCenter(monthYearLabel);
monthContainer.setPadding(new Insets(2, 12, 2, 12));
return monthContainer;
}
代码示例来源:origin: stackoverflow.com
public class MyPopUp extends Stage {
public MyPopUp () {
super();
this.setTitle("Pop");
this.setResizable(false);
// The important part
this.initModality(Modality.APPLICATION_MODAL);
BorderPane borderPaneOptionPane = new BorderPane();
borderPaneOptionPane.setCenter(new TextArea()); // For example
Button closeButton = new Button("Close");
closeButton.setOnAction(event -> {
this.hide();
});
borderPaneOptionPane.setPadding(new Insets(5));
Scene s = new Scene(borderPaneOptionPane);
this.setScene(s);
}}
代码示例来源:origin: stackoverflow.com
BorderPane root = new BorderPane();
Label centeredText = new Label("I want this text centered!");
Button unorganizedButton = new Button("Press me");
BorderPane.setAlignment(centeredText, Pos.CENTER);
root.setTop(centeredText);
root.setBottom(unorganizedButton);
代码示例来源:origin: stackoverflow.com
public class ContactApp extends Application {
@Override
public void start(Stage primaryStage) throws Exception {
BorderPane root = new BorderPane();
FXMLLoader listLoader = new FXMLLoader(getClass().getResource("list.fxml"));
root.setCenter(listLoader.load());
ListController listController = listLoader.getController();
FXMLLoader editorLoader = new FXMLLoader(getClass().getResource("editor.fxml"));
root.setRight(editorLoader.load());
EditorController editorController = editorLoader.getController();
FXMLLoader menuLoader = new FXMLLoader(getClass().getResource("menu.fxml"));
root.setTop(menuLoader.load());
MenuController menuController = menuLoader.getController();
DataModel model = new DataModel();
listController.initModel(model);
editorController.initModel(model);
menuController.initModel(model);
Scene scene = new Scene(root, 800, 600);
primaryStage.setScene(scene);
primaryStage.show();
}
}
代码示例来源:origin: org.apidesign.html/boot-fx
@Override
public void start(Stage primaryStage) throws Exception {
synchronized (FXBrwsr.class) {
INSTANCE = this;
FXBrwsr.class.notifyAll();
}
BorderPane r = new BorderPane();
Scene scene = new Scene(r, 800, 600);
primaryStage.setScene(scene);
primaryStage.show();
this.root = r;
}
代码示例来源:origin: jfoenixadmin/JFoenix
contentPane.setPadding(new Insets(12));
BorderPane contentContainer = new BorderPane();
contentContainer.setCenter(contentPane);
contentContainer.setMinHeight(50);
contentContainer.setPadding(new Insets(2, 12, 2, 12));
代码示例来源:origin: stackoverflow.com
BorderPane root = new BorderPane();
Button b = new Button("Button");
ToggleButton tb = new ToggleButton("Make Button invisible");
b.visibleProperty().bind(tb.selectedProperty().not());
Button overrideBinding = new Button("Make Button invisible forever");
overrideBinding.setOnAction(e -> b.visibleProperty().bind(new SimpleBooleanProperty(false)));
root.setCenter(new VBox(b, tb, overrideBinding));
代码示例来源:origin: stackoverflow.com
BorderPane root = new BorderPane();
MineSweeperField field = new MineSweeperField();
MineSweepButton msButton = new MineSweepButton(field);
msButton.setText("5");
Button reveal = new Button("Reveal");
Button unreveal = new Button("Unreveal");
Button flag = new Button("Flag");
root.setTop(new VBox(msButton, new HBox(reveal, unreveal, flag)));
reveal.setOnAction(e -> field.setState(State.REVEALED));
unreveal.setOnAction(e -> field.setState(State.UNREVEALED));
flag.setOnAction(e -> field.setState(State.FLAGGED));
代码示例来源:origin: stackoverflow.com
BorderPane root = new BorderPane();
root.setCenter(table);
primaryStage.setScene(new Scene(root));
primaryStage.show();
代码示例来源:origin: stackoverflow.com
@Override
public void start(Stage stage) throws Exception {
stage.setTitle("TGC");
BorderPane root = new BorderPane();
hTitle = addHBox();
border.setTop(hTitle);
border.setLeft(addVBox());
border.setCenter(addGridPane());
Scene scene = new Scene(root, 800, 600, Color.BLACK);
stage.setScene(scene);
stage.show();
}
代码示例来源:origin: torakiki/pdfsam
@Inject
public OpenWithDialog(StylesConfig styles, List<Module> modules) {
initModality(Modality.WINDOW_MODAL);
initStyle(StageStyle.UTILITY);
setResizable(false);
setTitle(DefaultI18nContext.getInstance().i18n("Open with"));
this.modules = modules.stream().sorted(comparing(m -> m.descriptor().getName())).collect(toList());
messageTitle.getStyleClass().add("-pdfsam-open-with-dialog-title");
BorderPane containerPane = new BorderPane();
containerPane.getStyleClass().addAll(Style.CONTAINER.css());
containerPane.getStyleClass().addAll("-pdfsam-open-with-dialog", "-pdfsam-open-with-container");
containerPane.setTop(messageTitle);
BorderPane.setAlignment(messageTitle, Pos.TOP_CENTER);
filesList.setPrefHeight(150);
containerPane.setCenter(filesList);
buttons.getStyleClass().addAll(Style.CONTAINER.css());
containerPane.setBottom(buttons);
BorderPane.setAlignment(buttons, Pos.CENTER);
Scene scene = new Scene(containerPane);
scene.getStylesheets().addAll(styles.styles());
scene.setOnKeyReleased(new HideOnEscapeHandler(this));
setScene(scene);
eventStudio().addAnnotatedListeners(this);
}
代码示例来源:origin: stackoverflow.com
BorderPane root = new BorderPane();
Pane paneCenter= new Pane();
Canvas background= new Canvas(1200,1000);
Canvas animation = new Canvas(1200,1000);
Canvas animation2 = new Canvas(1200,1000);
paneCenter.getChildren().addAll(background, animation, animation2);
root.setCenter(paneCenter);
VBox paneRight = new VBox();
paneRight.setPrefSize(200, 1000);
paneRight.setPadding(new Insets(20));
paneRight.setAlignment(Pos.TOP_CENTER);
Button b1 = new Button("Spawn Civilian");
paneRight.getChildren().add(b1);
root.setRight(paneRight);
Scene scene = new Scene(root, 1400, 1000);
内容来源于网络,如有侵权,请联系作者删除!