当前位置: 首页>>代码示例>>Java>>正文


Java ProgressIndicator.setVisible方法代码示例

本文整理汇总了Java中javafx.scene.control.ProgressIndicator.setVisible方法的典型用法代码示例。如果您正苦于以下问题:Java ProgressIndicator.setVisible方法的具体用法?Java ProgressIndicator.setVisible怎么用?Java ProgressIndicator.setVisible使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在javafx.scene.control.ProgressIndicator的用法示例。


在下文中一共展示了ProgressIndicator.setVisible方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: 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

示例2: 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

示例3: View

import javafx.scene.control.ProgressIndicator; //导入方法依赖的package包/类
public View(ClientContext clientContext) {
    super(clientContext, CONTROLLER_NAME);

    sizeSpinner = new Spinner<>(1, 100, 10);
    progressIndicator = new ProgressIndicator();
    refreshButton = new Button("refresh");
    refreshButton.setGraphic(progressIndicator);
    progressIndicator.setVisible(false);
    list = new ListView<>();
    root = new VBox(sizeSpinner, list, refreshButton);
    root.setSpacing(12);
    root.setPadding(new Insets(24));
}
 
开发者ID:canoo,项目名称:dolphin-platform,代码行数:14,代码来源:View.java

示例4: ReactivePicoUnitDetailViewCask

import javafx.scene.control.ProgressIndicator; //导入方法依赖的package包/类
public ReactivePicoUnitDetailViewCask() {
    head = new Label("No UniqueUnit");
    head.setFont(font(20));
    setTop(head);
    webView = FxSaft.dispatch(() -> new WebView());
    progressIndicator = new ProgressIndicator();
    setCenter(new StackPane(webView, progressIndicator));
    progressIndicator.setVisible(false);
    Ops.registerSelectListener(this);
}
 
开发者ID:gg-net,项目名称:dwoss,代码行数:11,代码来源:ReactivePicoUnitDetailViewCask.java

示例5: TopToolBar

import javafx.scene.control.ProgressIndicator; //导入方法依赖的package包/类
public TopToolBar() {
	setPrefHeight(PREF_HEIGHT);
	setMinHeight(PREF_HEIGHT);
	this.serviceComboBox.initialize(this::changeService);
	this.qualityComboBox.initialize();

	this.addButton.setOnAction(event -> this.addAction());
	removeButton.setOnAction(event -> this.removeAction());
	this.importButton.setOnAction(event -> this.importFollowedChannels());
	this.twitchBrowserButton.setOnAction(event -> this.openTwitchBrowser());

	final ProgressIndicator updateProgressIndicator = new ProgressIndicator();
	updateProgressIndicator.setVisible(false);
	TwitchChannelUpdateService.getActiveChannelServicesProperty().addListener((obs, oldValue, newValue) -> {
		if (!newValue.isEmpty()) {
			updateProgressIndicator.setVisible(true);
		} else {
			updateProgressIndicator.setVisible(false);
		}
	});

	final Region spacer = new Region();
	HBox.setHgrow(spacer, Priority.ALWAYS);
	spacer.setMinWidth(Region.USE_PREF_SIZE);

	settingsButton.setOnAction(event -> this.openSettings());

	this.setButtonToolTips();

	this.addItemAtEnd(this.serviceComboBox);
	this.addItemAtEnd(this.addButton);
	this.addItemAtEnd(removeButton);
	this.addItemAtEnd(this.importButton);
	this.addItemAtEnd(this.twitchBrowserButton);
	this.addItemAtEnd(new Separator());
	this.addItemAtEnd(updateProgressIndicator);
	this.addItemAtEnd(spacer);
	this.addItemAtEnd(new Separator());
	this.addItemAtEnd(this.qualityComboBox);
	this.addItemAtEnd(settingsButton);
}
 
开发者ID:westerwave,项目名称:livestreamer_twitch_gui,代码行数:42,代码来源:TopToolBar.java

示例6: LegoTreeNodeGraphic

import javafx.scene.control.ProgressIndicator; //导入方法依赖的package包/类
public LegoTreeNodeGraphic()
{
	sp = new StackPane();
	sp.setMaxWidth(Double.MAX_VALUE);
	
	content = new HBox();
	content.setMinHeight(22.0);
	content.setSpacing(0.0);
	content.setMaxWidth(Double.MAX_VALUE);
	content.setAlignment(Pos.CENTER_LEFT);
	content.setFillHeight(true);
	sp.getChildren().add(content);
	StackPane.setAlignment(content, Pos.CENTER_LEFT);
	StackPane.setMargin(content, new Insets(0.0, 0, 0, 8.0));
	
	
	errorImage = new ImageView(Images.EXCLAMATION.getImage());
	errorImage.setFitWidth(12.0);
	errorImage.setFitHeight(12.0);
	errorImage.setVisible(false);
	errorImage.setTranslateX(-1.0);
	sp.getChildren().add(errorImage);
	StackPane.setAlignment(errorImage, Pos.TOP_LEFT);
	StackPane.setMargin(errorImage, new Insets(5.0, 0, 0, 0));

	tt = new Tooltip("");
	Tooltip.install(errorImage, tt);
	
	pi = new ProgressIndicator(-1.0);
	//note, can't get it any smaller than ~22 for some reason, hence, the scaling - but there is a bug in javafx, and it still thinks its bounds is 22, so have to have the row 22.
	pi.setMaxWidth(22.0);
	pi.setMaxHeight(22.0);
	pi.setVisible(false);
	pi.setMouseTransparent(true);
	pi.setScaleX(.5); 
	pi.setScaleY(.5);
	pi.setTranslateX(-6.0);
	sp.getChildren().add(pi);
	StackPane.setAlignment(pi, Pos.TOP_LEFT);
	
	//Need to do some subtle adjustments when the cell is tall, vs default size.
	content.heightProperty().addListener(new InvalidationListener()
	{
		@Override
		public void invalidated(Observable observable)
		{
			if (content.getHeight() <= 22)
			{
				StackPane.setMargin(errorImage, new Insets(5.0, 0, 0, 0));
				pi.setTranslateY(0.0);
			}
			else
			{
				StackPane.setMargin(errorImage, new Insets(2.0, 0, 0, 0));
				pi.setTranslateY(-3.0);
			}
			
		}
	});
}
 
开发者ID:Apelon-VA,项目名称:ISAAC,代码行数:61,代码来源:LegoTreeNodeGraphic.java

示例7: createProgressIndicator

import javafx.scene.control.ProgressIndicator; //导入方法依赖的package包/类
private ProgressIndicator createProgressIndicator() {
	loadIndicator = new ProgressIndicator();
	loadIndicator.setVisible(false);
	return loadIndicator;
}
 
开发者ID:Zsadany,项目名称:DominantFreq,代码行数:6,代码来源:EcgItem.java


注:本文中的javafx.scene.control.ProgressIndicator.setVisible方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。