本文整理汇总了Java中javafx.scene.control.ProgressIndicator.getProgress方法的典型用法代码示例。如果您正苦于以下问题:Java ProgressIndicator.getProgress方法的具体用法?Java ProgressIndicator.getProgress怎么用?Java ProgressIndicator.getProgress使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类javafx.scene.control.ProgressIndicator
的用法示例。
在下文中一共展示了ProgressIndicator.getProgress方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: drawNode
import javafx.scene.control.ProgressIndicator; //导入方法依赖的package包/类
@Override
public Node drawNode() {
GridPane root = new GridPane();
root.setVgap(spacing / 2);
root.setHgap(spacing);
double d, _d = -0.25;
for (int i = 0; _d < 1; i++) {
d = _d + 0.25;
_d = d;
ProgressIndicator ind = progressIndicatorCreate();
VBox box = new VBox();
box.setAlignment(Pos.CENTER);
box.getChildren().add(new Label("[" + d + "]"));
ind.setProgress(d);
if (ind.getProgress() != d) {
reportGetterFailure("progress_indicator.getProgress()");
}
box.getChildren().add(ind);
root.add(box, i % 3, i / 3);
}
return root;
}
示例2: updateProgress
import javafx.scene.control.ProgressIndicator; //导入方法依赖的package包/类
protected void updateProgress() {
final ProgressIndicator control = getSkinnable();
final boolean isIndeterminate = control.isIndeterminate();
if (!(isIndeterminate && wasIndeterminate)) {
arcLength = -360 * control.getProgress();
control.requestLayout();
}
wasIndeterminate = isIndeterminate;
}
示例3: DeterminateIndicator
import javafx.scene.control.ProgressIndicator; //导入方法依赖的package包/类
public DeterminateIndicator(ProgressIndicator control, Paint fillOverride) {
getStyleClass().add("determinate-indicator");
degProgress = (int) (360 * control.getProgress());
getChildren().clear();
// The circular background for the progress pie piece
indicator = new StackPane();
indicator.setScaleShape(false);
indicator.setCenterShape(false);
indicator.getStyleClass().setAll("indicator");
indicatorCircle = new Circle();
indicator.setShape(indicatorCircle);
// The shape for our progress pie piece
arcShape = new Arc();
arcShape.setType(ArcType.ROUND);
arcShape.setStartAngle(90.0F);
// Our progress pie piece
progress = new StackPane();
progress.getStyleClass().setAll("progress");
progress.setScaleShape(false);
progress.setCenterShape(false);
progress.setShape(arcShape);
progress.getChildren().clear();
setFillOverride(fillOverride);
// The check mark that's drawn at 100%
tick = new StackPane();
tick.getStyleClass().setAll("tick");
getChildren().setAll(indicator, progress, tick);
updateProgress(control.getProgress());
}