當前位置: 首頁>>代碼示例>>Java>>正文


Java Hyperlink.setText方法代碼示例

本文整理匯總了Java中javafx.scene.control.Hyperlink.setText方法的典型用法代碼示例。如果您正苦於以下問題:Java Hyperlink.setText方法的具體用法?Java Hyperlink.setText怎麽用?Java Hyperlink.setText使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在javafx.scene.control.Hyperlink的用法示例。


在下文中一共展示了Hyperlink.setText方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: populate

import javafx.scene.control.Hyperlink; //導入方法依賴的package包/類
public void populate(Script script) {
        this.flow = new TextFlow();
        Text name = new Text(script.getName());
        name.getStyleClass().add("subtitle");
        this.getChildren().add(name);
        

        RootNode node = mdProcessor.parseMarkdown(script.getDescription().toCharArray());
        //Text desc = new Text(script.getDescription());
        //this.getChildren().add(desc);
        node.accept(this.mdToFx);
        //add description flow
        this.getChildren().add(flow);
        
        
        final String documentationPage = script.getXProcScript().getHomepage();
        
        if (documentationPage != null && documentationPage.isEmpty() == false) { 
                Hyperlink link = new Hyperlink();
                link.setText("Read online documentation");

                link.setOnAction(Links.getEventHander(main.getHostServices(),documentationPage));
                this.getChildren().add(link);
        }
}
 
開發者ID:daisy,項目名稱:pipeline-gui,代碼行數:26,代碼來源:ScriptInfoHeaderVBox.java

示例2: addFinderLinkRow

import javafx.scene.control.Hyperlink; //導入方法依賴的package包/類
public void addFinderLinkRow(String label, final String path) {
        Hyperlink link = new Hyperlink();
    link.setText(label);
    link.setTooltip(new Tooltip(path));
link.setOnAction(new EventHandler<ActionEvent>() {

    public void handle(ActionEvent t) {
        try {
                String cmd = PlatformUtils.getFileBrowserCommand() + " " + path;
                                Runtime.getRuntime().exec(cmd);
                        } catch (IOException e) {
                                // TODO Auto-generated catch block
                                e.printStackTrace();
                        }
    }
});

addRow(link);
}
 
開發者ID:daisy,項目名稱:pipeline-gui,代碼行數:20,代碼來源:GridPaneHelper.java

示例3: showAboutWindow

import javafx.scene.control.Hyperlink; //導入方法依賴的package包/類
private void showAboutWindow()
{
	String appName = Main.appTitle;
	String version = Main.releaseVersion;
	String website = Main.website;
	String email = Main.email;
	String copyrightNotice = Main.copyrightNotice;

	Alert about = new Alert(AlertType.INFORMATION, "About " + appName);
	about.initOwner(getStage());
	about.setTitle("About " + appName);
	about.setHeaderText(appName + " version " + version);
	
	FlowPane infoPane = generateLabelAndLinkPane("For more information visit", website, Font.getDefault().getSize() + 2);
	infoPane.setPadding(new Insets(0, 0, 15, 0));
	
	FlowPane copyright = generateLabelAndLinkPane(copyrightNotice, "mailto:" + email, Font.getDefault().getSize());
	Hyperlink mailLink = (Hyperlink) copyright.getChildren().get(1);
	mailLink.setText(email);
	copyright.setPadding(new Insets(0, 0, 15, 0));
	
	VBox aboutVBox = new VBox();
	aboutVBox.getChildren().addAll(infoPane, copyright, getAttributionLinksForAboutDialog());
	about.getDialogPane().setContent(aboutVBox);
	about.getDialogPane().setPrefWidth(440);
	
	about.showAndWait();
}
 
開發者ID:ck3ck3,項目名稱:WhoWhatWhere,代碼行數:29,代碼來源:GUIController.java

示例4: getAttributionLinksForAboutDialog

import javafx.scene.control.Hyperlink; //導入方法依賴的package包/類
private VBox getAttributionLinksForAboutDialog()
{
	FlowPane iconsAttributionPane = generateLabelAndLinkPane("All icons (except for ", "http://icons8.com", Font.getDefault().getSize());
	Label labelToAdd = new Label(") are from");
	labelToAdd.setGraphic(new ImageView(new Image(applicationIcon16Location)));
	labelToAdd.setContentDisplay(ContentDisplay.LEFT);
	labelToAdd.setGraphicTextGap(2);
	iconsAttributionPane.getChildren().add(1, labelToAdd); //add the label in the middle of the message
	
	FlowPane softwareAttributionPane = generateLabelAndLinkPane("Click", Main.attributionHTMLLocation, Font.getDefault().getSize());
	Hyperlink tempLink = (Hyperlink) softwareAttributionPane.getChildren().get(1);
	tempLink.setText("here");
	softwareAttributionPane.getChildren().add(new Label("to see which software libraries are used in Who What Where."));
	
	VBox vbox = new VBox();
	vbox.getChildren().addAll(iconsAttributionPane, softwareAttributionPane);
	
	return vbox;
}
 
開發者ID:ck3ck3,項目名稱:WhoWhatWhere,代碼行數:20,代碼來源:GUIController.java

示例5: visit

import javafx.scene.control.Hyperlink; //導入方法依賴的package包/類
@Override
public void visit(ExpLinkNode node) {
        Hyperlink link = new Hyperlink();
        StringBuffer buff = new StringBuffer();
        printChildren(buff, node);
        link.setText(buff.toString());
        link.setOnAction(Links.getEventHander(this.parent.getHostServices(), node.url));
        parent.addChild(link);

}
 
開發者ID:daisy,項目名稱:pipeline-gui,代碼行數:11,代碼來源:MarkdownToJavafx.java

示例6: setupLink

import javafx.scene.control.Hyperlink; //導入方法依賴的package包/類
public static Hyperlink setupLink(Hyperlink hyperlink, String text, String url) {
	hyperlink.setText(text);
	hyperlink.setOnAction(event -> OperatingSystem.browseURI(url));
	return hyperlink;
}
 
開發者ID:HearthProject,項目名稱:OneClient,代碼行數:6,代碼來源:MiscUtil.java


注:本文中的javafx.scene.control.Hyperlink.setText方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。