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


Java ProgressIndicator.INDETERMINATE_PROGRESS屬性代碼示例

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


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

示例1: showLoading

/**
 * 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,代碼行數:19,代碼來源:EditorFXScene.java

示例2: start

@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,代碼行數:22,代碼來源:ProgressIndicatorTest.java

示例3: start

@Override
public void start(Stage stage) throws Exception {

  try {
    // create stack pane and application scene
    StackPane stackPane = new StackPane();
    Scene scene = new Scene(stackPane);

    // set title, size, and add scene to stage
    stage.setTitle("Local Server Feature Layer Sample");
    stage.setWidth(800);
    stage.setHeight(700);
    stage.setScene(scene);
    stage.show();

    // create a view with a map and basemap
    map = new ArcGISMap(Basemap.createStreets());
    mapView = new MapView();
    mapView.setMap(map);

    // track progress of loading feature layer to map
    featureLayerProgress = new ProgressIndicator(ProgressIndicator.INDETERMINATE_PROGRESS);
    featureLayerProgress.setMaxWidth(30);

    // check that local server install path can be accessed
    if (LocalServer.INSTANCE.checkInstallValid()) {
      server = LocalServer.INSTANCE;
      server.addStatusChangedListener(status -> {
        if (server.getStatus() == LocalServerStatus.STARTED) {
          // start feature service
          String featureServiceURL = new File("samples-data/local_server/PointsofInterest.mpk").getAbsolutePath();
          featureService = new LocalFeatureService(featureServiceURL);
          featureService.addStatusChangedListener(this::addLocalFeatureLayer);
          featureService.startAsync();
        }
      });
      // start local server
      server.startAsync();
    } else {
      Platform.runLater(() -> {
        Alert dialog = new Alert(AlertType.INFORMATION);
        dialog.setHeaderText("Local Server Load Error");
        dialog.setContentText("Local Geoprocessing Failed to load.");
        dialog.showAndWait();

        Platform.exit();
      });
    }

    // add view to application window
    stackPane.getChildren().addAll(mapView, featureLayerProgress);
    StackPane.setAlignment(featureLayerProgress, Pos.CENTER);
  } catch (Exception e) {
    // on any error, display the stack trace.
    e.printStackTrace();
  }
}
 
開發者ID:Esri,項目名稱:arcgis-runtime-samples-java,代碼行數:57,代碼來源:LocalServerFeatureLayerSample.java

示例4: start

@Override
public void start(Stage stage) throws Exception {

  try {
    // create stack pane and application scene
    StackPane stackPane = new StackPane();
    Scene scene = new Scene(stackPane);

    // set title, size, and add scene to stage
    stage.setTitle("Local Server Map Image Layer Sample");
    stage.setWidth(APPLICATION_WIDTH);
    stage.setHeight(700);
    stage.setScene(scene);
    stage.show();

    // create a view with a map and basemap
    ArcGISMap map = new ArcGISMap(Basemap.createStreets());
    mapView = new MapView();
    mapView.setMap(map);

    // track progress of loading map image layer to map
    imageLayerProgress = new ProgressIndicator(ProgressIndicator.INDETERMINATE_PROGRESS);
    imageLayerProgress.setMaxWidth(30);

    // check that local server install path can be accessed
    if (LocalServer.INSTANCE.checkInstallValid()) {
      server = LocalServer.INSTANCE;
      // start local server
      server.addStatusChangedListener(status -> {
        if (status.getNewStatus() == LocalServerStatus.STARTED) {
          // start map image service
          String mapServiceURL = new File("./samples-data/local_server/RelationshipID.mpk").getAbsolutePath();
          mapImageService = new LocalMapService(mapServiceURL);
          mapImageService.addStatusChangedListener(this::addLocalMapImageLayer);
          mapImageService.startAsync();
        }
      });
      server.startAsync();
    } else {
      Platform.runLater(() -> {
        Alert dialog = new Alert(AlertType.INFORMATION);
        dialog.setHeaderText("Local Server Load Error");
        dialog.setContentText("Local Geoprocessing Failed to load.");
        dialog.showAndWait();

        Platform.exit();
      });
    }

    // add view to application window with progress bar
    stackPane.getChildren().addAll(mapView, imageLayerProgress);
    StackPane.setAlignment(imageLayerProgress, Pos.CENTER);
  } catch (Exception e) {
    // on any error, display the stack trace.
    e.printStackTrace();
  }
}
 
開發者ID:Esri,項目名稱:arcgis-runtime-samples-java,代碼行數:57,代碼來源:LocalServerMapImageLayerSample.java

示例5: CanvasManager

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());
		}
	});
}
 
開發者ID:phrack,項目名稱:ShootOFF,代碼行數:55,代碼來源:CanvasManager.java

示例6: setParameters

/**
 * @see gov.va.isaac.interfaces.gui.views.commonFunctionality.XMLViewI#showView(Window, String, Supplier, int, int)
 */
@Override
public void setParameters(String title, Supplier<String> xmlContent, int width, int height)
{
	setWidth(width);
	setHeight(height);
	setTitle(title);
	getIcons().add(Images.XML_VIEW_16.getImage());
	getIcons().add(Images.XML_VIEW_32.getImage());

	BorderPane bp = new BorderPane();
	bp.setCursor(Cursor.WAIT);

	pi_ = new ProgressIndicator(ProgressIndicator.INDETERMINATE_PROGRESS);
	pi_.setMaxHeight(Region.USE_PREF_SIZE);
	pi_.setMaxWidth(Region.USE_PREF_SIZE);
	bp.setCenter(pi_);

	wv_ = new WebView();

	Scene scene = new Scene(bp);
	setScene(scene);

	addEventHandler(WindowEvent.WINDOW_CLOSE_REQUEST, new EventHandler<WindowEvent>()
	{
		@Override
		public void handle(WindowEvent event)
		{
			wv_ = null;
		}
	});
	
	Utility.execute(() -> 
	{
		final StringBuilder formattedContent = new StringBuilder();
		
		try
		{
			formattedContent.append(XMLUtils.toHTML(xmlContent.get()));
		}
		catch (Exception e)
		{
			logger.error("There was an error formatting the lego as XML", e);
			formattedContent.append("There was an error formatting the XML for display");
		}
		
		Platform.runLater(() ->
		{
			WebView wv = wv_;
			if (wv != null)
			{
				wv_.getEngine().loadContent(formattedContent.toString());
				getScene().getRoot().setCursor(Cursor.DEFAULT);
				((BorderPane) getScene().getRoot()).setCenter(wv_);
				((BorderPane) getScene().getRoot()).getChildren().remove(pi_);
				pi_ = null;
			}
		});
	});
}
 
開發者ID:Apelon-VA,項目名稱:ISAAC,代碼行數:62,代碼來源:XMLDisplayWindow.java

示例7: setupConceptField

private void setupConceptField(final TextField textField, StackPane stack, final Integer conceptId)
{
	final ConceptGUIInfo info = new ConceptGUIInfo();
	conceptInfo_[conceptId] = info;
	
	info.concept = null;
	info.isValid = new SimpleBooleanProperty(true);
	info.lookupUpdateTime = 0;
	info.pi = new ProgressIndicator(ProgressIndicator.INDETERMINATE_PROGRESS);
	info.pi.visibleProperty().bind(info.isLookupInProgress);
	info.pi.setPrefHeight(16.0);
	info.pi.setPrefWidth(16.0);
	info.pi.setMaxWidth(16.0);
	info.pi.setMaxHeight(16.0);
	info.tf = textField;
	info.tooltip = new Tooltip("The specified concept was not found in the Snomed Database.");
	
	ImageView lookupFailImage = Images.EXCLAMATION.createImageView();
	lookupFailImage.visibleProperty().bind(info.isValid.not());
	Tooltip.install(lookupFailImage, info.tooltip);
	
	stack.getChildren().add(info.pi);
	StackPane.setAlignment(info.pi, Pos.CENTER_RIGHT);
	StackPane.setMargin(info.pi, new Insets(0.0, 5.0, 0.0, 0.0));
	stack.getChildren().add(lookupFailImage);
	StackPane.setAlignment(lookupFailImage, Pos.CENTER_RIGHT);
	StackPane.setMargin(lookupFailImage, new Insets(0.0, 5.0, 0.0, 0.0));
	
	AppContext.getService(DragRegistry.class).setupDragAndDrop(textField, () -> 
	{
		if (info != null && info.concept != null)
		{
			return info.concept.getUuid();
		}
		else
		{
			return null;
		}
	}, true);
	
	textField.textProperty().addListener(new ChangeListener<String>()
	{
		@Override
		public void changed(ObservableValue<? extends String> observable, String oldValue, String newValue)
		{
			if (newValue.length() == 0)
			{
				info.isValid.set(true);
				info.tf.setTooltip(null);
				info.concept = null;
				info.lookupUpdateTime = System.currentTimeMillis();
				updateLegoList();
			}
			else if (newValue.length() > 0)
			{
				if (updateDisabled.get() > 0)
				{
					return;
				}
				info.lookupsInProgress.incrementAndGet();
				info.isLookupInProgress.invalidate();
				Object o = info.tf.getUserData();
				info.tf.setUserData(null);  //Clear it back out.
				if (o != null && o instanceof Integer)
				{
					OTFUtility.getConceptVersion((Integer)o, LegoFilterPaneController.this, conceptId);
				}
				else
				{
					OTFUtility.lookupIdentifier(newValue, LegoFilterPaneController.this, conceptId);
				}
			}
		}
	});
	new LookAheadConceptPopup(textField);
}
 
開發者ID:Apelon-VA,項目名稱:ISAAC,代碼行數:76,代碼來源:LegoFilterPaneController.java


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