javafx.scene.control.Hyperlink.setText()方法的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(8.0k)|赞(0)|评价(0)|浏览(145)

本文整理了Java中javafx.scene.control.Hyperlink.setText()方法的一些代码示例,展示了Hyperlink.setText()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Hyperlink.setText()方法的具体详情如下:
包路径:javafx.scene.control.Hyperlink
类名称:Hyperlink
方法名:setText

Hyperlink.setText介绍

暂无

代码示例

代码示例来源:origin: com.nexitia.emaginplatform/emagin-jfxcore-engine

public void toUpperCase() {
 link.setText(link.getText() != null ? link.getText().toUpperCase() : "");
}

代码示例来源:origin: com.nexitia.emaginplatform/emagin-jfxcore-engine

private void updateHyperlinkText() {
 final String fromString = from.getValue().format(DateTimeFormatter.ISO_LOCAL_DATE);
 final String toString = to.getValue().format(DateTimeFormatter.ISO_LOCAL_DATE);
 customChoice.setText(String.format(customRangePattern, fromString, toString));
 // owner.initialValueProperty().set("CUSTOM_RANGE|" + fromString +
 // "|" + toString);
}

代码示例来源:origin: com.nexitia.emaginplatform/emagin-jfxcore-engine

protected void buildActionsArea() {
 actionsContainer.getStyleClass().add("notification-view-actions-container");
 actionsContainer.getChildren().addAll(deleteAction);
 deleteAction.setOnAction(e -> delete());
 deleteAction.setOpacity(0.54);
 deleteAction.setFocusTraversable(false);
 deleteAction.getStyleClass().addAll("button-transparent-border-primary", "scale-down-on-click");
 deleteAction.setText(controller.getGLocalised("REMOVE_LABEL").toUpperCase());
 // IconUtils.setFontIcon("mdi-close:14", "grey-ikonli", deleteAction);
}

代码示例来源:origin: com.nexitia.emaginplatform/emagin-jfxcore-engine

/**
 * {@inheritDoc}
 */
@Override
public void buildFrom(IEmaginController controller, VLViewComponentXML configuration) {
 getChildren().add(pane);
 getStyleClass().add("simple-forward-editor-header-external-wrapper");
 pane.getStyleClass().add("simple-forward-editor-header");
 backButton.getStyleClass().addAll("rounded-primary-button-button", "transparent-focus");
 doneDutton.getStyleClass().addAll("rounded-primary-button-button", "transparent-focus");
 backButton.setText(controller.getGLocalised("BACK_LABEL"));
 doneDutton.setText(controller.getGLocalised("DONE_LABEL"));
 IconUtils.setFontIcon("fa-long-arrow-left:10", backButton);
 IconUtils.setFontIcon("fa-check:10", doneDutton);
 pane.getChildren().addAll(backButton, NodeHelper.horizontalSpacer(), doneDutton);
 backButton.setOnAction(e -> onCancel());
 doneDutton.setOnAction(e -> onOk());
}

代码示例来源:origin: com.nexitia.emaginplatform/emagin-jfxcore-engine

private void buildActions() {
 okButton.setFocusTraversable(false);
 okButton.setText(controller.getGLocalised("SAVE_LABEL").toUpperCase());
 cancelButton.setText(controller.getGLocalised("CANCEL_LABEL").toUpperCase());
 cancelButton.setFocusTraversable(false);
 actions.setStyle("-fx-padding: 32 0 0 32; -fx-alignment: CENTER_RIGHT;-fx-spacing:16;");
 actions.getChildren().addAll(NodeHelper.horizontalSpacer(), okButton, cancelButton);
 cancelButton.setOnAction(e -> {
  hide();
 });
 okButton.setOnAction(e -> {
  hide();
  editInputComponent.commitModification();
 });
 editInputComponent.getContent().addEventHandler(KeyEvent.KEY_PRESSED, e -> {
  if (e.getCode() == KeyCode.ENTER) {
   hide();
  }
 });
}

代码示例来源:origin: com.nexitia.emaginplatform/emagin-jfxcore-engine

/**
 * Constructor
 */
public LoadMorePaginationBar() {
 super();
 previousButton.getStyleClass().add("simple-pagination-button");
 previousButton.setText("Less".toUpperCase());
 previousButton.setTooltip(new Tooltip("Less"));
 previousButton.disableProperty().bind(Bindings.not(hasPrevious));
 IconUtils.setFontIcon("fa-angle-up:18", previousButton);
 nextButton.setText("More".toUpperCase());
 nextButton.setTooltip(new Tooltip("Load more data"));
 nextButton.disableProperty().bind(Bindings.not(hasNext));
 IconUtils.setFontIcon("fa-angle-down:18", nextButton);
 if(AbstractApplicationRunner.isDesktop()) {
  layout.getChildren().addAll(NodeHelper.horizontalSpacer(),rowsPerPageLabel, itemsCount, rowsPerPageCombo, nextButton, NodeHelper.horizontalSpacer());
 }
 else {
  layout.getChildren().addAll(NodeHelper.horizontalSpacer(), rowsPerPageLabel, nextButton);
 }
}

代码示例来源:origin: Tristan971/Lyrebird

@Override
public void initialize() {
  creditedWork.addListener((o, prev, cur) -> {
    if (cur != null) {
      Platform.runLater(() -> {
        title.setText(cur.getTitle());
        author.setText(cur.getAuthor().getName());
        author.setOnAction(e -> browserSupport.openUrl(cur.getAuthor().getUrl()));
        licensor.setText(cur.getLicensor().getName());
        licensor.setOnAction(e -> browserSupport.openUrl(cur.getLicensor().getUrl()));
        license.setText(cur.getLicense().getName());
        license.setOnAction(e -> browserSupport.openUrl(cur.getLicense().getUrl()));
      });
    }
  });
}

代码示例来源:origin: com.nexitia.emaginplatform/emagin-jfxplatform-components

@Override
protected void updateItem(ObjectModel item, boolean empty) {
 super.updateItem(item, empty);
 setGraphic(null);
 setText(null);
 setStyle("-fx-padding:0");
 if (!empty) {
  layout.setStyle("-fx-pref-height: 48; " + "-fx-background-color: transparent;" + "-fx-border-color: -external-border-color; " + "-fx-border-width: 0.03;"
    + "-fx-alignment: CENTER_LEFT; -fx-padding: 0 16 0 16;");
  final Hyperlink content = new Hyperlink();
  content.setStyle("-fx-text-fill: -primary-text-color; -fx-underline: false; -fx-font-size:16px;-fx-font-family:'Roboto Regular';");
  content.setFocusTraversable(false);
  content.setText(item.getName());
  content.setOnAction(e -> {
   loadChildrenFuntion.apply(item);
  });
  layout.getChildren().clear();
  layout.getChildren().add(content);
  setGraphic(layout);
 }
}

代码示例来源:origin: com.nexitia.emaginplatform/emagin-jfxcore-engine

protected void buildRowItem() {
 IconUtils.setIcon(label, menuItemConfig);
 // the tooltip
 final String tooltipKey = menuItemConfig.getToolTip();
 if (StringUtils.isNotEmpty(tooltipKey)) {
  final String tooltip = controller.getLocalised(tooltipKey);
  label.setTooltip(new Tooltip(tooltip));
 }
 // the title of the row menu
 boolean uppercase = menuItemConfig.getBooleanProperty("upperCase", false);
 final String title = uppercase ? controller.getLocalised(menuItemConfig.getLabel()).toUpperCase() : controller.getLocalised(menuItemConfig.getLabel());
 label.setText(title);
 label.setWrapText(true);
 buildMenuAction();
 getChildren().addAll(label);
}

代码示例来源:origin: com.nexitia.emaginplatform/emagin-jfxcore-engine

doneButton.setText(controller.getLocalised("DONE_LABEL").toUpperCase());
doneButton.getStyleClass().add("listview-toolbar-action-label");
doneButton.setOnAction(e -> doneClicked());

代码示例来源:origin: com.nexitia.emaginplatform/emagin-jfxcore-engine

/**
  * Constructor
  */
 public NotifsFilter() {
  //allNotifs.setText(ms.getMessage("ALL_NOTIFICATIONS_LABEL", null, null));
  //newNotifs.setText(ms.getMessage("NEW_NOTIFICATIONS_LABEL", null, null));
  allNotifs.setText("ALL_NOTIFICATIONS_LABEL");
  newNotifs.setText("NEW_NOTIFICATIONS_LABEL");
  NodeHelper.setHgrow(allNotifs, newNotifs);
  allNotifs.getStyleClass().addAll("notifications-filter-button", "transparent-focus", "scale-down-on-click");
  newNotifs.getStyleClass().addAll("notifications-filter-button", "transparent-focus", "scale-down-on-click");
  allNotifs.prefHeightProperty().bind(heightProperty());
  newNotifs.prefHeightProperty().bind(heightProperty());
  allNotifs.prefWidthProperty().bind(widthProperty().divide(2));
  newNotifs.prefWidthProperty().bind(widthProperty().divide(2));
  getChildren().addAll(allNotifs, newNotifs);
  getStyleClass().add("notifications-filters-container");
  allNotifs.setOnAction(e -> filter.setAll(NotificationStatus.NEW, NotificationStatus.READEN));
  newNotifs.setOnAction(e -> filter.setAll(NotificationStatus.NEW));
 }
}

代码示例来源:origin: com.nexitia.emaginplatform/emagin-jfxcore-engine

okButton.setText(controller.getLocalised("OK_LABEL").toUpperCase());
okButton.setOnAction(e -> {
 okButtonCallBack();

代码示例来源:origin: com.nexitia.emaginplatform/emagin-jfxcore-engine

descriptionLabel.setText(controller.getLocalised(desc));
content.getChildren().add(descriptionLabel);

相关文章