Examples of ImageProvider


Examples of org.openstreetmap.josm.tools.ImageProvider

     *   - from user icon paths
     *   - josm's default icon
     *  can be null if the defaults are turned off by user
     */
    public static ImageIcon getNoIcon_Icon(StyleSource source) {
        return new ImageProvider("misc/no_icon.png")
                .setDirs(getIconSourceDirs(source))
                .setId("mappaint."+source.getPrefName())
                .setArchive(source.zipIcons)
                .setInArchiveDir(source.getZipEntryDirName())
                .setOptional(true).get();
View Full Code Here

Examples of org.openstreetmap.josm.tools.ImageProvider

    public BufferedImage getImage() {
        if (img != null)
            return img;
        temporary = false;
        new ImageProvider(name)
                .setDirs(MapPaintStyles.getIconSourceDirs(source))
                .setId("mappaint."+source.getPrefName())
                .setArchive(source.zipIcons)
                .setInArchiveDir(source.getZipEntryDirName())
                .setWidth(width)
View Full Code Here

Examples of org.openstreetmap.josm.tools.ImageProvider

        }
        author = attr.getValue("Author");
        iconPath = attr.getValue("Plugin-Icon");
        if (iconPath != null && file != null) {
            // extract icon from the plugin jar file
            icon = new ImageProvider(iconPath).setArchive(file).setMaxWidth(24).setMaxHeight(24).setOptional(true).get();
        }
        if (oldcheck && mainversion > Version.getInstance().getVersion()) {
            int myv = Version.getInstance().getVersion();
            for (Map.Entry<Object, Object> entry : attr.entrySet()) {
                try {
View Full Code Here

Examples of org.openstreetmap.josm.tools.ImageProvider

            }
            monitor.finishTask();
        }
        for (PluginInformation pi : availablePlugins) {
            if (pi.icon == null && pi.iconPath != null) {
                pi.icon = new ImageProvider(pi.name+".jar/"+pi.iconPath)
                                .setArchive(destFile)
                                .setMaxWidth(24)
                                .setMaxHeight(24)
                                .setOptional(true).get();
            }
View Full Code Here

Examples of org.openstreetmap.josm.tools.ImageProvider

        for (File f: siteCacheFiles) {
            String fname = f.getName();
            monitor.setCustomText(tr("Processing file ''{0}''", fname));
            for (PluginInformation pi : availablePlugins.values()) {
                if (pi.icon == null && pi.iconPath != null) {
                    pi.icon = new ImageProvider(pi.name+".jar/"+pi.iconPath)
                                    .setArchive(f)
                                    .setMaxWidth(24)
                                    .setMaxHeight(24)
                                    .setOptional(true).get();
                }
View Full Code Here

Examples of org.socialmusicdiscovery.server.api.mediaimport.ImageProvider

            // /META-INF/services/org.socialmusicdiscovery.server.api.mediaimport.ImageProvider
            Map<String, ImageProvider> providers = new HashMap<String, ImageProvider>();
            ServiceLoader<ImageProvider> pluginLoader = ServiceLoader.load(ImageProvider.class);
            Iterator<ImageProvider> it = pluginLoader.iterator();
            while (it.hasNext()) {
                ImageProvider provider = it.next();
                providers.put(provider.getSource(), provider);
            }

            imageProviderManager = new ImageProviderManager(providers);
        }
        return imageProviderManager;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.