本文整理汇总了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);
}
示例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;
}
示例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());
}
});
}