customColorGrid.getChildren().clear(); if (customColors.isEmpty()) { customColorLabel.setVisible(false); customColorLabel.setManaged(false); customColorGrid.setVisible(false); return; } else { customColorLabel.setVisible(true); customColorLabel.setManaged(true); customColorGrid.setVisible(true);
public Footer(RunButton runButton, OpenButton openButton, String ownerModule) { this.ownerModule = defaultString(ownerModule); this.openButton = openButton; this.runButton = runButton; this.getStyleClass().addAll("pdfsam-container", "footer-pane"); this.statusLabel.getStyleClass().add("status-label"); this.statusLabel.setVisible(false); this.bar.setMaxWidth(Double.MAX_VALUE); this.bar.getStyleClass().add("pdfsam-footer-bar"); this.statusLabel.setMaxHeight(Double.MAX_VALUE); VBox progressPane = new VBox(statusLabel, bar); progressPane.getStyleClass().add("progress-pane"); VBox.setVgrow(statusLabel, Priority.ALWAYS); HBox.setHgrow(bar, Priority.ALWAYS); HBox.setHgrow(progressPane, Priority.ALWAYS); this.failed.setVisible(false); StackPane buttons = new StackPane(failed, openButton); buttons.setAlignment(Pos.CENTER_LEFT); this.getChildren().addAll(runButton, buttons, progressPane); eventStudio().add(TaskExecutionRequestEvent.class, e -> { if (e.getModuleId().equals(ownerModule)) { failed.setVisible(false); openButton.setVisible(false); statusLabel.setVisible(true); statusLabel.setText(DefaultI18nContext.getInstance().i18n("Requested")); bar.setProgress(0); } }); eventStudio().addAnnotatedListeners(this); }
/** * Build the help text and the error label */ protected void buildHelpTextAndErrorText() { errorText.setVisible(false); errorText.setStyle("-fx-text-fill:red;" + "-fx-font-size:0.9em;" + "-fx-padding:4 0 8 0;-fx-font-weight:bold"); }
@Override public void preparePhaseStarted() { Platform.runLater(() -> { updateProgressAnimation.setVisible(true); updateProgressText.setVisible(true); updateProgressText.setText(bundle.getString("progress.preparing")); }); }
public void updateExpanded(CalendarNode node) { expandedStateLabel.setVisible(!node.getChildren().isEmpty()); setExpanded(node.isExpanded()); }
private void setVisibilityBatch(final boolean visibility) { this.batch.setVisible(visibility); this.listYaml.setVisible(visibility); this.spinBatch.setVisible(visibility); this.thread.setVisible(visibility); }
@Override public void operationCanceled() { Platform.runLater(() -> { updateProgressAnimation.setVisible(false); updateProgressText.setVisible(false); okButton.setText(bundle.getString("button.ok")); okButton.setDisable(false); cancelButton.setText(bundle.getString("button.cancel")); updateProgressBar.setVisible(false); }); }
private void setComponentVisible(final ToggleSwitch ts, final boolean vis) { if (ts.equals(this.tsOut)) { this.setOut.setVisible(vis); this.pathOut.setVisible(vis); this.baseNameOut.setVisible(vis); this.bnTextOut.setVisible(vis); this.intOut.setVisible(vis); this.unitOut.setVisible(vis); this.spinOut.setVisible(vis); this.imgViewOut.setVisible(vis); } else { if (ts.isSelected() && this.pathYaml.getText().equals("")) { setAlert(RESOURCES.getString("file_no_selected"), RESOURCES.getString("yaml_no_selected_header"), RESOURCES.getString("yaml_no_selected_content")); setVisibilityBatch(false); ts.setSelected(false); } else { setVisibilityBatch(vis); if (ts.isSelected()) { setVariablesList(); } } } }
/** * Called by {@link #updateFollowStatusText()} ()} to give, if pertinent, a simple text displaying if the target * user is already following the current user. */ private void updateFriendshipStatus() { CompletableFuture.supplyAsync(this::getRelationship) .thenAcceptAsync(relationship -> { String relStatusText = null; if (relationship.isTargetFollowingSource()) { if (relationship.isTargetFollowedBySource()) { relStatusText = "You follow each other!"; } else { relStatusText = "Follows you."; } } if (relStatusText == null) { userFriendshipStatus.setVisible(false); userFriendshipStatus.setManaged(false); } else { userFriendshipStatus.setText(relStatusText); userFriendshipStatus.setVisible(true); userFriendshipStatus.setManaged(true); } }, Platform::runLater); }
public void showErrorMessage(String message) { Platform.runLater(() -> { detailsLabel.setText("An error occurred:\n" + message); updateProgressAnimation.setVisible(false); updateProgressText.setVisible(false); okButton.setDisable(false); okButton.setText(bundle.getString("button.ok.retry")); updateProgressBar.setVisible(false); }); } }
/** * @{inheritedDoc} */ @Override public void displayError() { if(isNotValid()) { String errorMessage = getFirstErrorMessage(); if (errorMessage == null) { errorMessage = "Invalid Field"; } buildHelpTextAndErrorText(); errorText.setText(errorMessage); errorText.setTooltip(new Tooltip(errorMessage)); errorText.setVisible(true); state = VLConstraintState.NOT_VALID; input.setInErrorState(); if (!inputContainer.getChildren().contains(errorText)) { inputContainer.getChildren().add(errorText); } } else { errorText.setVisible(false); } }
public void setPageResult(IPageResult pageResult) { if (pageResult != null) { hasNext.set(pageResult.getHasNextPage()); hasPrevious.set(pageResult.getHasPreviousPage()); if (pageResult.getTotal() > 0) { elementCount.setVisible(true); } setElementCount(pageResult.getTotal(), pageResult.getTotalElements()); } else { hasNext.set(false); hasPrevious.set(false); setElementCount(0, 0); elementCount.setVisible(false); } }
protected void zoomInUniqueLocation() { location0.setVisible(false); EasingInterpolator ei = new EasingInterpolator(EasingMode.IN_EXPO); ScaleTransition st = NodeHelper.scaleIn(location1, Duration.millis(500)); st.setInterpolator(ei); st.setFromX(0.2); st.setFromY(0.2); st.play(); }
@FXML // This method is called by the FXMLLoader when initialization is // complete void initialize() { assert cancelButton != null : "fx:id=\"cancelButton\" was not injected: check your FXML file 'AlertDialog.fxml'."; assert detailsLabel != null : "fx:id=\"detailsLabel\" was not injected: check your FXML file 'AlertDialog.fxml'."; assert messageLabel != null : "fx:id=\"messageLabel\" was not injected: check your FXML file 'AlertDialog.fxml'."; assert okButton != null : "fx:id=\"okButton\" was not injected: check your FXML file 'AlertDialog.fxml'."; assert updateProgressAnimation != null : "fx:id=\"updateProgressAnimation\" was not injected: check your FXML file 'AlertDialog.fxml'."; assert updateProgressBar != null : "fx:id=\"updateProgressBar\" was not injected: check your FXML file 'AlertDialog.fxml'."; assert updateProgressText != null : "fx:id=\"updateProgressText\" was not injected: check your FXML file 'AlertDialog.fxml'."; // Initialize your logic here: all @FXML variables will have been // injected if (updateInfo.showAlert) { // an update is available, show its info detailsLabel.setText(messageText); } else { // No update is available, show a corresponding message detailsLabel.setText(""); messageLabel.setText(bundle.getString("label.noUpdate")); okButton.setDisable(true); cancelButton.setDisable(true); } updateProgressAnimation.setVisible(false); updateProgressText.setVisible(false); }
@Override public void updateLocation(UpdateCurrentLocationEvent current) { Node previousLoc = current.getLocationNode(); boolean hasPrevious = previousLoc != null; backIcon.setVisible(hasPrevious); location0.setVisible(hasPrevious); if (hasPrevious) { // location0.textProperty().set(previousLoc); // location0.setOpacity(1); } location1.textProperty().unbind(); location1.textProperty().bind(current.getCurrentView().contentLocationProperty()); }
userLocation.setText(userLocationText); } else { userLocation.setVisible(false); userLocation.setManaged(false); userWebsite.setText(userWebsiteText); } else { userWebsite.setVisible(false); userWebsite.setManaged(false);
counterBox.setAlignment(Pos.BASELINE_RIGHT); counterBox.getChildren().add(counterText); counterText.setVisible(false); counterText.getStyleClass().add("counter-label");
lbMessage.setVisible(false); lbMessage.setManaged(false); authenticator.call(new Pair<>(txUserName.getText(), txPassword.getText())); lbMessage.setVisible(false); lbMessage.setManaged(false); hide(); lbMessage.setVisible(true); lbMessage.setManaged(true); lbMessage.setText(ex.getMessage());
customColorGrid.getChildren().clear(); if (customColors.isEmpty()) { customColorLabel.setVisible(false); customColorLabel.setManaged(false); customColorGrid.setVisible(false); return; } else { customColorLabel.setVisible(true); customColorLabel.setManaged(true); customColorGrid.setVisible(true);