本文整理汇总了Java中javafx.scene.control.TitledPane.setMaxHeight方法的典型用法代码示例。如果您正苦于以下问题:Java TitledPane.setMaxHeight方法的具体用法?Java TitledPane.setMaxHeight怎么用?Java TitledPane.setMaxHeight使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类javafx.scene.control.TitledPane
的用法示例。
在下文中一共展示了TitledPane.setMaxHeight方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createFilteredTree
import javafx.scene.control.TitledPane; //导入方法依赖的package包/类
private Node createFilteredTree() {
FilterableTreeItem<Actor> root = getTreeModel();
root.predicateProperty().bind(Bindings.createObjectBinding(() -> {
if (filterField.getText() == null || filterField.getText().isEmpty())
return null;
return TreeItemPredicate.create(actor -> actor.toString().contains(filterField.getText()));
}, filterField.textProperty()));
TreeView<Actor> treeView = new TreeView<>(root);
treeView.setShowRoot(false);
TitledPane pane = new TitledPane("Filtered TreeView", treeView);
pane.setCollapsible(false);
pane.setMaxHeight(Double.MAX_VALUE);
return pane;
}
示例2: start
import javafx.scene.control.TitledPane; //导入方法依赖的package包/类
@Override
public void start(Stage primaryStage) throws Exception {
Pane root = new StackPane();
CheckBox bt = new CheckBox("eieieie");
StackPane sp = new StackPane(bt);
TitledPane tp = new TitledPane();
Scene myScene = new Scene(root, 402, 446);
tp.setLayoutX(20);
tp.setLayoutY(20);
tp.setText("foo");
tp.setMaxWidth(180);
tp.setMaxHeight(150);
AeroFX.styleGroupBox(tp);
AeroFX.style();
tp.setContent(sp);
root.getChildren().add(tp);
primaryStage.setScene(myScene);
primaryStage.show();
}
示例3: titled
import javafx.scene.control.TitledPane; //导入方法依赖的package包/类
private Node titled(String title, int col, Node content) {
TitledPane t = new TitledPane(title, content);
t.setCollapsible(false);
t.setMaxHeight(Double.MAX_VALUE);
GridPane.setColumnIndex(t, col);
GridPane.setFillHeight(t, true);
GridPane.setFillWidth(t, true);
GridPane.setHgrow(t, Priority.ALWAYS);
GridPane.setVgrow(t, Priority.ALWAYS);
return t;
}
示例4: ProjectBrowser
import javafx.scene.control.TitledPane; //导入方法依赖的package包/类
public ProjectBrowser(final QuPathGUI qupath) {
this.project = qupath.getProject();
this.qupath = qupath;
qupath.addImageDataChangeListener(this);
panel = new BorderPane();
tree.setCellFactory(new Callback<TreeView<Object>, TreeCell<Object>>() {
@Override public TreeCell<Object> call(TreeView<Object> treeView) {
return new ImageEntryCell();
}
});
tree.setRoot(null);
tree.setContextMenu(getPopup());
tree.setOnKeyPressed(e -> {
if (e.getCode() == KeyCode.ENTER) {
qupath.openImageEntry(getSelectedEntry());
e.consume();
}
});
tree.setOnMouseClicked(e -> {
if (e.getClickCount() > 1) {
qupath.openImageEntry(getSelectedEntry());
e.consume();
}
});
TitledPane titledTree = new TitledPane("Image list", tree);
titledTree.setCollapsible(false);
titledTree.setMaxHeight(Double.MAX_VALUE);
BorderPane panelTree = new BorderPane();
panelTree.setCenter(titledTree);
panel.setCenter(panelTree);
Button btnOpen = qupath.getActionButton(GUIActions.PROJECT_OPEN, false);
Button btnCreate = qupath.getActionButton(GUIActions.PROJECT_NEW, false);
Button btnAdd = qupath.getActionButton(GUIActions.PROJECT_IMPORT_IMAGES, false);
GridPane paneButtons = PanelToolsFX.createColumnGridControls(btnCreate, btnOpen, btnAdd);
paneButtons.prefWidthProperty().bind(panel.widthProperty());
paneButtons.setPadding(new Insets(5, 5, 5, 5));
panel.setTop(paneButtons);
}