当前位置: 首页>>代码示例>>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;未经允许,请勿转载。