本文整理匯總了Java中javafx.scene.control.ProgressBar.setMinWidth方法的典型用法代碼示例。如果您正苦於以下問題:Java ProgressBar.setMinWidth方法的具體用法?Java ProgressBar.setMinWidth怎麽用?Java ProgressBar.setMinWidth使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類javafx.scene.control.ProgressBar
的用法示例。
在下文中一共展示了ProgressBar.setMinWidth方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: createContent
import javafx.scene.control.ProgressBar; //導入方法依賴的package包/類
private GridPane createContent(double progress) {
this.progress = progress;
this.setMinWidth(420);
this.setMaxWidth(420);
this.getStyleClass().add("mw-ui-progressbar-container");
this.getColumnConstraints().addAll(
Util.newColumn(33, "%", HPos.LEFT),
Util.newColumn(33, "%", HPos.CENTER),
Util.newColumn(33, "%", HPos.RIGHT));
ProgressBar pb = new ProgressBar(progress);
pb.getStyleClass().addAll("mw-ui-progressbar");
pb.setMinWidth(420);
pb.setMaxWidth(420);
pb.setMaxHeight(5);
this.add(pb, 0, 0, 3, 1);
this.addRow(1,
createDot(0.0, 1),
createDot(1.0, 70),
createDot(2.0, 140));
this.addRow(2,
createLabel(0.0, labels[0]).setTranslateByHalf(false),
createLabel(1.0, labels[1]),
createLabel(2.0, labels[2]).setTranslateByHalf(true)
);
return this;
}
示例2: createContent4
import javafx.scene.control.ProgressBar; //導入方法依賴的package包/類
private GridPane createContent4(double progress) {
this.progress = progress;
this.setMinWidth(420);
this.setMaxWidth(420);
this.getStyleClass().add("mw-ui-progressbar-container");
this.getColumnConstraints().addAll(
Util.newColumn(25, "%", HPos.LEFT),
Util.newColumn(25, "%", HPos.CENTER),
Util.newColumn(25, "%", HPos.CENTER),
Util.newColumn(25, "%", HPos.RIGHT));
ProgressBar pb = new ProgressBar(progress);
pb.getStyleClass().addAll("mw-ui-progressbar");
pb.setMinWidth(420);
pb.setMaxWidth(420);
pb.setMaxHeight(5);
this.add(pb, 0, 0, 3, 1);
this.addRow(1,
createDot(0.0, 1),
createDot(0.66, 33),
createDot(1.32, 66),
createDot(2.0, 100));
this.addRow(2,
createLabel(0.0, labels[0]).setTranslateByHalf(false),
createLabel(0.66, labels[1]).setTranslateByHalf(false),
createLabel(1.32, labels[2]).setTranslateByHalf(true),
createLabel(2.0, labels[3]).setTranslateByHalf(true)
);
return this;
}
示例3: createStatusBox
import javafx.scene.control.ProgressBar; //導入方法依賴的package包/類
private Node createStatusBox() {
VBox status = new VBox(2);
status.setMaxWidth(240);
status.setMinWidth(240);
status.setPadding(new Insets(3, 3, 0, 5));
nameLabel = ComponentUtil.createCustomLabel("", "player-name-label", status);
titleLabel = ComponentUtil.createCustomLabel("", "player-title-label", status);
albumInfoLabel = ComponentUtil.createCustomLabel("", "player-albuminfo-label", status);
BorderPane statusBox = new BorderPane();
statusBox.getStyleClass().add("player-status-panel");
statusBox.setLeft(status);
HBox progressWrapper = new HBox(5);
progressWrapper.setPadding(new Insets(20, 10, 0, 0));
statusBox.setCenter(progressWrapper);
progress = new ProgressBar();
progress.setOpacity(0);
progress.setProgress(0);
progress.setMinWidth(280);
progress.setMaxWidth(280);
HBox durationWrapper = new HBox();
durationWrapper.setMinWidth(30);
durationWrapper.setAlignment(Pos.BASELINE_CENTER);
currentDurationLabel = ComponentUtil.createText("", "", durationWrapper);
HBox totalDurationWrapper = new HBox();
totalDurationWrapper.setAlignment(Pos.BASELINE_CENTER);
totalDurationWrapper.setMinWidth(30);
totalDurationLabel = ComponentUtil.createText("", "", totalDurationWrapper);
progressWrapper.getChildren().add(durationWrapper);
progressWrapper.getChildren().add(progress);
progressWrapper.getChildren().add(totalDurationWrapper);
HBox spacer = new HBox();
spacer.setMinWidth(10);
progressWrapper.getChildren().add(spacer);
return statusBox;
}