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

net.sf.jasperreports.barbecue.BarbecueExtensionsRegistryFactory Maven / Gradle / Ivy

The newest version!
/*
 * JasperReports - Free Java Reporting Library.
 * Copyright (C) 2001 - 2025 Cloud Software Group, Inc. All rights reserved.
 * http://www.jaspersoft.com
 *
 * Unless you have purchased a commercial license agreement from Jaspersoft,
 * the following license terms apply:
 *
 * This program is part of JasperReports.
 *
 * JasperReports is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * JasperReports is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with JasperReports. If not, see .
 */
package net.sf.jasperreports.barbecue;

import java.util.HashMap;

import net.sf.jasperreports.components.list.ListComponent;
import net.sf.jasperreports.engine.JRPropertiesMap;
import net.sf.jasperreports.engine.component.Component;
import net.sf.jasperreports.engine.component.ComponentManager;
import net.sf.jasperreports.engine.component.ComponentsBundle;
import net.sf.jasperreports.engine.component.DefaultComponentManager;
import net.sf.jasperreports.engine.component.DefaultComponentsBundle;
import net.sf.jasperreports.extensions.ExtensionsRegistry;
import net.sf.jasperreports.extensions.ExtensionsRegistryFactory;
import net.sf.jasperreports.extensions.SingletonExtensionRegistry;

/**
 * Extension registry factory that includes built-in component element
 * implementations.
 * 
 * 

* This registry factory is registered by default in JasperReports. * * @author Lucian Chirita ([email protected]) * @see ListComponent */ public class BarbecueExtensionsRegistryFactory implements ExtensionsRegistryFactory { public static final String BARBECUE_COMPONENT_NAME = "barbecue"; private static final ExtensionsRegistry REGISTRY; static { final DefaultComponentsBundle bundle = new DefaultComponentsBundle(); HashMap, ComponentManager> componentManagers = new HashMap<>(); DefaultComponentManager barbecueManager = new DefaultComponentManager(); barbecueManager.setDesignConverter(new BarbecueDesignConverter()); barbecueManager.setComponentCompiler(new BarbecueCompiler()); barbecueManager.setComponentFillFactory(new BarbecueFillFactory()); componentManagers.put(BarbecueComponent.class, barbecueManager); bundle.setComponentManagers(componentManagers); REGISTRY = new SingletonExtensionRegistry<>(ComponentsBundle.class, bundle); } @Override public ExtensionsRegistry createRegistry(String registryId, JRPropertiesMap properties) { return REGISTRY; } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy