• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java JRPropertiesMap类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中net.sf.jasperreports.engine.JRPropertiesMap的典型用法代码示例。如果您正苦于以下问题:Java JRPropertiesMap类的具体用法?Java JRPropertiesMap怎么用?Java JRPropertiesMap使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



JRPropertiesMap类属于net.sf.jasperreports.engine包,在下文中一共展示了JRPropertiesMap类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: createRegistry

import net.sf.jasperreports.engine.JRPropertiesMap; //导入依赖的package包/类
@Override
public ExtensionsRegistry createRegistry(String registryId,
		JRPropertiesMap properties)
{
	List<PropertySuffix> themeProperties = JRPropertiesUtil.getProperties(properties, 
			XML_CHART_THEME_PROPERTY_PREFIX);
	Map<String, ChartTheme> themes = new HashMap<String, ChartTheme>();
	for (Iterator<PropertySuffix> it = themeProperties.iterator(); it.hasNext();)
	{
		PropertySuffix themeProp = it.next();
		String themeName = themeProp.getSuffix();
		String themeLocation = themeProp.getValue();
		XmlChartTheme theme = new XmlChartTheme(themeLocation);
		themes.put(themeName, theme);
	}
	
	ChartThemeMapBundle bundle = new ChartThemeMapBundle();
	bundle.setThemes(themes);
	return new ChartThemeBundlesExtensionsRegistry(bundle);
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:21,代码来源:XmlChartThemeExtensionsRegistryFactory.java


示例2: createRegistry

import net.sf.jasperreports.engine.JRPropertiesMap; //导入依赖的package包/类
@Override
public ExtensionsRegistry createRegistry(String registryId, JRPropertiesMap properties)
{
	List<PropertySuffix> jacksonMappingProperties = JRPropertiesUtil.getProperties(properties, JACKSON_MAPPING_PROPERTY_PREFIX);
	List<JacksonMapping> jacksonMappings = new ArrayList<JacksonMapping>();
	for (Iterator<PropertySuffix> it = jacksonMappingProperties.iterator(); it.hasNext();)
	{
		PropertySuffix jacksonMappingProp = it.next();
		jacksonMappings.add(
			new JacksonMapping(
				jacksonMappingProp.getSuffix(), 
				jacksonMappingProp.getValue()
				)
			);
	}
	
	return new ListExtensionRegistry<JacksonMapping>(JacksonMapping.class, jacksonMappings);
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:19,代码来源:JacksonMappingExtensionsRegistryFactory.java


示例3: setPaths

import net.sf.jasperreports.engine.JRPropertiesMap; //导入依赖的package包/类
protected void setPaths(String registryId, JRPropertiesMap properties,
		RequirejsTemplateConfigContributor templateContributor)
{
	String pathPropPrefix = EXTENSION_PROPERTY_PATH_PREFIX + registryId + ".";
	List<PropertySuffix> pathProps = JRPropertiesUtil.getProperties(properties, pathPropPrefix);
	for (PropertySuffix pathProp : pathProps)
	{
		String suffix = pathProp.getSuffix();
		String path = pathProp.getValue();
		
		if (log.isDebugEnabled())
		{
			log.debug("setting path " + suffix + " to " + path);
		}
		templateContributor.addPath(suffix, path);
	}
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:18,代码来源:RequirejsConfigTemplateExtensionFactory.java


示例4: setResources

import net.sf.jasperreports.engine.JRPropertiesMap; //导入依赖的package包/类
protected void setResources(String registryId, JRPropertiesMap properties,
		RequirejsTemplateConfigContributor templateContributor)
{
	String pathPropPrefix = EXTENSION_PROPERTY_RESOURCE_PREFIX + registryId + ".";
	List<PropertySuffix> pathProps = JRPropertiesUtil.getProperties(properties, pathPropPrefix);
	for (PropertySuffix pathProp : pathProps)
	{
		String suffix = pathProp.getSuffix();
		String path = pathProp.getValue();
		
		if (log.isDebugEnabled())
		{
			log.debug("setting resource " + suffix + " to " + path);
		}
		templateContributor.addResourcePath(suffix, path);
	}
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:18,代码来源:RequirejsConfigTemplateExtensionFactory.java


示例5: createRegistry

import net.sf.jasperreports.engine.JRPropertiesMap; //导入依赖的package包/类
@Override
public ExtensionsRegistry createRegistry(String registryId, JRPropertiesMap properties)
{
	List<PropertySuffix> requirejsModuleProperties = JRPropertiesUtil.getProperties(properties, REQUIREJS_MAPPING_PROPERTY_PREFIX);
	List<RequirejsModuleMapping> requirejsModules = new ArrayList<RequirejsModuleMapping>();
	for (Iterator<PropertySuffix> it = requirejsModuleProperties.iterator(); it.hasNext();)
	{
		PropertySuffix requirejsModuleProp = it.next();
		String suffix = requirejsModuleProp.getSuffix();
		boolean isClasspathResource = !suffix.endsWith(URL_SUFFIX);

		requirejsModules.add(
				new RequirejsModuleMapping(
						isClasspathResource ? suffix : suffix.substring(0, suffix.indexOf(URL_SUFFIX)),
						requirejsModuleProp.getValue(),
						isClasspathResource
				)
		);
	}
	
	return new ListExtensionRegistry<RequirejsModuleMapping>(RequirejsModuleMapping.class, requirejsModules);
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:23,代码来源:RequirejsModuleMappingExtensionsRegistryFactory.java


示例6: JRBasePart

import net.sf.jasperreports.engine.JRPropertiesMap; //导入依赖的package包/类
public JRBasePart(JRPart part, JRBaseObjectFactory factory)
{
	factory.put(part, this);
	
	this.uuid = part.getUUID();
	this.propertiesMap = JRPropertiesMap.getPropertiesClone(part);
	this.printWhenExpression = factory.getExpression(part.getPrintWhenExpression());
	this.partNameExpression = factory.getExpression(part.getPartNameExpression());
	this.evaluationTime = part.getEvaluationTime();

	componentKey = part.getComponentKey();
	
	PartComponentManager manager = PartComponentsEnvironment.getInstance(DefaultJasperReportsContext.getInstance()).getManager(componentKey);
	component = manager.getComponentCompiler(DefaultJasperReportsContext.getInstance()).toCompiledComponent(
			part.getComponent(), factory);

	if (component instanceof JRVisitable)
	{
		((JRVisitable) component).visit(factory);
	}
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:22,代码来源:JRBasePart.java


示例7: createRegistry

import net.sf.jasperreports.engine.JRPropertiesMap; //导入依赖的package包/类
@Override
public ExtensionsRegistry createRegistry(String registryId, JRPropertiesMap properties)
{
	List<PropertySuffix> fontFamiliesProperties = JRPropertiesUtil.getProperties(properties, SIMPLE_FONT_FAMILIES_PROPERTY_PREFIX);
	List<String> fontFamiliesLocations = new ArrayList<String>();
	for (Iterator<PropertySuffix> it = fontFamiliesProperties.iterator(); it.hasNext();)
	{
		PropertySuffix fontFamiliesProp = it.next();
		//String fontFamiliesName = fontFamiliesProp.getSuffix();
		String fontFamiliesLocation = fontFamiliesProp.getValue();
		//fontFamiliesLocations.addAll(SimpleFontExtensionHelper.getInstance().loadFontFamilies(fontFamiliesLocation));
		fontFamiliesLocations.add(fontFamiliesLocation);
	}
	
	return new FontExtensionsRegistry(fontFamiliesLocations);
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:17,代码来源:SimpleFontExtensionsRegistryFactory.java


示例8: add

import net.sf.jasperreports.engine.JRPropertiesMap; //导入依赖的package包/类
/**
 * Adds a set of properties to the hash.
 * 
 * @param properties
 */
public void add(JRPropertiesMap properties)
{
	if (properties == null || !properties.hasProperties())
	{
		addToHash(0);
	}
	else
	{
		String[] names = properties.getPropertyNames();
		for (String prop : names)
		{
			add(prop);
			add(properties.getProperty(prop));
		}
	}
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:22,代码来源:ObjectUtils.java


示例9: writeProperties

import net.sf.jasperreports.engine.JRPropertiesMap; //导入依赖的package包/类
/**
 * 
 *
 */
private void writeProperties( JRPropertiesHolder propertiesHolder, String propertiesHolderName)
{
	if (propertiesHolder.hasProperties())
	{
		JRPropertiesMap propertiesMap = propertiesHolder.getPropertiesMap();
		String[] propertyNames = propertiesMap.getPropertyNames();
		if (propertyNames != null && propertyNames.length > 0)
		{
			write( "//properties\n");
			for(int i = 0; i < propertyNames.length; i++)
			{
				String value = propertiesMap.getProperty(propertyNames[i]);
				if (value != null)
				{
					write( propertiesHolderName + ".setProperty(\"" + propertyNames[i] + "\", \"" + JRStringUtil.escapeJavaStringLiteral(value) + "\");\n");
				}
			}
			write("\n");
		}
		flush();
	}
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:27,代码来源:JRApiWriter.java


示例10: allowElementNegativeX

import net.sf.jasperreports.engine.JRPropertiesMap; //导入依赖的package包/类
protected boolean allowElementNegativeX(JRElement element)
{
	// default to report/global property
	boolean allow = allowElementNegativeX;
	if (element.hasProperties())
	{
		JRPropertiesMap properties = element.getPropertiesMap();
		if (properties.containsProperty(PROPERTY_ALLOW_ELEMENT_NEGATIVE_X))
		{
			// use element level property
			allow = JRPropertiesUtil.asBoolean(properties.getProperty(
					PROPERTY_ALLOW_ELEMENT_NEGATIVE_X));
		}
	}
	return allow;
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:17,代码来源:JRVerifier.java


示例11: allowElementNegativeY

import net.sf.jasperreports.engine.JRPropertiesMap; //导入依赖的package包/类
protected boolean allowElementNegativeY(JRElement element)
{
	// default to report/global property
	boolean allow = allowElementNegativeY;
	if (element.hasProperties())
	{
		JRPropertiesMap properties = element.getPropertiesMap();
		if (properties.containsProperty(PROPERTY_ALLOW_ELEMENT_NEGATIVE_Y))
		{
			// use element level property
			allow = JRPropertiesUtil.asBoolean(properties.getProperty(
					PROPERTY_ALLOW_ELEMENT_NEGATIVE_Y));
		}
	}
	return allow;
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:17,代码来源:JRVerifier.java


示例12: evaluateProperties

import net.sf.jasperreports.engine.JRPropertiesMap; //导入依赖的package包/类
/**
 *
 */
protected void evaluateProperties(PropertyEvaluationTimeEnum evaluationTime) throws JRException
{
	if (!propertyExpressions.isEmpty())
	{
		JRPropertiesMap dynamicProperties = new JRPropertiesMap();
		
		PropertyEvaluationTimeEnum defaultEvaluationTime = getDefaultPropertyEvaluationTime();
		for (DatasetPropertyExpression prop : propertyExpressions)
		{
			PropertyEvaluationTimeEnum propEvalTime = prop.getEvaluationTime() == null ? defaultEvaluationTime : prop.getEvaluationTime();
			if (evaluationTime == propEvalTime)
			{
				String value = (String) evaluateExpression(prop.getValueExpression(), JRExpression.EVALUATION_DEFAULT);
				//if (value != null) //is the null value significant for some field properties?
				{
					dynamicProperties.setProperty(prop.getName(), value);
				}
			}
		}

		JRPropertiesMap newMergedProperties = dynamicProperties.cloneProperties();
		newMergedProperties.setBaseProperties(mergedProperties);
		mergedProperties = newMergedProperties;
	}
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:29,代码来源:JRFillDataset.java


示例13: evaluateProperties

import net.sf.jasperreports.engine.JRPropertiesMap; //导入依赖的package包/类
/**
 *
 */
protected void evaluateProperties() throws JRException
{
	if (propertyExpressions.isEmpty())
	{
		mergedProperties = staticProperties;
	}
	else
	{
		JRPropertiesMap dynamicProperties = new JRPropertiesMap();
		
		for (JRPropertyExpression prop : propertyExpressions)
		{
			String value = (String) evaluateExpression(prop.getValueExpression());
			//if (value != null) //is the null value significant for some field properties?
			{
				dynamicProperties.setProperty(prop.getName(), value);
			}
		}
		
		mergedProperties = dynamicProperties.cloneProperties();
		mergedProperties.setBaseProperties(staticProperties);
	}
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:27,代码来源:JRFillField.java


示例14: addFunctionClasses

import net.sf.jasperreports.engine.JRPropertiesMap; //导入依赖的package包/类
/**
 * 
 */
private void addFunctionClasses(List<String> classNames, JRPropertiesMap properties, String propertyPrefix)
{
	List<PropertySuffix> functionClassProperties = JRPropertiesUtil.getProperties(properties, propertyPrefix);
	for (Iterator<PropertySuffix> it = functionClassProperties.iterator(); it.hasNext();)
	{
		PropertySuffix functionsClassesProp = it.next(); 

		// We assume this property value is a comma-separated class names list like: a.b.c.ClassA, a.b.d.ClassB
		
		String[] classes = functionsClassesProp.getValue().split(",");
		
		for (String className : classes)
		{
			className = className.trim();
			if (className.length() > 0)
			{
				classNames.add( className);
			}
		}
	}
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:25,代码来源:FunctionsRegistryFactory.java


示例15: getStringParameter

import net.sf.jasperreports.engine.JRPropertiesMap; //导入依赖的package包/类
@Override
public String getStringParameter(net.sf.jasperreports.engine.JRExporterParameter parameter, String property)
{
	String value;
	JRPropertiesMap hintsMap = jasperPrint.getPropertiesMap();
	if (hintsMap != null && hintsMap.containsProperty(property))
	{
		value = hintsMap.getProperty(property);
	}
	else
	{
		value = (String) parameters.get(parameter);
		
		if (value == null)
		{
			value = getPropertiesUtil().getProperty(property);
		}
	}
	return value;
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:21,代码来源:ParameterOverriddenResolver.java


示例16: getStringArrayParameter

import net.sf.jasperreports.engine.JRPropertiesMap; //导入依赖的package包/类
@Override
public String[] getStringArrayParameter(net.sf.jasperreports.engine.JRExporterParameter parameter, String propertyPrefix)
{
	String[] values = null;
	JRPropertiesMap hintsMap = jasperPrint.getPropertiesMap();
	if (hintsMap != null)
	{
		List<PropertySuffix> properties = JRPropertiesUtil.getProperties(hintsMap, propertyPrefix);
		if (properties != null && !properties.isEmpty())
		{
			values = new String[properties.size()];
			for(int i = 0; i < values.length; i++)
			{
				values[i] = properties.get(i).getValue();
			}
		}
	}
	else
	{
		values = (String[])parameters.get(parameter);
	}
	return values;
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:24,代码来源:ParameterOverriddenResolver.java


示例17: getCharacterParameter

import net.sf.jasperreports.engine.JRPropertiesMap; //导入依赖的package包/类
@Override
public Character getCharacterParameter(net.sf.jasperreports.engine.JRExporterParameter parameter, String property)
{
	Character value;
	JRPropertiesMap hintsMap = jasperPrint.getPropertiesMap();
	if (hintsMap != null && hintsMap.containsProperty(property))
	{
		String prop = hintsMap.getProperty(property);
		value = JRPropertiesUtil.asCharacter(prop);
	}
	else
	{
		value = (Character) parameters.get(parameter);
		
		if (value == null)
		{
			value = getPropertiesUtil().getCharacterProperty(property);
		}
	}
	return value;
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:22,代码来源:ParameterOverriddenResolver.java


示例18: getConditionalFormattingData

import net.sf.jasperreports.engine.JRPropertiesMap; //导入依赖的package包/类
/**
 * 
 */
public static ConditionalFormattingData getConditionalFormattingData(
	JRDesignTextElement textElement, 
	JasperReportsContext jasperReportsContext
	) 
{
	ConditionalFormattingData cfd = null;
	if (textElement != null) 
	{
		JRPropertiesMap propertiesMap = textElement.getPropertiesMap();
		if (
			propertiesMap.containsProperty(ConditionalFormattingCommand.COLUMN_CONDITIONAL_FORMATTING_PROPERTY) 
			&& propertiesMap.getProperty(ConditionalFormattingCommand.COLUMN_CONDITIONAL_FORMATTING_PROPERTY) != null
			) 
		{
			cfd = 
				JacksonUtil.getInstance(jasperReportsContext).loadObject(
					propertiesMap.getProperty(ConditionalFormattingCommand.COLUMN_CONDITIONAL_FORMATTING_PROPERTY), 
					ConditionalFormattingData.class
					);
		}
	}
	return cfd;
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:27,代码来源:HeaderToolbarElementUtils.java


示例19: StandardBaseColumn

import net.sf.jasperreports.engine.JRPropertiesMap; //导入依赖的package包/类
public StandardBaseColumn(BaseColumn column, ColumnFactory factory)
{
	this.uuid = column.getUUID();

	this.printWhenExpression = factory.getBaseObjectFactory().getExpression(
			column.getPrintWhenExpression());
	
	this.tableHeader = factory.createCell(column.getTableHeader());
	this.tableFooter = factory.createCell(column.getTableFooter());
	this.groupHeaders = factory.createGroupCells(column.getGroupHeaders());
	this.groupFooters = factory.createGroupCells(column.getGroupFooters());
	this.columnHeader = factory.createCell(column.getColumnHeader());
	this.columnFooter = factory.createCell(column.getColumnFooter());

	this.width = column.getWidth();

	propertiesMap = JRPropertiesMap.getPropertiesClone(column);
	copyPropertyExpressions(column, factory);
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:20,代码来源:StandardBaseColumn.java


示例20: visitColumn

import net.sf.jasperreports.engine.JRPropertiesMap; //导入依赖的package包/类
@Override
public FillColumn visitColumn(Column column)
{
	try
	{
		boolean toPrint = toPrintColumn(column, evaluation);
		if (toPrint)
		{
			JRPropertiesMap properties = evaluateProperties(column, evaluation);
			return new FillColumn(column, properties); 
		}
		return null;
	}
	catch (JRException e)
	{
		throw new JRRuntimeException(e);
	}
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:19,代码来源:FillTable.java



注:本文中的net.sf.jasperreports.engine.JRPropertiesMap类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java X509v2CRLBuilder类代码示例发布时间:2022-05-22
下一篇:
Java VisualGraph类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap