All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.minifx.fxmlloading.configuration.FxmlLoadingConfiguration Maven / Gradle / Ivy

There is a newer version: 2.1.4
Show newest version
/**
 * Copyright (c) 2018 European Organisation for Nuclear Research (CERN), All Rights Reserved.
 */

package org.minifx.fxmlloading.configuration;

import java.net.URL;
import java.util.MissingResourceException;
import java.util.ResourceBundle;

public interface FxmlLoadingConfiguration {

    default boolean hasFxmlResource() {
        return (fxmlResource() != null);
    }

    default ResourceBundle resourceBundle() {
        String baseBundleName = conventionalName();
        if (packageName() != null) {
            baseBundleName = packageName() + "." + conventionalName();
        }
        try {
            return ResourceBundle.getBundle(baseBundleName);
        } catch (MissingResourceException mre) {
            return null;
        }
    }

    URL fxmlResource();

    URL cssResource();

    String conventionalName();

    String packageName();
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy