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

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

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

Hyperlink.<init>介绍

暂无

代码示例

代码示例来源:origin: io.datafx/ui

public static <S, T> ActionTableCell<S, T, Hyperlink> createWithHyperlink(Consumer<S> consumer, String text) {
    return new ActionTableCell<S, T, Hyperlink>(consumer, new Hyperlink(text));
  }
}

代码示例来源:origin: org.javafxdata/datafx-ui

public static <S, T> ActionTableCell<S, T, Hyperlink> createWithHyperlink(Consumer<S> consumer, String text) {
    return new ActionTableCell<S, T, Hyperlink>(consumer, new Hyperlink(text));
  }
}

代码示例来源:origin: org.controlsfx/controlsfx

/**
 * Takes the provided {@link Action} and returns a {@link Hyperlink} instance
 * with all relevant properties bound to the properties of the Action.
 *
 * @param action The {@link Action} that the {@link Hyperlink} should bind to.
 * @return A {@link Hyperlink} that is bound to the state of the provided
 *      {@link Action}
 */
public static Hyperlink createHyperlink(final Action action) {
  return configure(new Hyperlink(), action, ActionTextBehavior.SHOW);
}

代码示例来源:origin: org.controlsfx/controlsfx

Hyperlink hyperlink = new Hyperlink(text.substring(startPos + 1, endPos));
hyperlink.setPadding(new Insets(0, 0, 0, 0));
hyperlink.setOnAction(eventHandler);

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

/**
 * @{inheritedDoc}
 */
@Override
public void buildFrom(IEmaginController controller, VLViewComponentXML configuration) {
 super.buildFrom(controller, configuration);
 box.setSpacing(32);
 box.getChildren().add(label);
 box.addEventFilter(MouseEvent.MOUSE_CLICKED, ev -> loadSearchPane());
 final Pane spacer = new Pane();
 HBox.setHgrow(spacer, Priority.ALWAYS);
 box.getChildren().add(spacer);
 final Label valueLabel = new Label();
 valueLabel.setOpacity(0.24);
 box.getChildren().add(valueLabel);
 final Hyperlink icon = new Hyperlink();
 IconUtils.setFontIcon("mdi-chevron-right:22", icon);
 box.getChildren().add(icon);
}

代码示例来源:origin: net.sf.sf3jswing/kernel-core

for (int i = 0; i < linksCaptions_bunkey.length; i++) {
  Hyperlink hpl = hpls[i] = new Hyperlink(text.bundle.getString(linksCaptions_bunkey[i]));
  try {
    Image image = images[i] = new Image(linksImages[i].openStream());

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

private void buildFilterToolbar() {
 filtersToolbar.setStyle("-fx-background-color: white;" + "-fx-alignment:CENTER_LEFT;" + "-fx-padding: 16 16 16 64;" + "-fx-spacing:16;" + "-fx-border-color: -grey-color-300;"
   + "-fx-border-width: 0 0 1 0;" + "-fx-pref-height: 48;");
 getChildren().add(filtersToolbar);
 NodeHelper.setHgrow(filtersToolbar);
 filtersToolbar.managedProperty().bind(filtersToolbar.visibleProperty());
 final Hyperlink filterToolBarButton = new Hyperlink();
 defaultToolbar.getChildren().add(filterToolBarButton);
 filterToolBarButton.setOnAction(e -> {
  filtersToolbar.visibleProperty().set(!filtersToolbar.visibleProperty().get());
 });
 filtersToolbar.setVisible(false);
}

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

protected void buildCloseButton() {
 boolean showAsDialog = Boolean.valueOf(configuration.getPropertyValue(XMLConstants.DIALOG));
 if(showAsDialog) {
  Hyperlink link = new Hyperlink();
  link.getStyleClass().add("transparent-focus");
  FontIcon icon = new FontIcon("mdi-close:32");
  link.setGraphic(icon);
  icon.getStyleClass().add("wizard-close-icon");
  layout.getChildren().addAll(NodeHelper.horizontalSpacer(), link);
  if (controller instanceof WizardViewController) {
   link.setOnAction(e -> ((WizardViewController) controller).hide());
  }
 }
 else {
  layout.getChildren().addAll(NodeHelper.horizontalSpacer());
 }
}

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

private Label location1 = new Label("Location 1");
protected Hyperlink backIcon = new Hyperlink();
protected AbstractViewController controller;

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

/**
  * @return
  */
 protected ButtonBase getPinOrCloseButton() {
  Hyperlink button = new Hyperlink();
  IconUtils.setFontIcon("mdi-close:22", button);
  button.getGraphic().getStyleClass().addAll("red-ikonli", "transparent-focus");
  button.setContentDisplay(ContentDisplay.GRAPHIC_ONLY);

  button.setOnAction(e -> {
   CloseMenuEvent closeMenuEvent = new CloseMenuEvent(MenuPos.TERNARY_MENU);
   dispatchEvent(closeMenuEvent);
  });

  return button;
 }
}

代码示例来源: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

private void buildSearchFilter() {
 searchToolbar.setStyle("-fx-background-color: white;" + "-fx-alignment:CENTER_LEFT;" + "-fx-padding: 8 16 8 64;" + "-fx-spacing:16;" + "-fx-border-color: -grey-color-300;"
   + "-fx-border-width: 0 0 1 0;" + "-fx-pref-height: 48;");
 getChildren().addAll(searchToolbar);
 NodeHelper.setHgrow(searchToolbar);
 searchToolbar.managedProperty().bind(searchToolbar.visibleProperty());
 final CustomTextField customTextField = new CustomTextField();
 customTextField.setPrefWidth(350);
 final Button searchIconRight = new Button("Go");
 searchIconRight.setFocusTraversable(false);
 searchIconRight.setOnAction(e -> {
  Method method = null;
  try {
   method = controller.getClass().getMethod("runSearch", Event.class);
   method.invoke(controller, e);
  } catch (final Exception e1) {
   e1.printStackTrace();
  }
 });
 final Hyperlink searchToolBarButton = new Hyperlink();
 defaultToolbar.getChildren().add(searchToolBarButton);
 searchToolBarButton.setOnAction(e -> {
  searchToolbar.visibleProperty().set(!searchToolbar.visibleProperty().get());
 });
 searchToolbar.getChildren().addAll(NodeHelper.horizontalSpacer(), customTextField, searchIconRight, NodeHelper.horizontalSpacer());
 searchToolbar.setVisible(false);
}

代码示例来源:origin: com.bitplan.gui/com.bitplan.javafx

/**
 * get the flowPane for the Exception Help
 * 
 * @param ehelp
 * @param linker
 */
public static FlowPane getFlowPane(ExceptionHelp ehelp, Linker linker) {
 FlowPane fp = new FlowPane();
 Label lbl = new Label(Translator.translate(ehelp.getI18nHint()));
 Hyperlink link = new Hyperlink(Translator.translate("help"));
 fp.getChildren().addAll(lbl, link);
 link.setOnAction((evt) -> {
  linker.browse(ehelp.getUrl());
 });
 return fp;
}

代码示例来源:origin: PhoenicisOrg/phoenicis

.then(false).otherwise(true);
final Hyperlink gitRevisionHyperlink = new Hyperlink();

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

public Node _present(IEmaginController controller, VLViewComponentXML configuration, Object item) {
  Hyperlink label = new Hyperlink();
  String rowCriteria = configuration.getPropertyValue("rowCriteria");
  boolean show = true;
  if(StringUtils.isNotBlank(rowCriteria)) {
   EpTableCell c = (EpTableCell) cell;
   EpTableRow r = (EpTableRow) c.getTableRow();
   show = r.evaluateCriteria(rowCriteria);
  }

  if(show) {
   IconUtils.setIcon(label, configuration);
   if (label.getGraphic() != null) {
    label.getGraphic().getStyleClass().add("grey-flat-ikonli");
   }

   NodeHelper.setTitle(label, configuration, (AbstractViewController) controller);
   NodeHelper.setStyleClass(label, configuration, "buttonStyleClass", true);
   ComponentToButtonBaseHelper.setOnAction(configuration, label, (AbstractViewController) controller, (OperationData) item);
  } else {
   label.setManaged(false);
   label.setVisible(false);
  }

  return label;
 }
}

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

final Hyperlink refresh = new Hyperlink();
defaultToolbar.getChildren().addAll(refresh);

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

});
okButton = new Hyperlink();
bottomToolbar.getChildren().addAll(okButton);
bottomToolbar.setStyle("-fx-alignment: CENTER_RIGHT;" + "-fx-spacing: 32;" + "-fx-padding: 8;" + "-fx-pref-height: 52;");

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

protected ButtonBase build(VLViewComponentXML configuration) {
 if ("button".equals(type)) {
  Button buttonAction = new JFXButton();
  buttonAction.getStyleClass().remove(0);
  buttonAction.getStyleClass().removeAll("jfx-button", "button");
  buttonAction.managedProperty().bind(buttonAction.visibleProperty());
  NodeHelper.setTitle(buttonAction, configuration, controller);
  IconUtils.setIcon(buttonAction, configuration);
  NodeHelper.setStyleClass(buttonAction, configuration, "styleClass", true);
  buttonAction.getStyleClass().add("ep-button");
  String displayMode = configuration.getPropertyValue(XMLConstants.HYPERLINK_DISPLAY_MODE, "LEFT");
  buttonAction.setContentDisplay(ContentDisplay.valueOf(displayMode));
  boolean readOnly = configuration.getBooleanProperty("readOnly", false);
  buttonAction.setDisable(readOnly);
  buttonAction.addEventFilter(ActionEvent.ACTION, e -> onAction(buttonAction));
  return buttonAction;
 } else {
  Hyperlink hyperlinkAction = new Hyperlink();
  hyperlinkAction.managedProperty().bind(hyperlinkAction.visibleProperty());
  NodeHelper.setTitle(hyperlinkAction, configuration, controller);
  NodeHelper.setStyleClass(hyperlinkAction, configuration, "styleClass", true);
  IconUtils.setIcon(hyperlinkAction, configuration);
  boolean readOnly = configuration.getBooleanProperty("readOnly", false);
  hyperlinkAction.setDisable(readOnly);
  hyperlinkAction.addEventFilter(ActionEvent.ACTION, e -> onAction(hyperlinkAction));
  return hyperlinkAction;
 }
}

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

private void loadSearchPane() {
 final ListView listView = cell.getListView();
 final HBox box = new HBox();
 box.setSpacing(32);
 final Hyperlink label = new Hyperlink(this.label.getText() + ": ");
 box.getChildren().add(label);
 label.setOnAction(e -> loadSearchPane());
 final HBox currentSelected = new HBox();
 currentSelected.setSpacing(32);
 //    cell.getRootView().getChildren().add(currentSelected);
 final HBox searchWrapper = new HBox();
 final TextField searchField = new TextField();
 final Button searchButton = new Button("Search");
 HBox.setHgrow(searchField, Priority.ALWAYS);
 searchWrapper.getChildren().addAll(searchField, searchButton);
 //cell.getRootView().getChildren().add(searchWrapper);
 final HBox actionsBox = new HBox();
 final Button save = new Button("Save");
 final Button back = new Button("Back");
 back.setOnAction(e -> {
  //cell.getRootView().getChildren().clear();
  //cell.getRootView().getChildren().add(listView);
 });
 save.setOnAction(e -> {
  //cell.getRootView().getChildren().clear();
  //cell.getRootView().getChildren().add(listView);
 });
 actionsBox.getChildren().addAll(save, back);
 // cell.getRootView().getChildren().add(actionsBox);
}

代码示例来源:origin: com.aquafx-project/aquafx

withState(new RadioButton("Disabled"), "selected, disabled"));
newSection("HyperLink:",
    new Hyperlink("Hyperlink"),
    withState(new Hyperlink("Visited"), "visited"),
    withState(new Hyperlink("Hover"), "hover"),
    withState(new Hyperlink("Armed"), "armed"),
    withState(new Hyperlink("Focused"), "focused"),
    withState(new Hyperlink("F & Visited"), "focused, visited"),
    withState(new Hyperlink("F & Hover"), "focused, hover"),
    withState(new Hyperlink("F & Armed"), "focused, armed"),
    withState(new Hyperlink("Disabled"), "disabled"));
ObservableList<String> choiceBoxLongList = sampleItems(200);
choiceBoxLongList.add(100, "Long List");

相关文章