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


Java TitledPane.setTooltip方法代码示例

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


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

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

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

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


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