当前位置: 首页>>代码示例>>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;未经允许,请勿转载。