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