Java 类javafx.scene.control.ProgressIndicator 实例源码
项目:titanium
文件:ServerTab.java
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);
}
项目:Notebook
文件:SyncFragment.java
@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();
});
}
项目:Notebook
文件:DeployFragment.java
@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);
}
项目:marathonv5
文件:ProgressSample.java
@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();
}
项目:GazePlay
文件:WhereIsIt.java
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;
}
项目:GazePlay
文件:Son.java
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);
}
项目:jmonkeybuilder
文件:EditorFXScene.java
/**
* 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);
}
项目:openjfx-8u-dev-tests
文件:ProgressApp.java
@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;
}
项目:mars-sim
文件:ProgressIndicatorTest.java
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;
}
项目:mongofx
文件:DynamicTreeItem.java
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);
}
});
}
项目:mlo-gui
文件:MloClient.java
/**
*
* 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;
}
项目:archivo
文件:TaskProgressIndicatorSkin.java
/***************************************************************************
* *
* 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();
}
项目:WSeminar
文件:MainController.java
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;
}
项目:MetroProgressIndicator
文件:ProgressIndicatorTest.java
@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();
}
项目:AIGS
文件:LoadingWindow.java
/**
* 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);
}
项目:AIGS
文件:LoadingWindow.java
/**
* 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);
}
项目:jabref
文件:DocumentViewerControl.java
public DocumentViewerPage(DocumentPageViewModel initialPage) {
page = initialPage;
imageView = new ImageView();
imageHolder = new StackPane();
imageHolder.getStyleClass().add("page");
// Show progress indicator
ProgressIndicator progress = new ProgressIndicator();
progress.setMaxSize(50, 50);
// Set empty background and create proper rendering in background (for smoother loading)
background = new Rectangle(getDesiredWidth(), getDesiredHeight());
background.setStyle("-fx-fill: WHITE");
//imageView.setImage(new WritableImage(getDesiredWidth(), getDesiredHeight()));
BackgroundTask<Image> generateImage = BackgroundTask
.wrap(() -> renderPage(initialPage))
.onSuccess(image -> {
imageView.setImage(image);
progress.setVisible(false);
background.setVisible(false);
});
taskExecutor.execute(generateImage);
imageHolder.getChildren().setAll(background, progress, imageView);
}
项目:jabref
文件:MathSciNetTab.java
private StackPane getPane(BibEntry entry) {
StackPane root = new StackPane();
ProgressIndicator progress = new ProgressIndicator();
progress.setMaxSize(100, 100);
WebView browser = new WebView();
// Quick hack to disable navigating
browser.addEventFilter(javafx.scene.input.MouseEvent.ANY, javafx.scene.input.MouseEvent::consume);
browser.setContextMenuEnabled(false);
root.getChildren().addAll(browser, progress);
Optional<MathSciNetId> mathSciNetId = getMathSciNetId(entry);
mathSciNetId.flatMap(MathSciNetId::getExternalURI)
.ifPresent(url -> browser.getEngine().load(url.toASCIIString()));
// Hide progress indicator if finished (over 70% loaded)
browser.getEngine().getLoadWorker().progressProperty().addListener((observable, oldValue, newValue) -> {
if (newValue.doubleValue() >= 0.7) {
progress.setVisible(false);
}
});
return root;
}
项目:jabref
文件:RelatedArticlesTab.java
private StackPane getPane(BibEntry entry) {
StackPane root = new StackPane();
ProgressIndicator progress = new ProgressIndicator();
progress.setMaxSize(100, 100);
WebView browser = new WebView();
root.getChildren().addAll(browser, progress);
MrDLibFetcher fetcher = new MrDLibFetcher(Globals.prefs.get(JabRefPreferences.LANGUAGE),
Globals.BUILD_INFO.getVersion().getFullVersion());
BackgroundTask
.wrap(() -> fetcher.performSearch(entry))
.onRunning(() -> progress.setVisible(true))
.onSuccess(relatedArticles -> {
progress.setVisible(false);
browser.getEngine().loadContent(convertToHtml(relatedArticles));
})
.executeWith(Globals.TASK_EXECUTOR);
browser.getEngine().getLoadWorker().stateProperty().addListener(new OpenHyperlinksInExternalBrowser(browser));
return root;
}
项目:JavaFX
文件:Minimal.java
private Node createLoadPane() {
loadPane = new TilePane(5, 5);
loadPane.setPrefColumns(3);
loadPane.setPadding(new Insets(5));
for (int i = 0; i < 9; i++) {
StackPane waitingPane = new StackPane();
Rectangle background = new Rectangle((380) / 3, (380) / 3,
Color.WHITE);
indicators[i] = new ProgressIndicator();
indicators[i].setPrefSize(50, 50);
indicators[i].setMaxSize(50, 50);
indicators[i].setTranslateY(-25);
indicators[i].setTranslateX(-10);
loading[i] = new Label();
loading[i].setTranslateY(25);
waitingPane.getChildren().addAll(background, indicators[i],
loading[i]);
loadPane.getChildren().add(waitingPane);
}
return loadPane;
}
项目:vidada-desktop
文件:MediaBrowserFX.java
/**
* Initializes the view
*/
private void initView(){
gridView = new GridView<>();
gridViewPort = new GridViewViewPort(gridView);
gridViewPort.getViewPortItemsChanged().add((sender, eventArgs) -> onVisibleItemsChanged());
gridView.setCellFactory(control -> new MediaGridItemCell(
mediaPlayerService,
gridView.cellWidthProperty(),
gridView.cellHeightProperty()
));
gridView.setOnZoom(event -> {
setItemSize(gridView.getCellWidth() * event.getTotalZoomFactor() );
event.consume();
});
loadingProgress = new ProgressIndicator();
loadingProgress.setMaxWidth(70);
StackPane mediaGridStack = new StackPane();
mediaGridStack.getChildren().addAll(gridView, loadingProgress);
this.setCenter(mediaGridStack);
}
项目:vidada-desktop
文件:MediaGridItemCell.java
/**
* Creates a new MediaGridItemCell
* @param mediaPlayerService
* @param desiredWidth
* @param desiredHeight
*/
public MediaGridItemCell(IMediaPlayerService mediaPlayerService, DoubleProperty desiredWidth, DoubleProperty desiredHeight){
getStyleClass().add("media-cell");
mediaView = new MediaItemView(mediaPlayerService);
folderView = new FolderView();
simpleView = new SimpleCellItemView();
loadingView = new BorderPane();
loadingView.setCenter(new ProgressIndicator());
loadingView.setStyle("-fx-background-color: grey;");
this.prefWidthProperty().bind(desiredWidth);
this.prefHeightProperty().bind(desiredHeight);
this.maxWidthProperty().bind(desiredWidth);
this.maxHeightProperty().bind(desiredHeight);
this.minWidthProperty().bind(desiredWidth);
this.minHeightProperty().bind(desiredHeight);
setGraphic(mediaView);
}
项目:marathonv5
文件:TaskSample.java
public TaskSample() {
TableView<DailySales> tableView = new TableView<DailySales>();
Region veil = new Region();
veil.setStyle("-fx-background-color: rgba(0, 0, 0, 0.4)");
ProgressIndicator p = new ProgressIndicator();
p.setMaxSize(150, 150);
//Define table columns
TableColumn idCol = new TableColumn();
idCol.setText("ID");
idCol.setCellValueFactory(new PropertyValueFactory("dailySalesId"));
tableView.getColumns().add(idCol);
TableColumn qtyCol = new TableColumn();
qtyCol.setText("Qty");
qtyCol.setCellValueFactory(new PropertyValueFactory("quantity"));
tableView.getColumns().add(qtyCol);
TableColumn dateCol = new TableColumn();
dateCol.setText("Date");
dateCol.setCellValueFactory(new PropertyValueFactory("date"));
dateCol.setMinWidth(240);
tableView.getColumns().add(dateCol);
StackPane stack = new StackPane();
stack.getChildren().addAll(tableView, veil, p);
// Use binding to be notified whenever the data source chagnes
Task<ObservableList<DailySales>> task = new GetDailySalesTask();
p.progressProperty().bind(task.progressProperty());
veil.visibleProperty().bind(task.runningProperty());
p.visibleProperty().bind(task.runningProperty());
tableView.itemsProperty().bind(task.valueProperty());
getChildren().add(stack);
new Thread(task).start();
}
项目:marathonv5
文件:ProgressIndicatorSample.java
public ProgressIndicatorSample() {
super(400,400);
GridPane g = new GridPane();
ProgressIndicator p1 = new ProgressIndicator();
p1.setPrefSize(50, 50);
ProgressIndicator p2 = new ProgressIndicator();
p2.setPrefSize(50, 50);
p2.setProgress(0.25F);
ProgressIndicator p3 = new ProgressIndicator();
p3.setPrefSize(50, 50);
p3.setProgress(0.5F);
ProgressIndicator p4 = new ProgressIndicator();
p4.setPrefSize(50, 50);
p4.setProgress(1.0F);
g.add(p1, 1, 0);
g.add(p2, 0, 1);
g.add(p3, 1, 1);
g.add(p4, 2, 1);
g.setHgap(40);
g.setVgap(40);
getChildren().add(g);
}
项目:marathonv5
文件:TaskSample.java
public TaskSample() {
TableView<DailySales> tableView = new TableView<DailySales>();
Region veil = new Region();
veil.setStyle("-fx-background-color: rgba(0, 0, 0, 0.4)");
ProgressIndicator p = new ProgressIndicator();
p.setMaxSize(150, 150);
//Define table columns
TableColumn idCol = new TableColumn();
idCol.setText("ID");
idCol.setCellValueFactory(new PropertyValueFactory("dailySalesId"));
tableView.getColumns().add(idCol);
TableColumn qtyCol = new TableColumn();
qtyCol.setText("Qty");
qtyCol.setCellValueFactory(new PropertyValueFactory("quantity"));
tableView.getColumns().add(qtyCol);
TableColumn dateCol = new TableColumn();
dateCol.setText("Date");
dateCol.setCellValueFactory(new PropertyValueFactory("date"));
dateCol.setMinWidth(240);
tableView.getColumns().add(dateCol);
StackPane stack = new StackPane();
stack.getChildren().addAll(tableView, veil, p);
// Use binding to be notified whenever the data source chagnes
Task<ObservableList<DailySales>> task = new GetDailySalesTask();
p.progressProperty().bind(task.progressProperty());
veil.visibleProperty().bind(task.runningProperty());
p.visibleProperty().bind(task.runningProperty());
tableView.itemsProperty().bind(task.valueProperty());
getChildren().add(stack);
new Thread(task).start();
}
项目:marathonv5
文件:ProgressIndicatorSample.java
public ProgressIndicatorSample() {
super(400,400);
GridPane g = new GridPane();
ProgressIndicator p1 = new ProgressIndicator();
p1.setPrefSize(50, 50);
ProgressIndicator p2 = new ProgressIndicator();
p2.setPrefSize(50, 50);
p2.setProgress(0.25F);
ProgressIndicator p3 = new ProgressIndicator();
p3.setPrefSize(50, 50);
p3.setProgress(0.5F);
ProgressIndicator p4 = new ProgressIndicator();
p4.setPrefSize(50, 50);
p4.setProgress(1.0F);
g.add(p1, 1, 0);
g.add(p2, 0, 1);
g.add(p3, 1, 1);
g.add(p4, 2, 1);
g.setHgap(40);
g.setVgap(40);
getChildren().add(g);
}
项目:OftenPorter
文件:ProgressIndicatorBinder.java
public ProgressIndicatorBinder(ProgressIndicator view)
{
super(view);
changeListener = new ChangeListener<Number>()
{
@Override
public synchronized void changed(ObservableValue<? extends Number> observable, Number oldValue,
Number newValue)
{
doOnchange(oldValue,newValue);
}
};
view.progressProperty().addListener(changeListener);
}
项目:NoMoreOversleeps
文件:JavaFxHelper.java
public static ProgressIndicator createSwirlingProgressIndicator(double width, double height)
{
ProgressIndicator indicator = new ProgressIndicator();
indicator.setStyle("-fx-progress-color: white;");
indicator.setMinWidth(width);
indicator.setMaxWidth(width);
indicator.setMinHeight(height);
indicator.setMaxHeight(height);
return indicator;
}
项目:GazePlay
文件:Card.java
private ProgressIndicator createProgressIndicator(double width, double height) {
ProgressIndicator indicator = new ProgressIndicator(0);
indicator.setTranslateX(card.getX() + width * 0.05);
indicator.setTranslateY(card.getY() + height * 0.2);
indicator.setMinWidth(width * 0.9);
indicator.setMinHeight(width * 0.9);
indicator.setOpacity(0);
return indicator;
}
项目:GazePlay
文件:Circles_handler.java
public ImagePattern createGridPattern() {
Collections.shuffle(array_sizes);
index = array_sizes.get(0);
size = arraypts[ index ].length;
//size = 10;
indicator = new ProgressIndicator(0);
double w = gridSize;
double h = gridSize;
circle = new Circle();
circle.setRadius(45.0f);
circle.setOpacity(1);
circle.setFill(Color.LIGHTBLUE);
circle.setVisible(true);
canvas.setGridLinesVisible(true);
GazeUtils.addEventFilter(circle);
enterEvent = buildEvent();
circle.addEventFilter(MouseEvent.ANY, enterEvent);
circle.addEventFilter(GazeEvent.ANY, enterEvent);
indicator.setOpacity(0.0);
canvas.add(indicator, arraypts[index][count], arraypts[index][count+1]);
canvas.add(circle,arraypts[index][count], arraypts[index][count+1]);
Image image = canvas.snapshot(new SnapshotParameters(), null);
ImagePattern pattern = new ImagePattern(image, 0, 0, w, h, false);
return pattern;
}
项目:GazePlay
文件:Circles_points_handler.java
public ImagePattern createGridPattern() {
Collections.shuffle(array_sizes);
index = array_sizes.get(0);
size = arraypts[ index ].length;
//size = 10;
indicator = new ProgressIndicator(0);
double w = gridSize;
double h = gridSize;
circle = new Circle();
circle.setRadius(45.0f);
circle.setOpacity(1);
circle.setFill(Color.BLUE);
circle.setVisible(true);
canvas.setGridLinesVisible(true);
GazeUtils.addEventFilter(circle);
enterEvent = buildEvent();
circle.addEventFilter(MouseEvent.ANY, enterEvent);
circle.addEventFilter(GazeEvent.ANY, enterEvent);
indicator.setOpacity(0.0);
canvas.add(indicator, arraypts[index][count], arraypts[index][count+1]);
canvas.add(circle,arraypts[index][count], arraypts[index][count+1]);
Image image = canvas.snapshot(new SnapshotParameters(), null);
ImagePattern pattern = new ImagePattern(image, 0, 0, w, h, false);
return pattern;
}
项目:GazePlay
文件:Circles_handler2.java
public ImagePattern createGridPattern() {
Collections.shuffle(array_sizes);
index = array_sizes.get(0);
size = arraypts[ index ].length;
//size = 10;
indicator = new ProgressIndicator(0);
double w = gridSize;
double h = gridSize;
circle = new Circle();
circle.setRadius(45.0f);
circle.setOpacity(1);
circle.setFill(Color.LIGHTBLUE);
circle.setVisible(true);
canvas.setGridLinesVisible(true);
GazeUtils.addEventFilter(circle);
enterEvent = buildEvent();
circle.addEventFilter(MouseEvent.ANY, enterEvent);
circle.addEventFilter(GazeEvent.ANY, enterEvent);
indicator.setOpacity(0.0);
canvas.add(indicator, arraypts[index][count], arraypts[index][count+1]);
canvas.add(circle,arraypts[index][count], arraypts[index][count+1]);
Image image = canvas.snapshot(new SnapshotParameters(), null);
ImagePattern pattern = new ImagePattern(image, 0, 0, w, h, false);
return pattern;
}
项目:GazePlay
文件:Circles_points_handler2.java
public ImagePattern createGridPattern() {
Collections.shuffle(array_sizes);
index = array_sizes.get(0);
size = arraypts[ index ].length;
//size = 10;
indicator = new ProgressIndicator(0);
double w = gridSize;
double h = gridSize;
circle = new Circle();
circle.setRadius(45.0f);
circle.setOpacity(1);
circle.setFill(Color.BLUE);
circle.setVisible(true);
canvas.setGridLinesVisible(true);
GazeUtils.addEventFilter(circle);
enterEvent = buildEvent();
circle.addEventFilter(MouseEvent.ANY, enterEvent);
circle.addEventFilter(GazeEvent.ANY, enterEvent);
indicator.setOpacity(0.0);
canvas.add(indicator, arraypts[index][count], arraypts[index][count+1]);
canvas.add(circle,arraypts[index][count], arraypts[index][count+1]);
Image image = canvas.snapshot(new SnapshotParameters(), null);
ImagePattern pattern = new ImagePattern(image, 0, 0, w, h, false);
return pattern;
}
项目:CryptoPayAPI
文件:PaymentPopup.java
public void setConfirms(int confirms){
primaryStage.setTitle("Waiting for Payment");
if(confirms > 0) {
primaryStage.setTitle("Confirming: " + confirms);
bar.setProgress((double) confirms / (double) MIN_CONFIRMS);
} else {
bar.setProgress(ProgressIndicator.INDETERMINATE_PROGRESS);
}
}
项目:myWMS
文件:AdvicePlugin.java
private static Node getIcon(LOSAdvice advice) {
BigDecimal notified = advice.getNotifiedAmount();
BigDecimal received = advice.getReceiptAmount();
if (notified.compareTo(BigDecimal.ZERO) <= 0) return new ProgressIndicator(1);
ProgressIndicator pi = new ProgressIndicator(received.setScale(3, RoundingMode.HALF_DOWN).divide(notified, RoundingMode.HALF_EVEN).doubleValue());
return pi;
}
项目:myWMS
文件:OrderPositionsPlugin.java
private static Node getIcon(LOSCustomerOrderPosition position) {
BigDecimal picked = position.getAmountPicked();
BigDecimal required = position.getAmount();
if (required.compareTo(BigDecimal.ZERO) <= 0) return new ProgressIndicator(1);
ProgressIndicator pi = new ProgressIndicator(picked.setScale(3, RoundingMode.HALF_DOWN).divide(required, RoundingMode.HALF_EVEN).doubleValue());
return pi;
}
项目:myWMS
文件:TreatOrderController.java
public Node createPositionIcon(TreatOrderPosition pos) {
ProgressIndicator pi = new ProgressIndicator();
BigDecimalBinding picked = pos.amountAssignedProperty();
BigDecimal amount = (pos.getAmount() == null) ? BigDecimal.ZERO : pos.getAmount();
pi.progressProperty().bind(MBindings.get(picked, v -> v.doubleValue() / amount.doubleValue()));
pi.styleProperty().bind(Bindings.when(picked.compareTo(amount).lessThanOrEqualTo(0)).then("").otherwise("-fx-accent: RED"));
return pi;
}
项目:openjfx-8u-dev-tests
文件:ProgressApp.java
@Override
protected TestNode setup() {
TestNode root = new TestNode();
root.add(new ProgressApp.ProgressConstructorsPage(), ProgressApp.Pages.Constructors.name());
root.add(new ProgressApp.ProgressIndeterminedConstructorsPage(), ProgressApp.Pages.IndeterminedConstructors.name());
root.add(new ProgressApp.ProgressIndicatorPage(), ProgressApp.Pages.ProgressIndicator.name());
root.add(new ProgressApp.ProgressBarPage(), ProgressApp.Pages.ProgressBar.name());
return root;
}
项目:openjfx-8u-dev-tests
文件:ProgressApp.java
@Override
public Node drawNode() {
HBox root = new HBox();
root.setSpacing(spacing);
ProgressIndicator determined_progress_indicator = new ProgressIndicator(0.25);
progressIndicatorLayout.apply(determined_progress_indicator);
ProgressBar determined_progress_bar = new ProgressBar(0.25);
progressBarLayout.apply(determined_progress_bar);
root.getChildren().addAll(determined_progress_indicator, determined_progress_bar);
return root;
}
项目:openjfx-8u-dev-tests
文件:ProgressApp.java
@Override
public Node drawNode() {
HBox root = new HBox();
root.setSpacing(spacing);
ProgressIndicator indetermined_progress_indicator = new ProgressIndicator();
progressIndicatorLayout.apply(indetermined_progress_indicator);
ProgressBar indetermined_progress_bar = new ProgressBar();
progressBarLayout.apply(indetermined_progress_bar);
root.getChildren().addAll(indetermined_progress_indicator, indetermined_progress_bar);
return root;
}