當前位置: 首頁>>代碼示例>>Java>>正文


Java ProgressIndicator.setPrefWidth方法代碼示例

本文整理匯總了Java中javafx.scene.control.ProgressIndicator.setPrefWidth方法的典型用法代碼示例。如果您正苦於以下問題:Java ProgressIndicator.setPrefWidth方法的具體用法?Java ProgressIndicator.setPrefWidth怎麽用?Java ProgressIndicator.setPrefWidth使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在javafx.scene.control.ProgressIndicator的用法示例。


在下文中一共展示了ProgressIndicator.setPrefWidth方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: WaitPanel

import javafx.scene.control.ProgressIndicator; //導入方法依賴的package包/類
public WaitPanel() {
    ProgressIndicator progressIndicator = new ProgressIndicator();
    progressIndicator.setPrefWidth(64);
    progressIndicator.setPrefHeight(64);

    this.getStyleClass().add("rightPane");

    this.getChildren().add(progressIndicator);
    this.setAlignment(Pos.CENTER);
}
 
開發者ID:PhoenicisOrg,項目名稱:POL-POM-5,代碼行數:11,代碼來源:WaitPanel.java

示例2: nodeForPercentage

import javafx.scene.control.ProgressIndicator; //導入方法依賴的package包/類
private Node nodeForPercentage() {
	final ProgressIndicator progress = new ProgressIndicator(percentageAchieved);
	progress.getStyleClass().add("itrysql-achievement-progress");
	progress.setPrefWidth(LABEL_LOGO_FIXED_WIDTH);
	progress.setMinWidth(LABEL_LOGO_FIXED_WIDTH);
	progress.setMaxWidth(LABEL_LOGO_FIXED_WIDTH);
	return progress;
}
 
開發者ID:Silent-Fred,項目名稱:iTrySQL,代碼行數:9,代碼來源:SingleAchievement.java

示例3: CanvasManager

import javafx.scene.control.ProgressIndicator; //導入方法依賴的package包/類
public CanvasManager(Group canvasGroup, Resetter resetter, String cameraName,
		ObservableList<ShotEntry> shotEntries) {
	this.canvasGroup = canvasGroup;
	config = Configuration.getConfig();
	this.resetter = resetter;
	this.cameraName = cameraName;
	this.shotEntries = shotEntries;

	background.setOnMouseClicked((event) -> {
		toggleTargetSelection(Optional.empty());
	});

	if (Platform.isFxApplicationThread()) {
		progress = new ProgressIndicator(ProgressIndicator.INDETERMINATE_PROGRESS);
		progress.setPrefHeight(config.getDisplayHeight());
		progress.setPrefWidth(config.getDisplayWidth());
		canvasGroup.getChildren().add(progress);
		canvasGroup.getChildren().add(diagnosticsVBox);
		diagnosticsVBox.setAlignment(Pos.CENTER);
		diagnosticsVBox.setFillWidth(true);
		diagnosticsVBox.setPrefWidth(config.getDisplayWidth());
	}

	canvasGroup.setOnMouseClicked((event) -> {
		if (contextMenu.isPresent() && contextMenu.get().isShowing()) contextMenu.get().hide();

		if (config.inDebugMode() && event.getButton() == MouseButton.PRIMARY) {
			// Click to shoot
			final ShotColor shotColor;

			if (event.isShiftDown()) {
				shotColor = ShotColor.RED;
			} else if (event.isControlDown()) {
				shotColor = ShotColor.GREEN;
			} else {
				return;
			}

			// Skip the camera manager for injected shots made from the
			// arena tab otherwise they get scaled before the call to
			// addArenaShot when they go through the arena camera feed's
			// canvas manager
			if (this instanceof MirroredCanvasManager) {
				final long shotTimestamp = System.currentTimeMillis();

				addShot(new DisplayShot(new Shot(shotColor, event.getX(), event.getY(), shotTimestamp), config.getMarkerRadius()), false);
			} else {
				cameraManager.injectShot(shotColor, event.getX(), event.getY(), false);
			}
			return;
		} else if (contextMenu.isPresent() && event.getButton() == MouseButton.SECONDARY) {
			contextMenu.get().show(canvasGroup, event.getScreenX(), event.getScreenY());
		}
	});
}
 
開發者ID:phrack,項目名稱:ShootOFF,代碼行數:56,代碼來源:CanvasManager.java


注:本文中的javafx.scene.control.ProgressIndicator.setPrefWidth方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。