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