当前位置: 首页>>代码示例>>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;未经允许,请勿转载。