Package org.flexdock.plaf

Examples of org.flexdock.plaf.PropertySet


            }
        }
    }

    private static IconResource loadIcons(String name) {
        PropertySet properties = Configurator.getProperties(name, ICON_RESOURCE_KEY);
        return createResource(properties);
    }
View Full Code Here


        return icons;
    }

    private static IconMap loadIconMap(String iconMapName) {
        PropertySet iconMapProperties = Configurator.getProperties(iconMapName, ICON_MAP_KEY);
        IconMap iconMap = new IconMap();

        ArrayList notCached = new ArrayList();
        for(Iterator it=iconMapProperties.keys(); it.hasNext();) {
            String fakeName = (String)it.next();
            String realName = iconMapProperties.getString(fakeName);

            // load all the cached icon resources
            IconResource iconResource = getCachedResource(realName);
            if(iconResource==null) {
                // track the non-cached icons
                notCached.add(fakeName);
            } else {
                iconMap.addIcons(fakeName, iconResource);
            }
        }
        // if all our resources were already cached, then we can return immediately
        if(notCached.size()==0)
            return iconMap;

        // otherwise, we need to load resources and put them in the cache.
        String[] fakeNames = (String[])notCached.toArray(new String[0]);
        String[] realNames = iconMapProperties.getStrings(fakeNames);
        // load the resources into memory
        HashMap resourceMap = loadIconResources(realNames);

        // now loop through and cache
        for(int i=0; i<fakeNames.length; i++) {
            String realName = iconMapProperties.getString(fakeNames[i]);
            IconResource iconResource = (IconResource)resourceMap.get(realName);
            // cache the resource for future use
            cacheResource(realName, iconResource);
            // add to the immediate icon map
            iconMap.addIcons(fakeNames[i], iconResource);
View Full Code Here

public class PainterResourceHandler extends ResourceHandler {

    public static final String PAINTER_RESOURCE_KEY = "painter-resource";

    public Object getResource(String stringValue) {
        PropertySet propertySet = Configurator.getProperties(stringValue, PAINTER_RESOURCE_KEY);
        PainterResource pr = createResource( propertySet);

        Painter p = createPainter( pr.getImplClass());
        p.setPainterResource( pr);
        return p;
View Full Code Here

        }
        return ui;
    }

    private static IFlexViewComponentUI loadUI(String name, String tagName, Class rootClass) {
        PropertySet properties = Configurator.getProperties(name, tagName);
        String classname = properties.getString(CLASSNAME_KEY);
        Class implClass = loadUIClass(classname, rootClass);

        try {
            IFlexViewComponentUI ui = (IFlexViewComponentUI)implClass.newInstance();
            ui.setCreationParameters(properties);
View Full Code Here

TOP

Related Classes of org.flexdock.plaf.PropertySet

Copyright © 2018 www.massapicom. 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.