Example usage for javafx.scene.control Hyperlink Hyperlink

List of usage examples for javafx.scene.control Hyperlink Hyperlink

Introduction

In this page you can find the example usage for javafx.scene.control Hyperlink Hyperlink.

Prototype

public Hyperlink() 

Source Link

Document

Creates a hyperlink with no label.

Usage

From source file:mesclasses.util.NodeUtil.java

public static Hyperlink buildEleveLink(Eleve eleve, StringProperty bindingProperty, String fromView) {
    Hyperlink link = new Hyperlink();
    link.textProperty().bind(bindingProperty);
    link.setOnAction((event) -> {/*from  w w w .  jav  a  2s.  c  om*/
        EventBusHandler.post(new OpenMenuEvent(Constants.ELEVE_RAPPORT_VIEW).setFromView(fromView));
        EventBusHandler.post(new SelectEleveEvent(eleve));
    });
    return link;
}

From source file:UI.MainStageController.java

@FXML
/**//w  w w. j av a  2  s.  co m
 *
 * Shows information about the software.
 */
private void showAboutAlert() {
    Hyperlink hyperlink = new Hyperlink();
    hyperlink.setText("https://github.com/jmueller95/CORNETTO");
    Text text = new Text("Cornetto is a modern tool to visualize and calculate correlations between"
            + "samples.\nIt was created in 2017 by students of the group of Professor Huson in Tbingen.\nThe group"
            + "was supervised by Caner Bagci.\n\n" + "This project is licensed under the MIT License.\n\n"
            + "For more information go to: ");

    TextFlow textFlow = new TextFlow(text, hyperlink);

    text.setWrappingWidth(500);
    aboutAlert = new Alert(Alert.AlertType.INFORMATION);
    aboutAlert.setTitle("About " + GlobalConstants.NAME_OF_PROGRAM);
    aboutAlert.setHeaderText("What is " + GlobalConstants.NAME_OF_PROGRAM);
    aboutAlert.getDialogPane().setContent(textFlow);
    aboutAlert.show();
}