本文整理了Java中javafx.scene.layout.BorderPane.setRight()
方法的一些代码示例,展示了BorderPane.setRight()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。BorderPane.setRight()
方法的具体详情如下:
包路径:javafx.scene.layout.BorderPane
类名称:BorderPane
方法名:setRight
暂无
代码示例来源:origin: jfoenixadmin/JFoenix
arrowsContainer.setRight(forwardMonthButton);
arrowsContainer.setPadding(new Insets(4, 12, 2, 12));
arrowsContainer.setPickOnBounds(false);
代码示例来源: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: PhoenicisOrg/phoenicis
/**
* closes the details view
*/
public void closeDetailsView() {
this.content.setRight(null);
}
代码示例来源:origin: PhoenicisOrg/phoenicis
/**
* shows the given Node in the details view
* @param nodeToShow
*/
public void showDetailsView(Node nodeToShow) {
this.content.setRight(nodeToShow);
}
代码示例来源:origin: stackoverflow.com
public void start(Stage stage) throws Exception {
BorderPane root = new BorderPane();
root.setCenter(new Rectangle(100,100, Color.RED));
root.setLeft(new Rectangle(10,10, Color.BLUE));
root.setRight(new Rectangle(10,10, Color.CYAN));
stage.setScene(new Scene(root,300,300));
stage.show();
}
代码示例来源:origin: at.bestsolution.eclipse/org.eclipse.fx.ui.controls
private void updateRightTrim(ObservableValue<? extends Node> o, Node oldValue, Node newValue) {
if (oldValue != null) {
Pane pane = (Pane) lookup("#right-trim-area"); //$NON-NLS-1$
if (pane == null) {
this.trimPane.setRight(null);
} else {
pane.getChildren().remove(oldValue);
}
}
if (newValue != null) {
Pane pane = (Pane) lookup("#right-trim-area"); //$NON-NLS-1$
if (pane == null) {
this.trimPane.setRight(newValue);
} else {
pane.getChildren().add(newValue);
}
}
}
代码示例来源:origin: at.bestsolution.efxclipse.rt/org.eclipse.fx.ui.controls
private void updateRightTrim(ObservableValue<? extends Node> o, Node oldValue, Node newValue) {
if (oldValue != null) {
Pane pane = (Pane) lookup("#right-trim-area"); //$NON-NLS-1$
if (pane == null) {
this.trimPane.setRight(null);
} else {
pane.getChildren().remove(oldValue);
}
}
if (newValue != null) {
Pane pane = (Pane) lookup("#right-trim-area"); //$NON-NLS-1$
if (pane == null) {
this.trimPane.setRight(newValue);
} else {
pane.getChildren().add(newValue);
}
}
}
代码示例来源:origin: stackoverflow.com
public class Test extends Application {
@Override
public void start(Stage stage) {
final SwingNode swingNode1 = new SwingNode();
final SwingNode swingNode2 = new SwingNode();
SwingUtilities.invokeLater(() -> {
swingNode2.setContent(new JButton("Click me!"+2));
swingNode1.setContent(new JButton("Click me!"+1));
});
BorderPane pane = new BorderPane();
pane.setLeft(swingNode1);
pane.setRight(swingNode2);
stage.setScene(new Scene(pane, 200, 50));
stage.show();
}
public static void main(String[] args) {
launch(args);
}
}
代码示例来源: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);
代码示例来源:origin: stackoverflow.com
bottom.setRight(send_text);
BorderPane.setMargin(typebox, new Insets(0, 12, 0, 0));
代码示例来源:origin: stackoverflow.com
private InternalWindow constructWindow() {
// content
ImageView imageView = new ImageView("https://upload.wikimedia.org/wikipedia/commons/thumb/a/a9/Cheetah4.jpg/250px-Cheetah4.jpg");
// title bar
BorderPane titleBar = new BorderPane();
titleBar.setStyle("-fx-background-color: green; -fx-padding: 3");
Label label = new Label("header");
titleBar.setLeft(label);
Button closeButton = new Button("x");
titleBar.setRight(closeButton);
// title bat + content
BorderPane windowPane = new BorderPane();
windowPane.setStyle("-fx-border-width: 1; -fx-border-color: black");
windowPane.setTop(titleBar);
windowPane.setCenter(imageView);
//apply layout to InternalWindow
InternalWindow interalWindow = new InternalWindow();
InternalWindow.setRoot(windowPane);
//drag only by title
interalWindow.makeDragable(titleBar);
interalWindow.makeDragable(label);
interalWindow.makeResizable(20);
interalWindow.makeFocusable();
return interalWindow;
}
代码示例来源:origin: at.bestsolution.efxclipse.rt/org.eclipse.fx.ui.dialogs
titleArea.setRight(new ImageView(new Image(in)));
} catch (IOException e) {
e.printStackTrace();
ImageView image = new ImageView();
image.getStyleClass().addAll("titleDialog_Icon-" + this.iconClass); //$NON-NLS-1$
titleArea.setRight(image);
代码示例来源: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
borderPane.setRight(callButton);
代码示例来源:origin: org.jrebirth.af/component
void reloadButtonBar() {
node().setTop(null);
node().setBottom(null);
node().setLeft(null);
node().setRight(null);
initButtonBar();
}
代码示例来源:origin: stackoverflow.com
root.setRight(paneright);
root.setTop(panetop);
root.setBottom(panebottom);
代码示例来源:origin: org.jrebirth.af/component
private void initButtonBar() {
switch (model().object().orientation()) {
case top:
node().setTop(buildButtonBar(true));
break;
case bottom:
node().setBottom(buildButtonBar(true));
break;
case left:
node().setLeft(buildButtonBar(false));
break;
case right:
node().setRight(buildButtonBar(false));
break;
}
}
代码示例来源:origin: stackoverflow.com
root.setRight(roomContainer);
代码示例来源:origin: com.jfoenix/jfoenix
arrowsContainer.setRight(forwardMonthButton);
arrowsContainer.setPadding(new Insets(4, 12, 2, 12));
arrowsContainer.setPickOnBounds(false);
代码示例来源:origin: org.gillius/jfxutils
borderPane.setRight( replacement );
内容来源于网络,如有侵权,请联系作者删除!