当前位置: 首页>>代码示例>>Java>>正文


Java TitledPane.setMaxHeight方法代码示例

本文整理汇总了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;
}
 
开发者ID:mbari-media-management,项目名称:vars-annotation,代码行数:17,代码来源:FilterableTreeItemDemo.java

示例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();
}
 
开发者ID:Maddosaurus,项目名称:aerofx,代码行数:20,代码来源:GroupboxDemo.java

示例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;
}
 
开发者ID:salimvanak,项目名称:myWMS,代码行数:12,代码来源:OrderStatusPane.java

示例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);
}
 
开发者ID:qupath,项目名称:qupath,代码行数:51,代码来源:ProjectBrowser.java


注:本文中的javafx.scene.control.TitledPane.setMaxHeight方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。