當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。