当前位置: 首页>>代码示例>>Java>>正文


Java GlyphFontRegistry.register方法代码示例

本文整理汇总了Java中org.controlsfx.glyphfont.GlyphFontRegistry.register方法的典型用法代码示例。如果您正苦于以下问题:Java GlyphFontRegistry.register方法的具体用法?Java GlyphFontRegistry.register怎么用?Java GlyphFontRegistry.register使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.controlsfx.glyphfont.GlyphFontRegistry的用法示例。


在下文中一共展示了GlyphFontRegistry.register方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: initialize

import org.controlsfx.glyphfont.GlyphFontRegistry; //导入方法依赖的package包/类
/**
 * Initializes every needed service
 *
 * @param location
 * @param resources
 */
@Override
public void initialize(URL location, ResourceBundle resources) {
    // Load FontAweSome
    GlyphFontRegistry.register(new FontAwesome(getClass().getResourceAsStream("/fonts/fontawesome-webfont.ttf")));

    startTreePreloadService();
    initializeAccordion();
    initializeRankChoiceBox();
    initializeGraphSettings();
    initializeAnalysisPane();
    initializeGraphAnalysis();
    initializeInfoPane();
    initializeBindings();
    initializeColorComboBox();
    initializeButtonsOnLeftPane();
    //preload settings
    SaveAndLoadOptions.loadSettings();

    //Display the info text in the bottom left pane
    displayInfoText();
}
 
开发者ID:jmueller95,项目名称:CORNETTO,代码行数:28,代码来源:MainStageController.java

示例2: start

import org.controlsfx.glyphfont.GlyphFontRegistry; //导入方法依赖的package包/类
@Override
public void start(Stage stage) {
	try {
		mainStage = stage;
		InputStream is = getClass().getResourceAsStream("fontawesome-webfont.ttf");
		GlyphFont fa = new FontAwesome(is);
		GlyphFontRegistry.register(fa);
		Parent root = FXMLLoader.load(getClass().getResource("application.fxml"));
		stage.setTitle("MobTime");
		stage.getIcons().add(new Image(getClass().getResourceAsStream("icon.png")));
		Scene scene = new Scene(root);
		stage.setScene(scene);
		stage.show();
		openMiniTimer();
		
		stage.setOnCloseRequest(new EventHandler<WindowEvent>() {
	        @Override
	        public void handle(final WindowEvent event) {
	        	miniTimer.close();
	        }
		});
	} catch (Exception e) {
		e.printStackTrace();
	}
}
 
开发者ID:GreatWebGuy,项目名称:MobTime,代码行数:26,代码来源:MobTime.java

示例3: getFontAwesome

import org.controlsfx.glyphfont.GlyphFontRegistry; //导入方法依赖的package包/类
private GlyphFont getFontAwesome() {
    if (fontAwesome == null) {
        try (InputStream inputStream = UniformDesign.class.getResourceAsStream("/de/factoryfx/javafx/icon/fontawesome-webfont4_3.ttf")) {
            GlyphFont font_awesome = new FontAwesome(inputStream);
            GlyphFontRegistry.register(font_awesome);
            fontAwesome = GlyphFontRegistry.font("FontAwesome");
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
    }
    return fontAwesome;
}
 
开发者ID:factoryfx,项目名称:factoryfx,代码行数:13,代码来源:UniformDesign.java

示例4: init

import org.controlsfx.glyphfont.GlyphFontRegistry; //导入方法依赖的package包/类
public static void init() {
	InputStream input = FontAwesomeOffline.class.getResourceAsStream(fontLocation);
	if (input != null) {
		font = new FontAwesome(input);
		GlyphFontRegistry.register(font);
		// Note: if we would close the input stream, icons would not be displayed anymore!
	} else {
		logger.warn("Could not initialize font awesome: ''.", fontLocation);
	}
}
 
开发者ID:PeerWasp,项目名称:PeerWasp,代码行数:11,代码来源:IconUtils.java


注:本文中的org.controlsfx.glyphfont.GlyphFontRegistry.register方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。