當前位置: 首頁>>代碼示例>>Java>>正文


Java ProgressIndicator類代碼示例

本文整理匯總了Java中javafx.scene.control.ProgressIndicator的典型用法代碼示例。如果您正苦於以下問題:Java ProgressIndicator類的具體用法?Java ProgressIndicator怎麽用?Java ProgressIndicator使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


ProgressIndicator類屬於javafx.scene.control包,在下文中一共展示了ProgressIndicator類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: initData

import javafx.scene.control.ProgressIndicator; //導入依賴的package包/類
@Override
public void initData(Parent node, Map<String, String> bundle) {
	progressbar = (ProgressIndicator) node.lookup("#progressbar");

	iv_sync = (ImageView) node.lookup("#iv_sync");
	iv_down = (ImageView) node.lookup("#iv_down");

	iv_sync.setOnMouseEntered(e-> {
		iv_sync.setImage(sync_enter);
	});
	iv_sync.setOnMouseExited(e-> {
		iv_sync.setImage(sync_defalt);
	});

	iv_down.setOnMouseEntered(e-> {
		iv_down.setImage(down_enter);
	});
	iv_down.setOnMouseExited(e-> {
		iv_down.setImage(down_default);
	});

	iv_down.setOnMouseClicked(e->{
		 download();
	});

	iv_sync.setOnMouseClicked(e->{
		sync();
	});
}
 
開發者ID:coding-dream,項目名稱:Notebook,代碼行數:30,代碼來源:SyncFragment.java

示例2: setupNotConnectedPane

import javafx.scene.control.ProgressIndicator; //導入依賴的package包/類
public void setupNotConnectedPane() {
	GridPane pane = new GridPane();
	pane.setVgap(15);
	notConnectedPane = pane;
	notConnectedPane.setPadding(new Insets(15, 15, 15, 15));
	
	Label l = new Label("Not connected");
	connectButton = new Button("Connect", AssetsLoader.getIcon("connect.png"));
	editButton = new Button("Edit server informations...", AssetsLoader.getIcon("edit.png"));

	connectButton.setOnAction(this::connectButtonAction);
	editButton.setOnAction(this::editButtonAction);

	piConnect = new ProgressIndicator();
	piConnect.setVisible(false);
	pane.addRow(0, connectButton);
	pane.addRow(1, editButton);
	pane.addRow(2, piConnect);
}
 
開發者ID:ScreachFr,項目名稱:titanium,代碼行數:20,代碼來源:ServerTab.java

示例3: start

import javafx.scene.control.ProgressIndicator; //導入依賴的package包/類
@Override
public void start(Stage stage) {
    Group root = new Group();
    Scene scene = new Scene(root, 300, 250);
    stage.setScene(scene);
    stage.setTitle("Progress Controls");

    for (int i = 0; i < values.length; i++) {
        final Label label = labels[i] = new Label();
        label.setText("progress:" + values[i]);

        final ProgressBar pb = pbs[i] = new ProgressBar();
        pb.setProgress(values[i]);

        final ProgressIndicator pin = pins[i] = new ProgressIndicator();
        pin.setProgress(values[i]);
        final HBox hb = hbs[i] = new HBox();
        hb.setSpacing(5);
        hb.setAlignment(Pos.CENTER);
        hb.getChildren().addAll(label, pb, pin);
    }

    final VBox vb = new VBox();
    vb.setSpacing(5);
    vb.getChildren().addAll(hbs);
    scene.setRoot(vb);
    stage.show();
}
 
開發者ID:jalian-systems,項目名稱:marathonv5,代碼行數:29,代碼來源:ProgressSample.java

示例4: initData

import javafx.scene.control.ProgressIndicator; //導入依賴的package包/類
@Override
public void initData(Parent node, Map<String, String> bundle) {
	btn_deploy = (Button) node.lookup("#btn_deploy");
	progressbar = (ProgressIndicator) node.lookup("#progressbar");

	btn_deploy.setOnAction(e->{
		progressbar.isIndeterminate();// һ ��������ʾ�����ڷ�ȷ��ģʽ,����progressbar����һ����ֵ�и�Сbug������¡�
		progressbar.setVisible(true);
		progressbar.setProgress(-1f);
		progressbar.setProgress(0.5f);
		progressbar.setProgress(-1f);
		btn_deploy.setDisable(true);// �����ظ����

		AnnotationHandler.sendMessage("work",null);
	});

	AnnotationHandler.register(this);

}
 
開發者ID:coding-dream,項目名稱:Notebook,代碼行數:20,代碼來源:DeployFragment.java

示例5: buildProgressIndicator

import javafx.scene.control.ProgressIndicator; //導入依賴的package包/類
private ProgressIndicator buildProgressIndicator(double parentWidth, double parentHeight) {
    double minWidth = parentWidth / 2;
    double minHeight = parentHeight / 2;

    double positionX = imageRectangle.getX() + (parentWidth - minWidth) / 2;
    double positionY = imageRectangle.getY() + (parentHeight - minHeight) / 2;

    ProgressIndicator result = new ProgressIndicator(0);
    result.setTranslateX(positionX);
    result.setTranslateY(positionY);
    result.setMinWidth(minWidth);
    result.setMinHeight(minHeight);
    result.setOpacity(0.5);
    result.setVisible(false);
    return result;
}
 
開發者ID:schwabdidier,項目名稱:GazePlay,代碼行數:17,代碼來源:WhereIsIt.java

示例6: Son

import javafx.scene.control.ProgressIndicator; //導入依賴的package包/類
public Son(Clavier clavier) {

        this.clavier = clavier;

        slider = new Slider(0, 127, 60);
        slider.setOrientation(Orientation.VERTICAL);
        slider.setTranslateY(35);
        slider.valueProperty().addListener(new ChangeListener() {
            @Override
            public void changed(ObservableValue o, Object oldVal, Object newVal) {
                clavier.requestFocus();
            }
        });

        ProgressIndicator indicateur = new ProgressIndicator(0.0);
        indicateur.progressProperty().bind(slider.valueProperty().divide(127.0));
        indicateur.setTranslateX(-15);

        this.getChildren().add(slider);
        this.getChildren().add(indicateur);
        this.setTranslateY(260);
        this.setTranslateX(60);

    }
 
開發者ID:schwabdidier,項目名稱:GazePlay,代碼行數:25,代碼來源:Son.java

示例7: showLoading

import javafx.scene.control.ProgressIndicator; //導入依賴的package包/類
/**
 * Show the loading process.
 */
@FXThread
private void showLoading() {
    focused = getFocusOwner();

    final VBox loadingLayer = getLoadingLayer();
    loadingLayer.setVisible(true);
    loadingLayer.toFront();

    progressIndicator = new ProgressIndicator(ProgressIndicator.INDETERMINATE_PROGRESS);
    progressIndicator.setId(CSSIds.EDITOR_LOADING_PROGRESS);

    FXUtils.addToPane(progressIndicator, loadingLayer);

    final StackPane container = getContainer();
    container.setDisable(true);
}
 
開發者ID:JavaSaBr,項目名稱:jmonkeybuilder,代碼行數:20,代碼來源:EditorFXScene.java

示例8: 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;
}
 
開發者ID:teamfx,項目名稱:openjfx-8u-dev-tests,代碼行數:23,代碼來源:ProgressApp.java

示例9: createRoot

import javafx.scene.control.ProgressIndicator; //導入依賴的package包/類
private Parent createRoot() {
	StackPane stackPane = new StackPane();

	BorderPane controlsPane = new BorderPane();
	controlsPane.setMaxSize(Double.MAX_VALUE, Double.MAX_VALUE);
	stackPane.getChildren().add(controlsPane);
	controlsPane.setCenter(new TableView<Void>());

	ProgressIndicator indicator = new ProgressIndicator();
	indicator.setMaxSize(120, 120);
	stackPane.getChildren().add(indicator);
	StackPane.setAlignment(indicator, Pos.BOTTOM_RIGHT);
	StackPane.setMargin(indicator, new Insets(20));

	return stackPane;
}
 
開發者ID:mars-sim,項目名稱:mars-sim,代碼行數:17,代碼來源:ProgressIndicatorTest.java

示例10: DynamicTreeItem

import javafx.scene.control.ProgressIndicator; //導入依賴的package包/類
public DynamicTreeItem(DbTreeValue value, Node graphic, Executor executor, PopupService popupService,
    Function<DbTreeValue, List<TreeItem<DbTreeValue>>> supplier) {
  super(value, graphic);
  this.supplier = supplier;
  this.executor = executor;
  this.popupService = popupService;

  progress = new ProgressIndicator();
  progress.setPrefSize(15, 15);

  parentProperty().addListener(e -> {
    if (getParent() == null && currentLoadTask != null) {
      currentLoadTask.cancel(true);
    }
  });
}
 
開發者ID:daa84,項目名稱:mongofx,代碼行數:17,代碼來源:DynamicTreeItem.java

示例11: createIndicatorStage

import javafx.scene.control.ProgressIndicator; //導入依賴的package包/類
/**
 * 
 * Creates indicator stage instance.
 * @return the instance.
 */
public static Stage createIndicatorStage() {
	ProgressIndicator pi = new ProgressIndicator();
	pi.setPrefSize(INDICATOR_MARGINE_X, INDICATOR_MARGINE_Y);
	
	BorderPane borderPane = new BorderPane();
	borderPane.setStyle("-fx-background-radius: 10;-fx-background-color: rgba(0,0,0,0.3);");
	borderPane.setPrefSize(INDICATOR_WIDTH, INDICATOR_HEIGHT);
	borderPane.setCenter(pi);

	StackPane root = new StackPane();

	Scene scene = new Scene(root, INDICATOR_WIDTH, INDICATOR_HEIGHT);
	scene.setFill(null);
	
	root.getChildren().add(borderPane);
	
	Stage stage = new Stage(StageStyle.TRANSPARENT);
	stage.setResizable(false);
	stage.setScene(scene);
	
	stage.initModality(Modality.APPLICATION_MODAL);
	
	return stage;
}
 
開發者ID:o3project,項目名稱:mlo-gui,代碼行數:30,代碼來源:MloClient.java

示例12: TaskProgressIndicatorSkin

import javafx.scene.control.ProgressIndicator; //導入依賴的package包/類
/***************************************************************************
 * *
 * Constructors                                                            *
 * *
 **************************************************************************/

public TaskProgressIndicatorSkin(ProgressIndicator control) {
    super(control, new BehaviorBase<>(control, Collections.emptyList()));

    this.control = control;

    // register listeners
    registerChangeListener(control.indeterminateProperty(), "INDETERMINATE");
    registerChangeListener(control.progressProperty(), "PROGRESS");
    registerChangeListener(control.visibleProperty(), "VISIBLE");
    registerChangeListener(control.parentProperty(), "PARENT");
    registerChangeListener(control.sceneProperty(), "SCENE");

    initialize();
}
 
開發者ID:fflewddur,項目名稱:archivo,代碼行數:21,代碼來源:TaskProgressIndicatorSkin.java

示例13: showProgressDialog

import javafx.scene.control.ProgressIndicator; //導入依賴的package包/類
public static Stage showProgressDialog(ObservableValue<? extends Number> ov, String message) {
	Stage progress = WSeminar.createDialog("progress", "Fortschritt", WSeminar.window, StageStyle.TRANSPARENT, Modality.NONE);
	
	if (message == null) {
		progress.getScene().setFill(null);
		progress.getScene().getRoot().setStyle("-fx-background-color: transparent");
	}
	
	Label msgLabel = (Label) progress.getScene().lookup("#message");
	msgLabel.setVisible(message == null);
	msgLabel.setText(message);
	
	progress.setAlwaysOnTop(true);
	
	ProgressIndicator pi = ((ProgressIndicator) progress.getScene().lookup("#progress"));
	pi.setProgress(0);
	
	ChangeListener<Number> cl = (obs, newVal, oldVal) -> Platform.runLater(() -> {
		pi.setProgress(Math.round(newVal.doubleValue() * 100) / 100.0);
	});
	
	ov.addListener(cl);
	progress.setOnHiding(e -> ov.removeListener(cl));
	
	return progress;
}
 
開發者ID:Dakror,項目名稱:WSeminar,代碼行數:27,代碼來源:MainController.java

示例14: start

import javafx.scene.control.ProgressIndicator; //導入依賴的package包/類
@Override
public void start(Stage stage) throws Exception
{
	stage.setTitle("ProgressIndicatorTest");
	stage.setResizable(false);

	BorderPane pane = new BorderPane();
	VBox box = new VBox(15.0d);
	box.setAlignment(Pos.CENTER);
	ProgressIndicator indicator = new ProgressIndicator(
			ProgressIndicator.INDETERMINATE_PROGRESS);
	box.getChildren().add(indicator);
	box.getChildren().add(new Label("ProgressIndicatorTest"));
	pane.setCenter(box);

	Scene scene = new Scene(pane, 200, 200);
	scene.getStylesheets().add(
			this.getClass().getResource("/niobe/metro/css/theme.css").toExternalForm());
	stage.setScene(scene);

	stage.show();
}
 
開發者ID:fireandfuel,項目名稱:MetroProgressIndicator,代碼行數:23,代碼來源:ProgressIndicatorTest.java

示例15: LoadingWindow

import javafx.scene.control.ProgressIndicator; //導入依賴的package包/類
/**
 * Create a new LoadingWindow.<br>
 * First a progress indicator is created and set up. The progress indicator
 * will turn indefinite. Then a label and a {@link ProgressBar} are shown.
 * In the end, the WaitThread will be started which shows that still no
 * connection has been established.
 */
public LoadingWindow() {
    this.setId(LayerType.loading.toString());                               // Sets the ID as "LOADING"
    ProgressIndicator progressIndicator = new ProgressIndicator();
    progressIndicator.setPrefSize(120, 120);
    progressIndicator.setMaxSize(120, 120);
    this.getStyleClass().add("loading");
    this.setCenter(progressIndicator);

    Label loadingLabel = new Label("Connecting...");
    loadingLabel.setId("loadingLabel");
    loadingLabel.setTextAlignment(TextAlignment.RIGHT);

    StackPane sp = new StackPane();
    sp.setAlignment(Pos.CENTER);
    sp.getChildren().add(loadingLabel);

    progressBar = new ProgressBar(0.0);
    progressBar.setTranslateY(50);
    sp.getChildren().add(progressBar);

    new LoadingWindow.WaitThread().start();
    setTop(sp);
}
 
開發者ID:brad-richards,項目名稱:AIGS,代碼行數:31,代碼來源:LoadingWindow.java


注:本文中的javafx.scene.control.ProgressIndicator類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。