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


Java StyleManager类代码示例

本文整理汇总了Java中com.sun.javafx.css.StyleManager的典型用法代码示例。如果您正苦于以下问题:Java StyleManager类的具体用法?Java StyleManager怎么用?Java StyleManager使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: imageUrlProperty

import com.sun.javafx.css.StyleManager; //导入依赖的package包/类
private StyleableStringProperty imageUrlProperty() {

        if (imageUrl == null) {
            imageUrl = CssHelper.createStyleableStringProperty(this, PROP_NAME_IMAGE_URL, GRAPHIC, () -> {
                final String url = imageUrlProperty().get();

                if (url != null) {
                    final Image img = StyleManager.getInstance().getCachedImage(url);

                    if (img != null) {
                        graphicProperty().set(new ImageView(img));
                    }
                } else {
                    graphicProperty().set(null);
                }
            });
        }
        return imageUrl;
    }
 
开发者ID:dejv78,项目名称:j.commons,代码行数:20,代码来源:RadialMenuItem.java

示例2: DataManipulationUI

import com.sun.javafx.css.StyleManager; //导入依赖的package包/类
public DataManipulationUI(){
    StyleManager.getInstance().addUserAgentStylesheet(PropertySheet.class.getResource("propertysheet.css").toExternalForm());

    // Initializing the main grid
    grid = new GridPane();
    grid.setPadding(new Insets(5,5,5,5));
    
    // Adding separators
    grid.add(new Text("Available datasets"),0,0);
    grid.add(new Separator(),0,1);
    grid.add(new Text("Import a dataset"),0,3);
    grid.add(new Separator(),0,4);
    grid.add(new Text("Preprocess the selected dataset"),0,6);
    grid.add(new Separator(),0,7);
    grid.add(new Text("Filter the selected preprocessed dataset"),0,9);
    grid.add(new Separator(),0,10);
    
    // Initializing specific UIs
    availableDatasetsUI();
    newDatasetProperties = new HashMap<>();
    importUI();
    preprocessUI();
    filterUI();
}
 
开发者ID:AdrienGuille,项目名称:SONDY,代码行数:25,代码来源:DataManipulationUI.java

示例3: update

import com.sun.javafx.css.StyleManager; //导入依赖的package包/类
protected void update(String old, String cur)
{
	if(old != null)
	{
		StyleManager.getInstance().removeUserAgentStylesheet(old);
	}
	StyleManager.getInstance().addUserAgentStylesheet(cur);
}
 
开发者ID:andy-goryachev,项目名称:FxEditor,代码行数:9,代码来源:CssLoader.java

示例4: start

import com.sun.javafx.css.StyleManager; //导入依赖的package包/类
@Override
public void start(Stage primaryStage) throws Exception {
    RuntimeExplorer.getInstance().run();

    final URL stylesheetUrl = getClass().getResource("/resources/spotifx.css");
    if (stylesheetUrl != null) {
        Application.setUserAgentStylesheet(Application.STYLESHEET_MODENA);
        StyleManager.getInstance().addUserAgentStylesheet(stylesheetUrl.toExternalForm());
    }
}
 
开发者ID:ivan-gomes,项目名称:runtime-explorer,代码行数:11,代码来源:RuntimeExplorer.java

示例5: start

import com.sun.javafx.css.StyleManager; //导入依赖的package包/类
@Override
public void start(Stage primaryStage) throws Exception {
    Application.setUserAgentStylesheet(null);
    StyleManager.getInstance().addUserAgentStylesheet(ApplicationFX.getCurrentThemeCss());
    //Application.setUserAgentStylesheet(ApplicationFX.getCurrentThemeCss());
    app = new ApplicationFX();
    app.start(primaryStage);
}
 
开发者ID:Vidada-Project,项目名称:vidada-desktop,代码行数:9,代码来源:Application.java

示例6: initializeDefaultUserAgentStylesheet

import com.sun.javafx.css.StyleManager; //导入依赖的package包/类
/**
 * Helper function to add the default style sheet of DockFX to the user agent style sheets.
 */
public final static void initializeDefaultUserAgentStylesheet() {
	StyleManager.getInstance().addUserAgentStylesheet(DockPane.class.getResource("default.css").toExternalForm());
}
 
开发者ID:callakrsos,项目名称:Gargoyle,代码行数:7,代码来源:DockPane.java

示例7: setStylesheet

import com.sun.javafx.css.StyleManager; //导入依赖的package包/类
@Override
public void setStylesheet() {
	Application.setUserAgentStylesheet(Application.STYLESHEET_MODENA);
	StyleManager.getInstance().addUserAgentStylesheet(url);
}
 
开发者ID:qupath,项目名称:qupath,代码行数:6,代码来源:QuPathStyleManager.java

示例8: installDefaultStyle

import com.sun.javafx.css.StyleManager; //导入依赖的package包/类
public static void installDefaultStyle() {
    StyleManager.getInstance()
            .addUserAgentStylesheet("AnchorFX.css");
}
 
开发者ID:alexbodogit,项目名称:AnchorFX,代码行数:5,代码来源:AnchorageSystem.java

示例9: initializeDefaultUserAgentStylesheet

import com.sun.javafx.css.StyleManager; //导入依赖的package包/类
/**
 * Helper function to add the default style sheet of DockFX to the user agent style sheets.
 */
public final static void initializeDefaultUserAgentStylesheet() {
  StyleManager.getInstance()
      .addUserAgentStylesheet(DockPane.class.getResource("default.css").toExternalForm());
}
 
开发者ID:RobertBColton,项目名称:DockFX,代码行数:8,代码来源:DockPane.java

示例10: main

import com.sun.javafx.css.StyleManager; //导入依赖的package包/类
public static void main(String[] args)
{
    StyleManager.getInstance().addUserAgentStylesheet(PropertySheet.class.getResource("propertysheet.css").toExternalForm());
    launch(args);
}
 
开发者ID:AdrienGuille,项目名称:SONDY,代码行数:6,代码来源:Main.java

示例11: start

import com.sun.javafx.css.StyleManager; //导入依赖的package包/类
@Override
public void start(final Stage primaryStage) {
	StyleManager.getInstance()
			.addUserAgentStylesheet(getClass().getResource("/de/chaosfisch/uploader/resources/style.css")
					.toExternalForm());

	final boolean useMasterPassword = configuration.getBoolean(IPersistenceService.MASTER_PASSWORD, false);
	if (useMasterPassword) {
		dialogHelper.showInputDialog("Masterpasswort", "Masterpasswort:", new Callback() {
			@Override
			public void onInput(final InputDialogController controller, final String input) {
				if (Strings.isNullOrEmpty(input)) {
					controller.input.getStyleClass().add("input-invalid");
				} else {
					persistenceService.generateBackup();
					persistenceService.setMasterPassword(input);
					controller.closeDialog(null);
				}
			}
		}, true);
	}
	if (!persistenceService.loadFromStorage()) {
		if (useMasterPassword) {
			dialogHelper.showErrorDialog("Closing..", "Invalid password.");
		} else {
			dialogHelper.showErrorDialog("Closing..", "Unknown error occured.");
		}
		Platform.exit();
	} else {
		persistenceService.cleanStorage();
		Platform.setImplicitExit(false);
		initApplication(primaryStage);

		uploadService.resetUnfinishedUploads();
		uploadService.startStarttimeCheck();

		LOGGER.info("Verifying accounts");
		final List<Account> accounts = accountService.getAll();
		for (final Account account : accounts) {
			if (!accountService.verifyAccount(account)) {
				LOGGER.warn("Account is invalid: {}", account.getName());
				dialogHelper.showAccountPermissionsDialog(account);
			}
		}
	}
}
 
开发者ID:dennisfischer,项目名称:simplejavayoutubeuploader,代码行数:47,代码来源:GUIUploader.java

示例12: addGlobalFocusListener

import com.sun.javafx.css.StyleManager; //导入依赖的package包/类
/**
 * Set the focus listener as user agent stylesheet for the whole application with given main
 * theme.
 * 
 * <p>
 * Reference: <a href="https://bugs.openjdk.java.net/browse/JDK-8077918">JDK-8077918</a>
 *
 * @param url
 *          of main theme stylesheet
 *
 * @see #addFocusListener(Scene)
 * @see #addGlobalFocusListener()
 */
public void addGlobalFocusListener(String url) {
  FXOK.registerPopup(this);
  Application.setUserAgentStylesheet(url);
  StyleManager.getInstance().addUserAgentStylesheet(getUserAgentStyleSheet());
}
 
开发者ID:comtel2000,项目名称:fx-experience,代码行数:19,代码来源:KeyBoardPopup.java


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