本文整理了Java中javafx.scene.control.Label.setVisible()
方法的一些代码示例,展示了Label.setVisible()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Label.setVisible()
方法的具体详情如下:
包路径:javafx.scene.control.Label
类名称:Label
方法名:setVisible
暂无
代码示例来源:origin: jfoenixadmin/JFoenix
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);
代码示例来源:origin: torakiki/pdfsam
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);
}
代码示例来源:origin: com.nexitia.emaginplatform/emagin-jfxcore-engine
/**
* 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");
}
代码示例来源:origin: com.github.vatbub/common.updater
@Override
public void preparePhaseStarted() {
Platform.runLater(() -> {
updateProgressAnimation.setVisible(true);
updateProgressText.setVisible(true);
updateProgressText.setText(bundle.getString("progress.preparing"));
});
}
代码示例来源:origin: nl.cloudfarming.client/calendar-api
public void updateExpanded(CalendarNode node) {
expandedStateLabel.setVisible(!node.getChildren().isEmpty());
setExpanded(node.isExpanded());
}
代码示例来源:origin: it.unibo.alchemist/alchemist-projectview
private void setVisibilityBatch(final boolean visibility) {
this.batch.setVisible(visibility);
this.listYaml.setVisible(visibility);
this.spinBatch.setVisible(visibility);
this.thread.setVisible(visibility);
}
代码示例来源:origin: com.github.vatbub/common.updater
@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);
});
}
代码示例来源:origin: it.unibo.alchemist/alchemist-projectview
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();
}
}
}
}
代码示例来源:origin: Tristan971/Lyrebird
/**
* 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);
}
代码示例来源:origin: com.github.vatbub/common.updater
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);
});
}
}
代码示例来源:origin: com.nexitia.emaginplatform/emagin-jfxcore-engine
/**
* @{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);
}
}
代码示例来源:origin: com.nexitia.emaginplatform/emagin-jfxcore-engine
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);
}
}
代码示例来源:origin: com.nexitia.emaginplatform/emagin-jfxcore-engine
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();
}
代码示例来源:origin: com.github.vatbub/common.updater
@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);
}
代码示例来源:origin: com.nexitia.emaginplatform/emagin-jfxcore-engine
@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());
}
代码示例来源:origin: Tristan971/Lyrebird
userLocation.setText(userLocationText);
} else {
userLocation.setVisible(false);
userLocation.setManaged(false);
userWebsite.setText(userWebsiteText);
} else {
userWebsite.setVisible(false);
userWebsite.setManaged(false);
代码示例来源:origin: com.nexitia.emaginplatform/emagin-jfxcore-engine
counterBox.setAlignment(Pos.BASELINE_RIGHT);
counterBox.getChildren().add(counterText);
counterText.setVisible(false);
counterText.getStyleClass().add("counter-label");
代码示例来源:origin: org.controlsfx/controlsfx
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());
代码示例来源:origin: com.jfoenix/jfoenix
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);
内容来源于网络,如有侵权,请联系作者删除!