0
我想弄清楚JavaFX API调用等效于FXML AnchorPane.topAnchor(和底部,右侧,左侧锚点)属性。通常FXML属性似乎是对象的属性,但似乎没有一个AnchorPane类型属性或返回此类型对象的任何其他属性。API版本AnchorPane.topAnchor FXML属性?
举例来说,如果我有以下FXML
<BorderPane fx:id="borderPane" AnchorPane.bottomAnchor="4.0"
AnchorPane.leftAnchor="4.0"
AnchorPane.rightAnchor="4.0"
AnchorPane.topAnchor="30.0"> .... more FXML here
什么是相关的Java API调用设置anchorpane锚?
例如
BorderPane borderPane = new BorderPane();
//
// What method calls on borderPane would set the anchors?
//
感谢您的任何指示。
- chooks
的AnchorPane [文档】(http://docs.oracle.com/javafx/2/api/javafx /scene/layout/AnchorPane.html)告诉你如何在** Anchor Constraints **部分下执行此操作。 – OttPrime