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


Java TitledPane.setCollapsible方法代码示例

本文整理汇总了Java中javafx.scene.control.TitledPane.setCollapsible方法的典型用法代码示例。如果您正苦于以下问题:Java TitledPane.setCollapsible方法的具体用法?Java TitledPane.setCollapsible怎么用?Java TitledPane.setCollapsible使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在javafx.scene.control.TitledPane的用法示例。


在下文中一共展示了TitledPane.setCollapsible方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createAddItemPane

import javafx.scene.control.TitledPane; //导入方法依赖的package包/类
private Node createAddItemPane() {
    HBox box = new HBox(6);
    TextField firstname = new TextField();
    firstname.setPromptText("Enter first name ...");
    TextField lastname = new TextField();
    lastname.setPromptText("Enter last name ...");

    Button addBtn = new Button("Add new actor to \"Folder 1\"");
    addBtn.setOnAction(event -> {
        FilterableTreeItem<Actor> treeItem = new FilterableTreeItem<>(new Actor(firstname.getText(), lastname.getText()));
        folder1.getInternalChildren().add(treeItem);
    });
    addBtn.disableProperty().bind(Bindings.isEmpty(lastname.textProperty()));

    box.getChildren().addAll(firstname, lastname, addBtn);
    TitledPane pane = new TitledPane("Add new element", box);
    pane.setCollapsible(false);
    return pane;
}
 
开发者ID:mbari-media-management,项目名称:vars-annotation,代码行数:20,代码来源:FilterableTreeItemDemo.java

示例2: 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

示例3: InputPane

import javafx.scene.control.TitledPane; //导入方法依赖的package包/类
InputPane(final ObservableList<PathClass> availableClasses) {
	// Input classes - classification will only be applied to objects of this class
	listInputClasses.setItems(availableClasses);
	listInputClasses.getSelectionModel().setSelectionMode(SelectionMode.MULTIPLE);
	listInputClasses.setPrefHeight(200);
	pane = new TitledPane("Input", listInputClasses);
	pane.setCollapsible(false);
	
	listInputClasses.getSelectionModel().selectedItemProperty().addListener((v, o, n) -> {
		// Not sure why, but this needs to be deferred to later...
		Platform.runLater(() -> selectedItemList.setAll(listInputClasses.getSelectionModel().getSelectedItems()));
	});
	
	Tooltip tooltip = new Tooltip("Select input classifications - only objects with these classes will be reclassified");
	pane.setTooltip(tooltip);
	listInputClasses.setTooltip(tooltip);
}
 
开发者ID:qupath,项目名称:qupath,代码行数:18,代码来源:SingleFeatureClassifierCommand.java

示例4: MeasurementPane

import javafx.scene.control.TitledPane; //导入方法依赖的package包/类
MeasurementPane(final ObservableList<String> features) {			
	comboFeatures.setItems(features);
	
	GridPane paneMeasurements = new GridPane();
	paneMeasurements.add(comboFeatures, 0, 0, 2, 1);
	Label labelThreshold = new Label("Threshold");
	labelThreshold.setLabelFor(tfThreshold);
	paneMeasurements.add(labelThreshold, 0, 1, 1, 1);
	paneMeasurements.add(tfThreshold, 1, 1, 1, 1);
	
	paneMeasurements.setHgap(5);
	paneMeasurements.setVgap(5);
	
	pane = new TitledPane("Measurement", paneMeasurements);
	pane.setCollapsible(false);
	
	pane.setTooltip(new Tooltip("Select measurement & threshold used to reclassify objects"));
	
	tfThreshold.textProperty().addListener((v, o, n) -> {
		try {
			threshold.set(Double.parseDouble(n));
		} catch (Exception e) {
			threshold.set(Double.NaN);
		}
	});
}
 
开发者ID:qupath,项目名称:qupath,代码行数:27,代码来源:SingleFeatureClassifierCommand.java

示例5: createFilterPane

import javafx.scene.control.TitledPane; //导入方法依赖的package包/类
private Node createFilterPane() {
    filterField = new TextField();
    filterField.setPromptText("Enter filter text ...");

    TitledPane pane = new TitledPane("Filter", filterField);
    pane.setCollapsible(false);
    return pane;
}
 
开发者ID:mbari-media-management,项目名称:vars-annotation,代码行数:9,代码来源:FilterableTreeItemDemo.java

示例6: initializeDetailsArea

import javafx.scene.control.TitledPane; //导入方法依赖的package包/类
private void initializeDetailsArea() {
    LoggerFacade.getDefault().info(this.getClass(), "Initialize [Details] area"); // NOI18N
    
    final LinkPaneView view = new LinkPaneView();
    presenter = view.getRealPresenter();
    
    final TitledPane titledPane = presenter.getTitledPane();
    titledPane.setExpanded(Boolean.TRUE);
    titledPane.setCollapsible(Boolean.FALSE);
    VBox.setVgrow(titledPane, Priority.ALWAYS);
    
    vbLinkDetails.getChildren().add(titledPane);
}
 
开发者ID:Naoghuman,项目名称:ABC-List,代码行数:14,代码来源:LinkPresenter.java

示例7: 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

示例8: OutputPane

import javafx.scene.control.TitledPane; //导入方法依赖的package包/类
OutputPane(final ObservableList<PathClass> availableClasses) {
	// Target class - output will be classifications of this class where PathObject's measurement > this value
	comboTargetAboveThreshold.setItems(availableClasses);

	// Target class - output will be classifications of this class where PathObject's measurement == this value
	comboTargetEqualsThreshold.setItems(availableClasses);

	// Target class - output will be classifications of this class where PathObject's measurement < this value
	comboTargetBelowThreshold.setItems(availableClasses);
	
	Label labelAbove = new Label("> threshold ");
	labelAbove.setLabelFor(comboTargetAboveThreshold);
	Label labelEquals = new Label("= threshold ");
	labelEquals.setLabelFor(comboTargetEqualsThreshold);
	Label labelBelow = new Label("< threshold ");
	labelBelow.setLabelFor(comboTargetBelowThreshold);

	GridPane gridOutput = new GridPane();
	gridOutput.add(labelAbove, 0, 0);
	gridOutput.add(comboTargetAboveThreshold, 1, 0);
	gridOutput.add(labelEquals, 0, 1);
	gridOutput.add(comboTargetEqualsThreshold, 1, 1);
	gridOutput.add(labelBelow, 0, 2);
	gridOutput.add(comboTargetBelowThreshold, 1, 2);
	gridOutput.setHgap(5);
	gridOutput.setVgap(5);
	pane = new TitledPane("Output", gridOutput);
	pane.setCollapsible(false);
	
	
	pane.setTooltip(new Tooltip("Select output classifications for objects with measurements greater than, equal to, and below the threshold"));

}
 
开发者ID:qupath,项目名称:qupath,代码行数:34,代码来源:SingleFeatureClassifierCommand.java

示例9: ExceptionPopOver

import javafx.scene.control.TitledPane; //导入方法依赖的package包/类
private ExceptionPopOver(String title) {
  super();

  setTitle(title);
  stackTrace.setEditable(false);

  getStyleClass().add(STYLE_CLASS);
  setHeaderAlwaysVisible(true);
  setDetachable(false);

  GridPane.setHalignment(errorMessage, HPos.CENTER);
  GridPane.setValignment(errorMessage, VPos.CENTER);
  GridPane.setHgrow(errorMessage, Priority.ALWAYS);
  GridPane.setMargin(errorMessage, new Insets(5, 5, 5, 5));
  errorMessage.setTextAlignment(TextAlignment.CENTER);


  stackTracePane = new TitledPane("Stack Trace", stackTrace);
  stackTracePane.managedProperty().bind(stackTracePane.visibleProperty());
  stackTracePane.setTextFill(Color.GRAY);
  stackTracePane.setCollapsible(true);
  stackTracePane.setExpanded(false);
  final Accordion accordion = new Accordion(stackTracePane);

  GridPane.setVgrow(accordion, Priority.ALWAYS);
  GridPane.setHgrow(accordion, Priority.ALWAYS);

  final GridPane expContent = new GridPane();
  expContent.setVgap(10);
  expContent.setMaxWidth(Double.MAX_VALUE);
  expContent.add(errorMessage, 0, 0);
  expContent.add(accordion, 0, 1);

  setContentNode(expContent);
}
 
开发者ID:WPIRoboticsProjects,项目名称:GRIP,代码行数:36,代码来源:ExceptionWitnessResponderButton.java

示例10: LeftPanel

import javafx.scene.control.TitledPane; //导入方法依赖的package包/类
public LeftPanel() {
    //Begin left component list
    leftList = new ListView<>();
    //End left component list

    //Begin left hierarchy panel
    hierarchyPane = new HierarchyPane();
    hierarchyTitledPane = new TitledPane(LabelGrabber.getLabel("hierarchy.tab.title"), hierarchyPane);
    hierarchyTitledPane.setCollapsible(false);
    hierarchyTitledPane.setMinWidth(205);
    hierarchyTitledPane.setMaxWidth(205);
    //End left hierarchy panel

    getItems().addAll(leftList, hierarchyTitledPane);
}
 
开发者ID:JavaFX-GUI-Builder,项目名称:GUI-Builder,代码行数:16,代码来源:LeftPanel.java

示例11: AeroGroupBoxSkin

import javafx.scene.control.TitledPane; //导入方法依赖的package包/类
/**
 * Takes a TitledPane, styles it as GroupBox and binds the textProperty to the title.
 * The border can be style via the CSS-class <code>group-box-border</code>
 * @param p Pane to be styled
 */
public AeroGroupBoxSkin(TitledPane p) {
    super(p);
    titleLabel = new Label("");
    titleLabel.textProperty().bind(p.textProperty());
    getChildren().add(titleLabel);
    captionBg = new Rectangle();
    p.setCollapsible(false);
    captionBg.setStyle("-fx-fill:transparent;");
    groupBoxBg = new Rectangle();
    groupBoxBg.setStyle("-fx-fill:transparent;");
    clippingRect = new Rectangle();
    getChildren().add(groupBoxBg);
    groupBoxBg.getStyleClass().add("group-box-border");
    if (p.getContent() != null)
        getChildren().add(p.getContent());
    p.setPadding(new Insets(7, 0, 0, 0));

    focusListener = new InvalidationListener() {
        @Override
        public void invalidated(Observable observable) {
            if (p.isFocused()) {
                Node content = p.getContent();
                if (content != null && content instanceof Parent) {
                    if (((Parent) content).getChildrenUnmodifiable().size() > 0)
                        ((Parent) content).getChildrenUnmodifiable().get(0).requestFocus();
                }
            }
        }
    };
    p.focusedProperty().addListener(focusListener);
}
 
开发者ID:Maddosaurus,项目名称:aerofx,代码行数:37,代码来源:AeroGroupBoxSkin.java

示例12: AbstractPopUpView

import javafx.scene.control.TitledPane; //导入方法依赖的package包/类
public AbstractPopUpView(Stage parentStage, /*EMRView emrView,*/ Double width, Double height){
	this.stage = new Stage();
	this.stage.initStyle(StageStyle.TRANSPARENT);
	
	this.root = new StackPane();
	root.getStyleClass().add("popUp");
	root.autosize();
	
	 
	TitledPane titledPane = new TitledPane();
	titledPane.autosize();
	titledPane.setExpanded(true);
	titledPane.setCollapsible(false);
	
	WindowButtons buttonsPane = new WindowButtons(this.stage);
	root.getChildren().add(buttonsPane);
	HBox.setHgrow(root, Priority.ALWAYS);
	root.getChildren().add( new Text("Window under progress...") );
	
	// Creating a scene with the specified size.
    this.scene = new Scene(root, width, height, Color.TRANSPARENT);
	scene.getStylesheets().add("/styles/sample.css");
	stage.setScene(scene);
	stage.initOwner( parentStage);
	stage.initModality(Modality.APPLICATION_MODAL);
	stage.show();
}
 
开发者ID:SaiPradeepDandem,项目名称:javafx-demos,代码行数:28,代码来源:AbstractPopUpView.java

示例13: create

import javafx.scene.control.TitledPane; //导入方法依赖的package包/类
public AnchorPane create() throws Exception {
    AnchorPane anchorPane = new AnchorPane();
    anchorPane.setId("AnchorPane");
    anchorPane.setMinHeight(Control.USE_PREF_SIZE);
    anchorPane.setMinWidth(Control.USE_PREF_SIZE);
    anchorPane.setPrefHeight(Control.USE_COMPUTED_SIZE);
    anchorPane.setPrefWidth(Control.USE_COMPUTED_SIZE);
    TitledPane titledPane = new TitledPane();
    titledPane.setAnimated(false);
    titledPane.setCollapsible(false);
    titledPane.setPrefHeight(Control.USE_COMPUTED_SIZE);
    titledPane.setPrefWidth(Control.USE_COMPUTED_SIZE);
    titledPane.setText(bundle.getString("GSSCopySection"));
    AnchorPane.setBottomAnchor(titledPane, 0.0);
    AnchorPane.setLeftAnchor(titledPane, 0.0);
    AnchorPane.setRightAnchor(titledPane, 0.0);
    AnchorPane.setTopAnchor(titledPane, 0.0);
    VBox vBox3 = new VBox();
    vBox3.setPrefHeight(Control.USE_COMPUTED_SIZE);
    vBox3.setPrefWidth(Control.USE_COMPUTED_SIZE);
    vBox3.setSpacing(5.0);
    controlCopyrightNotice = new TextArea();
    controlCopyrightNotice.setMinHeight(50.0);
    controlCopyrightNotice.setMinWidth(100.0);
    controlCopyrightNotice.setPrefWidth(Control.USE_COMPUTED_SIZE);
    controlCopyrightNotice.setPromptText(bundle.getString("GSSCopySection_Desc"));
    controlCopyrightNotice.setWrapText(true);
    VBox.setVgrow(controlCopyrightNotice, Priority.ALWAYS);
    vBox3.getChildren().add(controlCopyrightNotice);
    Insets insets5 = new Insets(10.0, 10.0, 10.0, 10.0);
    vBox3.setPadding(insets5);
    titledPane.setContent(vBox3);
    anchorPane.getChildren().add(titledPane);
    initialize(null, bundle);
    return anchorPane;
}
 
开发者ID:DigiArea,项目名称:closurefx-builder,代码行数:37,代码来源:GSSCopySectionController.java

示例14: drawNode

import javafx.scene.control.TitledPane; //导入方法依赖的package包/类
@Override
public Node drawNode() {
    TitledPane titled_pane = (TitledPane) createObject();
    titled_pane.setCollapsible(false);
    return titled_pane;
}
 
开发者ID:teamfx,项目名称:openjfx-8u-dev-tests,代码行数:7,代码来源:TitledPaneApp.java

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