Examples of IComponentDemoCategory


Examples of org.apache.myfaces.trinidaddemo.support.IComponentDemoCategory

        Map<ComponentDemoId, Set<IComponentDemoVariantId>> variantsAdded = new HashMap<ComponentDemoId, Set<IComponentDemoVariantId>>();

        Iterator<IComponentDemoCategory> categories = registry.getDemoCategories().iterator();
        while (categories.hasNext()) {
            IComponentDemoCategory aCategory = categories.next();
            Iterator<IComponentDemo> componentDemos = aCategory.getComponentDemos().iterator();
            while (componentDemos.hasNext()) {
                IComponentDemo aComponentDemo = componentDemos.next();

                Set<IComponentDemoVariantId> alreadyAddedVariants = variantsAdded.get(aComponentDemo.getId());
                if (alreadyAddedVariants == null) {
View Full Code Here

Examples of org.apache.myfaces.trinidaddemo.support.IComponentDemoCategory

            throw new IllegalArgumentException("Trying to register a null component demo!");
        }

        _LOG.log(Level.INFO, "Register component demo '" + componentDemo.getDisplayName() + "' in category '" + categoryName + "'");

        IComponentDemoCategory category = categoriesRegistry.get(categoryId);
        if (category == null) {
            category = new ComponentDemoCategoryImpl(categoryId, categoryName);

            categories.add(category);
            categoriesRegistry.put(categoryId, category);
        }

        category.addComponentDemo(componentDemo);
        componentsDemoRegistry.put(componentDemo.getId(), componentDemo);
    }
View Full Code Here

Examples of org.apache.myfaces.trinidaddemo.support.IComponentDemoCategory

     */
    class CategoryDisclosedStateEvalMap extends EvalMapAdapter {

        @Override
        public Object get(Object key) {
            IComponentDemoCategory category = (IComponentDemoCategory) key;

            //if there is no concrete component demo selected yet, disclose the default category
            if (currentComponentVariantDemo == null &&
                defaultDisclosedCategoryId.equals(category.getId())) {
                    return true;
            }

            return category != null &&
                   currentComponentVariantDemo != null &&
                   category.equals(currentComponentVariantDemo.getCategory());
        }
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.