本文整理匯總了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());
}
});
}