private void updateText() { String finalText; if (!this.progressText.equals("")) { finalText = this.progressText; } else { finalText = ""; } if (!this.progressText.equals("") && !this.controlText.equals("")) { // Add - finalText = finalText + " - "; } // add the controlText finalText = finalText + controlText; super.setText(finalText); } }
public void toUpperCase() { button.setText(button.getText().toUpperCase()); } }
public void toUpperCase() { button.setText(button.getText().toUpperCase()); } }
@Override public void onLocaleChange() { switch (options) { case DMXDialog.OPTIONS_OK: buttons[0].setText(resourceManager.getString("dialog.button.ok")); break; case DMXDialog.OPIONS_OK_CANCEL: buttons[0].setText(resourceManager.getString("dialog.button.ok")); buttons[1].setText(resourceManager.getString("dialog.button.cancel")); break; case DMXDialog.OPTIONS_YES_NO: buttons[0].setText(resourceManager.getString("dialog.button.yes")); buttons[1].setText(resourceManager.getString("dialog.button.no")); break; case DMXDialog.OPTIONS_YES_NO_CANCEL: buttons[0].setText(resourceManager.getString("dialog.button.yes")); buttons[1].setText(resourceManager.getString("dialog.button.no")); buttons[2].setText(resourceManager.getString("dialog.button.cancel")); break; default: } }
@Override protected void failed() { super.failed(); Platform.runLater(() -> { button.setText("--"); }); }
@Override protected void setException(Throwable t) { super.setException(t); Platform.runLater(() -> { button.setText("--"); }); } };
@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); }); }
@Override protected Void call() throws Exception { getCurrentUserOperation.doOperation(new JsonObject(), res -> { Platform.runLater(() -> { button.setText((String) ((OperationData) res.rootData()).getAttributes().get("nickName")); }); }); return null; }
/** * */ public void initialize() { this.backBtn.setText(RESOURCES.getString("back")); this.finishBtn.setText(RESOURCES.getString("finish")); this.finishBtn.setDisable(true); this.select.setText(RESOURCES.getString("select")); this.choiceTempl.setItems(TEMPLATES); this.choiceTempl.getSelectionModel().selectedItemProperty().addListener((observable, oldValue, newValue) -> { selectedTemplate = newValue; finishBtn.setDisable(false); }); }
@FXML void okButtonOnAction(ActionEvent event) { UpdateAvailableDialog t = this; okButton.setDisable(true); cancelButton.setText(bundle.getString("button.cancel.cancelDownload")); downloadThread = new Thread(() -> { try { boolean res = UpdateChecker.downloadAndInstallUpdate(updateInfo, t); if (res) { t.hide(); } } catch (IllegalStateException | IOException e) { showErrorMessage(e.getLocalizedMessage()); e.printStackTrace(); } }); downloadThread.start(); }
/** * */ public void initialize() { SVGImageUtils.installSvgLoader(); this.btnNew.setGraphic(new ImageView(SVGImageUtils.getSvgImage("icon/new.svg", IMG_WIDTH, IMG_HEIGHT))); this.btnNew.setText(RESOURCES.getString("new")); this.btnOpen.setGraphic(new ImageView(SVGImageUtils.getSvgImage("icon/open.svg", IMG_WIDTH, IMG_HEIGHT))); this.btnOpen.setText(RESOURCES.getString("open")); this.btnSave.setGraphic(new ImageView(SVGImageUtils.getSvgImage("icon/save.svg", IMG_WIDTH, IMG_HEIGHT))); this.btnSave.setText(RESOURCES.getString("save")); this.btnSave.setDisable(true); }
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); }); } }
/** * */ public void initialize() { SVGImageUtils.installSvgLoader(); this.run.setGraphic(new ImageView(SVGImageUtils.getSvgImage("icon/run.svg", RUN_WIDTH, RUN_HEIGHT))); this.run.setText(RESOURCES.getString("run")); this.run.setDisable(true); this.folder = SVGImageUtils.getSvgImage("icon/folder.svg", TREE_ICON_WIDTH, TREE_ICON_HEIGHT); this.file = SVGImageUtils.getSvgImage("icon/file.svg", TREE_ICON_WIDTH, TREE_ICON_HEIGHT); }
private void buildActions() { okButton.getStyleClass().addAll("button-transparent-border-transparent"); okButton.setDefaultButton(true); okButton.setText(controller.getGLocalised("DONE_LABEL").toUpperCase()); cancelButton.getStyleClass().addAll("button-transparent-border-transparent"); cancelButton.setText(controller.getGLocalised("CANCEL_LABEL").toUpperCase()); actions.getStyleClass().add("form-actions-inline-editor-wrapper"); actions.getChildren().addAll(NodeHelper.horizontalSpacer(), cancelButton, okButton); allOverContainer.getChildren().add(actions); VBox.setMargin(actions, new Insets(16, 0, 0, 0)); cancelButton.setOnAction(e -> onCancel()); okButton.setOnAction(e -> onOk()); }
/** * Build done button */ private void buildDoneButton() { doneButton.getStyleClass().addAll("button-small", "table-toolbar-action", "ep-button"); doneButton.setOnAction(e -> modifyClicked(controller)); doneButton.setText(controller.getGLocalised("DONE_LABEL").toUpperCase()); IconUtils.setFontIcon("fa-check:16", doneButton); modifyingActionsWrapper.getChildren().addAll(NodeHelper.horizontalSpacer(), doneButton); }
@Override public void start(Stage primaryStage) { primaryStage.setTitle("Hello World!"); Button btn = new Button(); btn.setText("Say 'Hello World'"); btn.setOnAction(new EventHandler<ActionEvent>() { @Override public void handle(ActionEvent event) { System.out.println("Hello World!"); } }); StackPane root = new StackPane(); root.getChildren().add(btn); primaryStage.setScene(new Scene(root, 300, 250)); primaryStage.show(); } }
/** * Build the modify button. */ private void buildModifyButton() { modifyButton.getStyleClass().addAll("table-toolbar-action", "ep-button"); modifyButton.setOnAction(e -> modifyClicked(controller)); modifyButton.setText(controller.getGLocalised("EDIT_LABEL").toUpperCase()); IconUtils.setFontIcon("gmi-more-horiz:18", modifyButton); allOverWrapper.getChildren().add(modifyButton); if (selectable.get()) { //thickButton.setOnAction(e -> thickClicked()); //modifyingActionsWrapper.getChildren().add(0, thickButton); } NodeHelper.setHgrow(modifyingActionsWrapper); modifyingActionsWrapper.visibleProperty().bind(((IModifiableToolbarHolder) toolbarHolder).modifyingProperty()); modifyingActionsWrapper.managedProperty().bind(modifyingActionsWrapper.visibleProperty()); rootContainer.getChildren().add(modifyingActionsWrapper); }